mtytel / helm

Helm - a free polyphonic synth with lots of modulation
http://tytel.org/helm
GNU General Public License v3.0
2.34k stars 201 forks source link

Hanging notes at high arpeggiator speeds #279

Open martinfinke opened 3 years ago

martinfinke commented 3 years ago

The arpeggiator creates hanging notes at high speeds. In this line, if frequency is high, min_gate becomes > 1, and gate becomes > 1 as well. This can result in note_handler_->noteOff not getting called.

It seems that this can be fixed by limiting min_gate to be ≤ 1:

mopo_float min_gate = std::min((MIN_VOICE_TIME + VOICE_KILL_TIME) * frequency, 1.0);