a = MIDINoteGate.kr(...);
x = HPZ1.kr(a) < 0
if you want to find out the time difference between the note on and the note off,
you can do this:
(
{
var a, dt;
//a = LFPulse.kr(0.51,0.3);
a = MIDINoteGate.kr(...);
x = HPZ1.kr(a) < 0;
Sequencer.kr({ dt = thisSynth.time }, x);
Sequencer.kr({ (thisSynth.time - dt).postln }, a>0);
}.play;
)
.
/*authors so far: jrh */ |
HPZ1 will measure the difference between two adjacent samples in the audio stream. so if the level drops it will output a negative value. something 0 outputs 0.0 if the something is 0 or larger, if it drops below zero it will output 1.0. |