lastcycleReal-time MIDI:Event Extenderslastcyclelastcycle
Indicates whether an event is in its last performance cycle.
Description
Provides a way of knowing if an event is in its last performance cycle. Whether an event has a finite duration (p3 > 0)
or a note is extended via a time extending opcode (like linsegr or xtratim), this opcode returns 1
if the event is currently at its last k-cycle. The only sitatuation where lastcycle does not detect that the event
will not run for another cycle is when the note is turned off by another event (using turnoff2) and is not given
the possibility of running through its release stage (using turnoff2 instrnum, imode, 0)
Syntaxkflag lastcyclePerformancekflag -- indicates whether the note is in its last cycle. (1 if this the last cycle, otherwise 0)
This opcode is useful for performing cleanup actions, signaling to other events that this event is finishing, etc. It works only at performance time.
Examples
Here is an example of the lastcycle opcode. It uses the file lastcycle.csd.
Example of the lastcycle opcode.See alsoEvent ExtendersCreditsBy: &nameeduardo; 2020New in Csound version 6.14 (2020)