> Your simplification works, and so does your second solution (the one with > k_have_trigger == 0 && ktr != 0) with no noticeable difference. However, > replacing > > > k_have_trigger == 0 && ktr != 0 > > with > > > k_have_trigger = k_have_trigger | ktr > > will constantly retrigger whatever MIDI note is being sent out, and the > velocity will correspond to the amplitude, like the aftertouch controller. > However, there also seems to be constant velocity put out simultaneously. The replacement is not in the test of `if' but k_have_trigger = k_have_trigger | ktr instead of if (k_have_trigger == 0 && ktr != 0) then k_have_trigger = 1 endif it is only for brevity because it seems insignificant for the performance. I think that the combination `iupdte = 0.001' and `ifrqs = 120' is not good for your case. You can also try `mediank' with koct and kamp. Another test is to use `spectrum' + [`specfilt' and/or `specscal'] + `specptrk' (perhaps kvar is useful, see the example in `specptrk' man page). tito