| I have been struggling with both turnoff and turnoff2 recently.
I was using turnoff2 much the same as you are but with with turnon
instead of scheduel, and for some reason it sounded like it highpass
filtered whichever instrument was being turned on. Weird...
My interpretation of the turnoff was also that it needs to be started
from nstance in order to store the handle. My issue here was that
nstance didn't actually seem to save any info to the handle, and so
turnoff could never turn it off. MY setup for nstance / turnoff was
much like yours. I initialised a giHandle to 0 before starting (to
store the instance handle to), and I printed the value of giHandle
every time I called the instrument. giHandle always remained at 0.
In your turnoff example above, you don't show the initialising of
gi15. I feel silly for asking you, but have you just omitted that from
your example or are you not initialising it? One thought I had was
that you might need a separate instrument to make the first call to
nstance without a prior call to turnoff, maybe calling turnoff without
an instance to refer to bugs it out in some way?
Pete
On Mon, Mar 14, 2016 at 9:10 PM, Victor Lazzarini
wrote:
> I will have a look tomorrow at my computer, but I would have thought you could use schedule with negative p3 to turn it off and then schedule again to turn it on in the future.
>
> Victor Lazzarini
> Dean of Arts, Celtic Studies, and Philosophy
> Maynooth University
> Ireland
>
>> On 14 Mar 2016, at 20:47, jpff wrote:
>>
>> I want/need to have an instrument that at i-time turns off instr 15
>> and then schedules i15 for a little in the future
>>
>> turnoff2 works at perf time ad schedule is OK for the second part but
>> how do I turn off i15 at i-time? turnoff looks useful but the manual
>> is unclear (to me). It looks as if I need to start i15 via nstance?
>> is that correct? I would love an example
>>
>> I have tried
>> instr 7
>> turnoff2 15, 0, 0
>> schedule 2, 0.5, $LEN, 1, $LEN
>> endin
>>
>> which fails
>>
>> and
>> instr 7
>> turnoff gi15
>> gi15 nstance 15, 0.3, 36000, 1, $LEN
>> endin
>> which complains with
>> new alloc for instr 7:
>> WARNING: instance not valid
>>
>> Any help welcome -- I do not usually work in real time
>> ==John ffitch
>>
>> 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
|