getinstance
Returns a reference to the current instrument instance.
Syntax
Initialization
self refers to the instrument instance containing the call. No new instance is created. Within an instrument, the built-in read-only variable this refers to the same instance.
Use the reference with operations such as isactive, isreleasing or splice. It refers to this particular note, even if other notes use the same instrument definition.
The reference does not extend the note's lifetime. Keep its use within that lifetime, and let Csound manage the current note's cleanup. For the instrument definition, use the built-in read-only variable this_instr, which has type InstrDef.
Examples
The controller obtains its own reference with getinstance and checks its state before starting performance. It uses instance-controls.csd.
See also
isactive, isreleasing, splice, Instrument definitions, instances and opcode objects
Credits
Author Victor Lazzarini.
New in Csound 7.