mtytel / helm

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

Controllers sometimes reset on solo (1-voice) #217

Open Woffelson opened 5 years ago

Woffelson commented 5 years ago

I think I found a bug on Helm synthesizer that affects controllers at least on solo settings (1-voice). Controllers won't affect in a following case: for example when I'm holding some key (let's say A), pressing another key (B) and then releasing (B) so the original key (A) should take place again. However, this time controllers are no longer modulating the original key (A). What I tested, this is concerning at least pitch bend/wheel and modulation wheel. But since pitch bend locates outside "keyboard mod" in GUI, I'm assuming this bug affects controllers universally.

Also 1-voice solo behaves a bit oddly on regular playing as well. If I'm playing multiple notes without releasing and then releasing the last note I've played, it now plays the first note of the played pattern (not the second last that is usually played by synths in this case). This might be related to the controller issue.

(I already sent e-mail about this without then realizing the existence of github page... oh, whatever. Sorry about overlapping.)

EDIT: Hmm, now the controllers seem working after I restarted, weird. At the moment I can't reproduce the problem. Only some minor controller issues appear if I change my keyboard's MIDI channels while using wheels etc. but nothing serious.

Update (2.1.2019): Not working again, and restarting doesn't help either. However, when I switched my keyboard's default MIDI channel from 2 to anything else (or even back to 2) then the controller bug disappears. Or if I set my keyboard's default MIDI channel to 1, then the Helm's controllers are working right away on startup without tinkering with MIDI channels. So, it seems that Helm is assuming MIDI channel coming from 1 at first but adapts itself after I switch the MIDI channel I play on.

My setup is Ubuntu Studio 16.04 and I use both ALSA and JACK hosts for audio.

riban-bw commented 2 years ago

@Woffelson cool catch with the channel 1 behaviour. I came here to report the issue with pitch bend not asserting on held notes when others released in monophonic mode. Using MIDI channel 1 is a possible work around.

riban-bw commented 2 years ago

VoiceEvent VoiceHandler::noteOff() calls new_voice->activate() without passing the channel hence default channel 0 (MIDI channel 1) is used so channel pitch bend is only applied for channel 1. I can't yet see whether the previous note MIDI channel is stored anywhere to use in the note off handler. [Edit] Channel is a parameter of the voices so was able to use this to correct this behaviour. I have submitted a PR but it looks like development / maintenance of Helm may have ceased many years ago so not confident this will get applied.