[Csnd] how to add instruments in real time?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[Csnd] how to add instruments in real time?

forrest
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how to add instruments in real time?

nsingh1
csoundCompileOrc() I think is the function that allows this. I could be wrong though!

On Mon, Mar 6, 2017 at 7:40 PM, Forrest Curo <[hidden email]> wrote:
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how to add instruments in real time?

forrest
Yes, thanks!

"...
char *orc = "instr 8 \n a1 rand 0dbfs/4 \n outs a1, a1 \n endin \n";

csoundCompileOrc(csound, orc);

sprintf(orcout, "i8 0 5 \n");
...
"

produces noise when I trigger it
and:
"...
i5.57 0 60 92 7.09
  rtevent:       T  2.582 TT  2.582 M:  20281.1  22750.4
i8 0 5
..."



On Mon, Mar 6, 2017 at 5:16 PM, Nikhil Singh <[hidden email]> wrote:
csoundCompileOrc() I think is the function that allows this. I could be wrong though!

On Mon, Mar 6, 2017 at 7:40 PM, Forrest Curo <[hidden email]> wrote:
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how to add instruments in real time?

forrest
[The "i5.57 etc" part might be confusing; it's there because the
triggering event was the noteoff I sent to instrument 5.57.]

On Mon, Mar 6, 2017 at 6:57 PM, Forrest Curo <[hidden email]> wrote:
Yes, thanks!

"...
char *orc = "instr 8 \n a1 rand 0dbfs/4 \n outs a1, a1 \n endin \n";

csoundCompileOrc(csound, orc);

sprintf(orcout, "i8 0 5 \n");
...
"

produces noise when I trigger it
and:
"...
i5.57 0 60 92 7.09
  rtevent:       T  2.582 TT  2.582 M:  20281.1  22750.4
i8 0 5
..."



On Mon, Mar 6, 2017 at 5:16 PM, Nikhil Singh <[hidden email]> wrote:
csoundCompileOrc() I think is the function that allows this. I could be wrong though!

On Mon, Mar 6, 2017 at 7:40 PM, Forrest Curo <[hidden email]> wrote:
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how to add instruments in real time?

vallste@libero.it
In reply to this post by forrest
See also compileorc and compilestr opcodes.
Ciao
Stefano

----Messaggio originale----
Da: "Forrest Curo" <[hidden email]>
Data: 07/03/2017 4.01
A: <[hidden email]>
Ogg: Re: [Csnd] how to add instruments in real time?

[The "i5.57 etc" part might be confusing; it's there because the
triggering event was the noteoff I sent to instrument 5.57.]

On Mon, Mar 6, 2017 at 6:57 PM, Forrest Curo <[hidden email]> wrote:
Yes, thanks!

"...
char *orc = "instr 8 \n a1 rand 0dbfs/4 \n outs a1, a1 \n endin \n";

csoundCompileOrc(csound, orc);

sprintf(orcout, "i8 0 5 \n");
...
"

produces noise when I trigger it
and:
"...
i5.57 0 60 92 7.09
  rtevent:       T  2.582 TT  2.582 M:  20281.1  22750.4
i8 0 5
..."



On Mon, Mar 6, 2017 at 5:16 PM, Nikhil Singh <[hidden email]> wrote:
csoundCompileOrc() I think is the function that allows this. I could be wrong though!

On Mon, Mar 6, 2017 at 7:40 PM, Forrest Curo <[hidden email]> wrote:
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how to add instruments in real time?

forrest
So you would include an instrument which accepts input from a file (perhaps a fifo, which you could write to in real time) or a string (which could likewise be input in real time) to replace or add-to the existing orchestra.

Actually, I didn't notice any significant latency issues when I used the end of a midi note to trigger csoundCompileOrc followed immediately by a call to the new instrument!

With either approach, it looks like you could just leave an instance of csound running while you tinkered with its works.... Again, thanks. Kind of overwhelming with possibilities!

You could, of course, use csoundCompileOrc to add your instrument-with-compilestr to an initially-empty orchestra and a long-running blank score...

On Tue, Mar 7, 2017 at 5:57 AM, [hidden email] <[hidden email]> wrote:
See also compileorc and compilestr opcodes.
Ciao
Stefano

----Messaggio originale----
Da: "Forrest Curo" <[hidden email]>
Data: 07/03/2017 4.01
A: <[hidden email]>
Ogg: Re: [Csnd] how to add instruments in real time?


[The "i5.57 etc" part might be confusing; it's there because the
triggering event was the noteoff I sent to instrument 5.57.]

On Mon, Mar 6, 2017 at 6:57 PM, Forrest Curo <[hidden email]> wrote:
Yes, thanks!

"...
char *orc = "instr 8 \n a1 rand 0dbfs/4 \n outs a1, a1 \n endin \n";

csoundCompileOrc(csound, orc);

sprintf(orcout, "i8 0 5 \n");
...
"

produces noise when I trigger it
and:
"...
i5.57 0 60 92 7.09
  rtevent:       T  2.582 TT  2.582 M:  20281.1  22750.4
i8 0 5
..."



On Mon, Mar 6, 2017 at 5:16 PM, Nikhil Singh <[hidden email]> wrote:
csoundCompileOrc() I think is the function that allows this. I could be wrong though!

On Mon, Mar 6, 2017 at 7:40 PM, Forrest Curo <[hidden email]> wrote:
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [Csnd] how to add instruments in real time?

vallste@libero.it
In reply to this post by forrest
Yes, I'm developing something similar (quite far to be useful) in python. I have an almost empty csound file in which one instrument (activated by API score message) receive new instruments definitions as strings (via API) and put them in the compilestr opcode.

----Messaggio originale----
Da: "Forrest Curo" <[hidden email]>
Data: 07/03/2017 16.17
A: <[hidden email]>
Ogg: Re: [Csnd] how to add instruments in real time?

So you would include an instrument which accepts input from a file (perhaps a fifo, which you could write to in real time) or a string (which could likewise be input in real time) to replace or add-to the existing orchestra.

Actually, I didn't notice any significant latency issues when I used the end of a midi note to trigger csoundCompileOrc followed immediately by a call to the new instrument!

With either approach, it looks like you could just leave an instance of csound running while you tinkered with its works.... Again, thanks. Kind of overwhelming with possibilities!

You could, of course, use csoundCompileOrc to add your instrument-with-compilestr to an initially-empty orchestra and a long-running blank score...

On Tue, Mar 7, 2017 at 5:57 AM, [hidden email] <[hidden email]> wrote:
See also compileorc and compilestr opcodes.
Ciao
Stefano

----Messaggio originale----
Da: "Forrest Curo" <[hidden email]>
Data: 07/03/2017 4.01
A: <[hidden email]>
Ogg: Re: [Csnd] how to add instruments in real time?


[The "i5.57 etc" part might be confusing; it's there because the
triggering event was the noteoff I sent to instrument 5.57.]

On Mon, Mar 6, 2017 at 6:57 PM, Forrest Curo <[hidden email]> wrote:
Yes, thanks!

"...
char *orc = "instr 8 \n a1 rand 0dbfs/4 \n outs a1, a1 \n endin \n";

csoundCompileOrc(csound, orc);

sprintf(orcout, "i8 0 5 \n");
...
"

produces noise when I trigger it
and:
"...
i5.57 0 60 92 7.09
  rtevent:       T  2.582 TT  2.582 M:  20281.1  22750.4
i8 0 5
..."



On Mon, Mar 6, 2017 at 5:16 PM, Nikhil Singh <[hidden email]> wrote:
csoundCompileOrc() I think is the function that allows this. I could be wrong though!

On Mon, Mar 6, 2017 at 7:40 PM, Forrest Curo <[hidden email]> wrote:
The wikipedia article on csound [along with their usual complaint about the article containing first-hand information from people who know about the subject, which seems to show up on all their useful audio articles] has the following:

[abt csound 6]:
"The orchestra can be re-compiled at any time, or individual instruments can be compiled at any time, during a running performance. This enables true "live coding" in Csound performances."

Where can I find a piece on how to do this from (say) C [using the api functions]?
Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here


Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here

Csound mailing list [hidden email] https://listserv.heanet.ie/cgi-bin/wa?A0=CSOUND Send bugs reports to https://github.com/csound/csound/issues Discussions of bugs and features can be posted here
Loading...