I tried to access the event properties generated by the pattern’s play function, when the pattern has not provided it explicitly. For example \note
, generated based on degree, scale, …
(
~pE=nil;
~pat=Pbind(
\dur, 1,
\degree, 0,
\callback, {|evt| ~pE=evt;}.inEnvir,
).play;
)
// OK
~pE.freq.value;
~pE.delta.value;
~pE.sustain.value;
// KO
~pE.note.value;
~pE.midinote.value;
There is this workaround, but it ain’t neat (and I suspect some issues with those functions):
~pE[\freqToNote].value(~pE,~pE.freq.value);
What is easiest way to get the \note from a generated event ?