xtratimReal-time MIDI:Event Extendersxtratimxtratim
Extend the duration of real-time generated events.
Description
Extend the duration of real-time generated events and handle their extra life (Usually for usage along with release instead of linenr, linsegr, etc).
Syntaxxtratim iextradurInitializationiextradur -- additional duration of current instrument instance
Performancextratim extends current MIDI-activated note duration by iextradur seconds after the corresponding noteoff message has deactivated the current note itself. It is usually used in conjunction with release. This opcode has no output arguments.
This opcode is useful for implementing complex release-oriented envelopes, whose duration is not known when the envelope starts (e.g. for real-time MIDI generated events).
Examples
Here is a simple example of the xtratim opcode. It uses the file xtratim.csd.
Example of the xtratim opcode.See the sections Real-time Audio and Command Line Flags for more information on using command line flags.This example shows how to generate a release segment for an ADSR envelope after a MIDI noteoff is received, extending the duration with xtratim and using release to check whether the note is on the release phase.
Here is a more elaborate example of the xtratim opcode. It uses the file xtratim-2.csd.
More complex example of the xtratim opcode.This example shows how to generate a release segment for an ADSR envelope after a MIDI noteoff is received, extending the duration with xtratim and using release to check whether the note is on the release phase. Two envelopes are generated simultaneously for the left and right channels.See Alsolinenr,
releaseCreditsAuthor: &namegabriel;ItalyExamples by Gabriel Maldonado and Jonathan MurphyNew in Csound version 3.47