release

release — Indicates whether a note is in its release stage.

Description

Provides a way of knowing when a note off message for the current note is received. Only a noteoff message with the same MIDI note number as the one which triggered the note will be reported by release.

Syntax

kflag release

Performance

kflag -- indicates whether the note is in its release stage. (1 if a note off is received, otherwise 0)

release outputs current note state. If current note is in the release stage (i.e. if its duration has been extended with xtratim opcode and if it has only just deactivated), then the kflag output argument is set to 1. Otherwise (in sustain stage of current note), kflag is set to 0.

This opcode is useful for implementing complex release-oriented envelopes. When used in conjunction with xtratim it can provide an alternative to the hard-coded behaviour of the "r" opcodes (linsegr, expsegr et al), where release time is set to the longest time specified in the active instrument.

Examples

See the examples for xtratim.

See Also

xtratim

Credits

Author: Gabriel Maldonado
Italy

New in Csound version 3.47