Csound Csound-dev Csound-tekno Search About

Re: how to add instruments in real time?

Date2017-03-07 13:57
From"vallste@libero.it" <00000008a49663bc-dmarc-request@LISTSERV.HEANET.IE>
SubjectRe: how to add instruments in real time?
See also compileorc and compilestr opcodes.
Ciao
Stefano

----Messaggio originale----
Da: "Forrest Curo" <treegestalt@GMAIL.COM>
Data: 07/03/2017 4.01
A: <CSOUND@LISTSERV.HEANET.IE>
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 <treegestalt@gmail.com> 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 <nsingh1@berklee.edu> 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 <treegestalt@gmail.com> 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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

Date2017-03-07 15:17
FromForrest Curo
SubjectRe: 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, vallste@libero.it <00000008a49663bc-dmarc-request@listserv.heanet.ie> wrote:
See also compileorc and compilestr opcodes.
Ciao
Stefano

----Messaggio originale----
Da: "Forrest Curo" <treegestalt@GMAIL.COM>
Data: 07/03/2017 4.01
A: <CSOUND@LISTSERV.HEANET.IE>
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 <treegestalt@gmail.com> 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 <nsingh1@berklee.edu> 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 <treegestalt@gmail.com> 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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 Csound@listserv.heanet.ie 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