surge-synthesizer / surge

Synthesizer plug-in (previously released as Vember Audio Surge)
https://surge-synthesizer.github.io/
GNU General Public License v3.0
3.01k stars 385 forks source link

The virtual keyboard causes the notes E and F to be triggered #7604

Open eigenvoid opened 2 months ago

eigenvoid commented 2 months ago

Bug Description: When the virtual keyboard is enabled, sometimes the notes E and F play and remain triggered until I press stop in the DAW transport.

Surge XT Version

Reproduction Steps: Steps to reproduce the behavior:

  1. Open Surge XT with the virtual keyboard on
  2. Click on the Surge window to make sure it's fully focused
  3. Play any note with the computer keyboard
  4. E and F will also be triggered, at the same octave as Surge is currently set to

Expected Behavior: No unwanted notes should play.

Screenshots: Screenshot_20240410_021951

Computer Information (please complete the following!):

mkruselj commented 2 months ago

This is a Renoise thing, we've had a report on this already. Disable Renoise's virtual keyboard or Surge's, you shouldn't have both enabled at the same time.

I cannot get this behavior in standalone.

eigenvoid commented 2 months ago

Yeah, but it also happens in Reaper, and I just tried in on the Bitwig demo, and it happens there too. So, this issue isn't caused by any particular DAW.

Also, this doesn't happen in other plugins with virtual keyboards, such as Vital.

I just tried the Windows version of Surge in Renoise using yabridge, and it didn't happen there, so I think this might be a Linux issue.

baconpaul commented 2 months ago

Do you have a non-standard keyboard map or some such?

I wonder if our extended keyboard handling is picking up a key code on arch with your setup.

eigenvoid commented 2 months ago

The only non-standard keyboard map I have is "English (intl., with AltGr dead keys)"

However, switching to the default "English (US)" doesn't fix it, and actually makes it so that F# gets triggered in addition to E and F.

I also tried it on Wayland, thinking it might be an X11 issue, but it's the same.

mkruselj commented 2 months ago

Def sounds like Arch related issue.

erroreyes commented 2 months ago

I've been able to reproduce this in the period of 5 minutes of testing. It doesn't happen all the time, but often enough to see it as a problem.

In standalone with Virtual Keyboard on, I switch focus to some random window and then back to Surge XT; 1/3 of the time nothing happens and I can play it with computer keyboard; another 1/3 the F in the current octave is triggered and is stuck when I play the computer keyboard, sometime another F an octave higher is also triggered and held; and the last 1/3 an F and sometimes an F an octave up play and get stuck as soon as I switch focus back to SurgeXT.

This is only tested with v1.3.1.4b53827 standalone, Kubuntu 23.10, Plasma 5.27.8, KWin.

My keyboard is standard using the US layout, and the only thing weird going on is that I turned Caps Lock into a third Ctrl key.

baconpaul commented 2 months ago

OK great. So sounds like 'something' is wrong with our keyboard handling on linux.

i wonder if its the extended key keyboard mask.

Will add to list!

LoipesMas commented 2 weeks ago

I've also run into this issue (and it's pretty annoying). I'm on NixOS with Hyprland (which means Wayland). However, I've noticed that it mostly happens when changing octaves. Sometimes Surge gets into a state where (almost) every octave change (through the Virtual Keyboard: Octave Down (or Up) keybind) results in the E and F notes being triggered and held. Within some octave range it only happens when going down an octave. And then going up an octave clears those keys. I even tried rebinding those keys to , and ., but it's exactly the same. And it seems somehow related to losing/gaining focus.

Since those E and F notes are in an overlap (i.e. they can be reached from two octaves), I wonder if that's related to this issue.

If you need any additional testing I'll gladly volunteer!