[Csnd] Executing a statement during the last cycle of an instrument
| Date | 2011-12-28 15:46 |
| From | Alex Weiss |
| Subject | [Csnd] Executing a statement during the last cycle of an instrument |
Hi list,
What's the easiest way to have a certain branch only executed during
the last k-cycle of an instrument? The only thing I could think of is
keeping a k-rate counter in my instrument and comparing it against
p3*kr, but that seems a bit clunky. Basically, what I'd need is
something similar to the timout opcode but without the idur parameter,
so that the statement is executed exactly once. Is that even possible?
Thanks,
Alex
P.S. I'm aware that there are certain circumstances (in realtime
contexts) where it's impossible to tell when a note finishes, but in
my case all note durations are known in advance, if that helps.
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-12-28 16:10 |
| From | Tito Latini |
| Subject | Re: [Csnd] Executing a statement during the last cycle of an instrument |
| Attachments | None |
| Date | 2011-12-28 16:14 |
| From | Alex Weiss |
| Subject | Re: [Csnd] Executing a statement during the last cycle of an instrument |
Hey Tito I thought of that and for now I think I'll have to use it, but aren't there potential problems due to rounding issues? Thanks, Alex On Wed, Dec 28, 2011 at 5:10 PM, Tito Latini |
| Date | 2011-12-28 16:19 |
| From | Victor Lazzarini |
| Subject | Re: [Csnd] Executing a statement during the last cycle of an instrument |
Or you can try using a combination of the release and xtratim opcodes.
Victor
On 28 Dec 2011, at 16:10, Tito Latini wrote:
> A little idea
>
> timout 0, p3-1/kr, tito
> ...
> tito:
>
> On Wed, Dec 28, 2011 at 04:46:09PM +0100, Alex Weiss wrote:
>> Hi list,
>>
>> What's the easiest way to have a certain branch only executed during
>> the last k-cycle of an instrument? The only thing I could think of is
>> keeping a k-rate counter in my instrument and comparing it against
>> p3*kr, but that seems a bit clunky. Basically, what I'd need is
>> something similar to the timout opcode but without the idur parameter,
>> so that the statement is executed exactly once. Is that even possible?
>>
>> Thanks,
>>
>> Alex
>>
>> P.S. I'm aware that there are certain circumstances (in realtime
>> contexts) where it's impossible to tell when a note finishes, but in
>> my case all note durations are known in advance, if that helps.
>>
>>
>> Send bugs reports to the Sourceforge bug tracker
>> https://sourceforge.net/tracker/?group_id=81968&atid=564599
>> Discussions of bugs and features can be posted here
>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
>
> Send bugs reports to the Sourceforge bug tracker
> https://sourceforge.net/tracker/?group_id=81968&atid=564599
> Discussions of bugs and features can be posted here
> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
>
Dr Victor Lazzarini
Senior Lecturer
Dept. of Music
NUI Maynooth Ireland
tel.: +353 1 708 3545
Victor dot Lazzarini AT nuim dot ie
Send bugs reports to the Sourceforge bug tracker
https://sourceforge.net/tracker/?group_id=81968&atid=564599
Discussions of bugs and features can be posted here
To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound"
|
| Date | 2011-12-28 16:29 |
| From | Tito Latini |
| Subject | Re: [Csnd] Executing a statement during the last cycle of an instrument |
| Attachments | None |