Csound Csound-dev Csound-tekno Search About

[Csnd] Signals from Csound during performance

Date2018-10-30 13:18
FromPeter Burgess
Subject[Csnd] Signals from Csound during performance
Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?

What I've found so far is:

SetCsoundCallback
SetRtcloseCallback
perfThread->SetProcessCallback
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

Date2018-10-30 13:55
FromSteven Yi
SubjectRe: [Csnd] Signals from Csound during performance
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
 wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-10-30 19:12
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-10-30 19:57
FromRory Walsh
SubjectRe: [Csnd] Signals from Csound during performance
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-10-30 20:19
FromRory Walsh
SubjectRe: [Csnd] Signals from Csound during performance
I think the Csound class has a csound() member, or GetCsound() that should return this struct..

On Tue, 30 Oct 2018 at 21:36, Peter Burgess <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-10-30 20:36
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-10-30 21:20
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-10-30 21:22
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-10-30 21:31
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-11-01 22:56
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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

Date2018-11-02 08:03
FromRory Walsh
SubjectRe: [Csnd] Signals from Csound during performance
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 09:12
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Aha, thanks Rory. I figured they would be the ideal callback spakjing opcodes as they take I rate variables. Tonight then it will all work :)

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 09:47
FromRory Walsh
SubjectRe: [Csnd] Signals from Csound during performance
If this all part of the algorithmic radio or are you working on something new?

On Fri 2 Nov 2018, 09:13 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Aha, thanks Rory. I figured they would be the ideal callback spakjing opcodes as they take I rate variables. Tonight then it will all work :)

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 10:16
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
I'm happy that you remember that :) it is indeed. I ditched it for nearly two years for a wide variety of reasons. In those two years I got real work as a software engineer (largely off the back of my algorythm radio work) and having worked I proffessional environments, my coding skills have been improving exponentially... I eventually realised my original algorythm radio code was ludicrously terrible, so I started from scratch about 4 months ago... It is now starting to look real nice now, only a few features away from being up to speed with the last version and it's already many new features ahead as well. I have the first new public audio examples coming soon :)

On Fri, 2 Nov 2018, 09:47 Rory Walsh <rorywalsh@ear.ie wrote:
If this all part of the algorithmic radio or are you working on something new?

On Fri 2 Nov 2018, 09:13 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Aha, thanks Rory. I figured they would be the ideal callback spakjing opcodes as they take I rate variables. Tonight then it will all work :)

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 13:20
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Hmm, I'm trying chano and chnclear to see if either of them trigger the callback... Nothing yet... Also, the callback function takes a char* for channel name, which would appear to make sense with the chn opcodes rather than the chani/chano opcodes. Are there other channel opcodes I've not found?

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 14:40
FromRory Walsh
SubjectRe: [Csnd] Signals from Csound during performance
I think they're called invalue and outvalue? 

On Fri 2 Nov 2018, 13:21 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hmm, I'm trying chano and chnclear to see if either of them trigger the callback... Nothing yet... Also, the callback function takes a char* for channel name, which would appear to make sense with the chn opcodes rather than the chani/chano opcodes. Are there other channel opcodes I've not found?

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 14:41
FromRory Walsh
SubjectRe: [Csnd] Signals from Csound during performance

On Fri 2 Nov 2018, 14:40 Rory Walsh <rorywalsh@ear.ie wrote:
I think they're called invalue and outvalue? 

On Fri 2 Nov 2018, 13:21 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hmm, I'm trying chano and chnclear to see if either of them trigger the callback... Nothing yet... Also, the callback function takes a char* for channel name, which would appear to make sense with the chn opcodes rather than the chani/chano opcodes. Are there other channel opcodes I've not found?

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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

Date2018-11-02 14:52
FromPeter Burgess
SubjectRe: [Csnd] Signals from Csound during performance
Aha, ok thanks. I was reading this the other day when trying to figure it out but missed the fact it tells you which opcodes are related to callbacks and which aren't. Thanks you once again! 5th time lucky! Haha

On Fri, 2 Nov 2018, 14:41 Rory Walsh <rorywalsh@ear.ie wrote:

On Fri 2 Nov 2018, 14:40 Rory Walsh <rorywalsh@ear.ie wrote:
I think they're called invalue and outvalue? 

On Fri 2 Nov 2018, 13:21 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hmm, I'm trying chano and chnclear to see if either of them trigger the callback... Nothing yet... Also, the callback function takes a char* for channel name, which would appear to make sense with the chn opcodes rather than the chani/chano opcodes. Are there other channel opcodes I've not found?

On Fri, 2 Nov 2018, 08:04 Rory Walsh <rorywalsh@ear.ie wrote:
Use the other channel opcodes for this. Can't recall their names but chnset/get don't work with callbacks.

On Thu 1 Nov 2018, 22:57 Peter Burgess <pete.soundtechnician@gmail.com wrote:
Hi guys, I'm close to solving this now I'm sure. I'm setting my callback function using:

csound->SetOutputChannelCallback()

Then I have a Csound instrument defined as such:

instr Callback
chnset 1, "Callback"
endin

Ive got the score entry that calls the callback in my score, and I've set a breakpoint on my callback function to see... It's not triggering yet. Is chnset the correct opcode for this? Or is the callback I've set correct?

On 30 Oct 2018 21:31, "Peter Burgess" <pete.soundtechnician@gmail.com> wrote:
Thanks both of you! I've got Csound accepting my callbacks now. I'll have a fiddle with them and see if I can get it to do what I want. I think outputChannelCallback should work for the first task... Is there also a specific end of performance callback? I'm about to try SetRtcloseCallback but no idea if that does what I hope it might.

On Tue, 30 Oct 2018, 21:22 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Actually that would play hell with the callback setter function wrappers wouldn't it...

On Tue, 30 Oct 2018, 21:20 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Ok, I see the problem. The C++ API takes the wrapped CSOUND object instead of the Csound wrapper. Out of interest, what was the reasoning behind doing it this way instead of taking Csound* in the C++ API and calling Csound::GetCsound() in the wrapper functions instead?

On Tue, 30 Oct 2018, 20:36 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thank Rory, I'm looking into them now. I'm struggling with the first parameter of these callbsck functions. I'm trying to pasdy Csound* pointer, and it tells me it needs a CSOUND* pointer. Is this the C API equivalent of my c++ Csound object?

Errors are of the form:

cannot initialise a parameter of type void(*)(CSOUND *) with an lvalue of type void(*)(Csound *)

On Tue, 30 Oct 2018, 19:57 Rory Walsh, <rorywalsh@ear.ie> wrote:
Use the channel callback methods then. I can't recall their name but they should do the trick. 

On Tue 30 Oct 2018, 19:13 Peter Burgess, <pete.soundtechnician@gmail.com> wrote:
Thanks for the reply Steven. Is there a way I can do this with a signal or callback instead to save my app constantly monitoring whether a channel has changed? I need pretty serious precision without the overhead of a constant monitor loop in it's own thread if I can help it. I only expect this to happen once very near the end of performance so it would be a waste to keep this going throughout the performance.

Pete

On Tue, 30 Oct 2018, 13:55 Steven Yi, <stevenyi@gmail.com> wrote:
You might use and audio rate channel to get audio signals and a k-rate
channel to signal from Csound when to grab sound. For example, your
host code might do something like:

(pseudo-code)

if(csoundGetControlChannel('shouldRecord') == 1) {
  let left= csoundGetAudioChannel("audio0");
  let right = csoundGetAudioChannel("audio1");
  .. do something ...
}


On Tue, Oct 30, 2018 at 9:19 AM Peter Burgess
<pete.soundtechnician@gmail.com> wrote:
>
> Hi there. I've been going through the API docs trying to figure out how I can get signals from Csound at certain points in a performance. The situation specifically I want is when it reaches the end of the actual score, but not when it's reached the end of performance in case of reverb tails and the like (though I probably will want that signal as well eventually). Is this something I can do from the API via one of the callbacks alone or do I need to include something in the orchestra/score to get a message at the exact time I want?
>
> What I've found so far is:
>
> SetCsoundCallback
> SetRtcloseCallback
> perfThread->SetProcessCallback
> 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
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