envstate

works only inside a polyphonic sub-patch. routes note and velocity to a specific voice, and gives feedback to the 'mother-object' about the current playback state of that voice. inlet 'envstate' provides 'polyhandler slave' with information about the state of a release-envelope if there is one. otherwise ,'polyhandler slave' will work without
Author: robert schirmer
License: BSD
Github: rbrt/poly/envstate.axo

Inlets

frac32.positive envstate

int32.positive note

Outlets

None

Attributes

objref statemap

Declaration
uint8_t index;
uint8_t pren;
Init
index = parent->polyIndex;
pren = 0;
Control Rate
if (inlet_note != pren) {
  attr_statemap.array[pren] = 0;
  pren = inlet_note;
}

else
  attr_statemap.array[inlet_note] = inlet_envstate >> attr_statemap.GAIN;

Privacy

© 2024 Zrna Research