[Csnd] Opcodes to run at ktime, but only when called
Date | 2020-03-25 22:42 |
From | Syl Morrison |
Subject | [Csnd] Opcodes to run at ktime, but only when called |
Hi all, so in a similar vein to my v dumb question yesterday, I'm up and running modifying the fluidOpcodes.cpp file. So what I'd like to do here is, when my opcode gets called, call fluid_synth_sfunload on the selected fluidEngine (which I retrieve using the toa function). The thing is, I want this to happen whenever I call the opcode, but ONLY once, is there a procedure for this?
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
Cheers, sorry for spam friends |
Date | 2020-03-26 01:02 |
From | John ff |
Subject | Re: [Csnd] Opcodes to run at ktime, but only when called |
Set a flag in the init code, flag in the p structure , and test it in perf function. Happens in many places. Sent from TypeApp On Mar 25, 2020, 22:44, at 22:44, Syl Morrison |
Date | 2020-03-26 05:46 |
From | Syl Morrison |
Subject | Re: [Csnd] Opcodes to run at ktime, but only when called |
Sorry what do you mean by a flag? On Thu, 26 Mar 2020, 01:02 John ff, <jpff@codemist.co.uk> wrote: Set a flag in the init code, flag in the p structure , and test it in perf function. Happens in many places. |
Date | 2020-03-26 09:41 |
From | Rory Walsh |
Subject | Re: [Csnd] Opcodes to run at ktime, but only when called |
I think by flag John simply means a variable that you add to your struct. Once you have called unload() set the unload flag to true to prevent the unload() function from being called again. On Thu, 26 Mar 2020 at 05:46, Syl Morrison <honoonu@gmail.com> wrote:
|
Date | 2020-03-26 13:00 |
From | John ff |
Subject | Re: [Csnd] Opcodes to run at ktime, but only when called |
Quite! When I get to a computer I will point at the sort of code I mean. Sent from TypeApp On Mar 26, 2020, 09:43, at 09:43, Rory Walsh |
Date | 2020-03-26 18:00 |
From | Syl Morrison |
Subject | Re: [Csnd] Opcodes to run at ktime, but only when called |
AH that's really clever thank you so much will try this now! On Thu, Mar 26, 2020 at 1:01 PM John ff <jpff@codemist.co.uk> wrote: Quite! When I get to a computer I will point at the sort of code I mean. |