pedrolcl / VMPK

Virtual MIDI Piano Keyboard (Mirror)
https://sourceforge.net/projects/vmpk/
GNU General Public License v3.0
36 stars 6 forks source link

Sending the MIDI reset doesn't reset all controllers in the UI #21

Closed pedrolcl closed 9 months ago

pedrolcl commented 10 months ago

SF ticket 90

Manually added extra controllers aren't reset when pressing the Reset button.

The Volume controller doesn't reset on first button click but on the second. When the keep consistency option is set it seems to reset at the first click.

The selected instrument isn't reset either.

Created by @berarma

pedrolcl commented 10 months ago

The MIDI 1.0 Specifications defines the "Reset All Controllers" MIDI message:

When a device receives the Reset All Controllers message (121), it should reset the condition of all its controllers (continuous and switch controllers, pitch bend, and pressures) to what it considers an ideal initial state (Mod wheel to 0, Pitch Bend to center, etc.). Reception follows the same rules as All Notes Off — Ignore if Omni is On . Sequencers that wish to implement Reset All Controllers, but want to accommodate devices that do not implement this command, should send what they believe to be the initial state of all controllers first, followed by this message. Devices that respond to this message will end up in their preferred state, while those that do not will still be in the sequencer's chosen initialized state.

The above definition is not detailed, but there is another document, Recommended Practice (RP-015) providing more information:

berarma commented 10 months ago

I wasn't aware of the best practices when creating this ticket. The extra controllers I was testing shouldn't be reset so it's working well there. Other controllers seem to reset correctly.

Except the volume and also pan which are being reset when they shouldn't, in theory. We can't know if the commanded device is following best practices.

Thanks for looking into it.

pedrolcl commented 10 months ago

Another source (the MIDI Brainwashing center) says:

That source was the only freely available MIDI specifications before the MIDI Association was opened.

Roland didn't follow the recommended practice in some products, like the JV-80 (p.200):

image

berarma commented 10 months ago

That was the information I was handling at first. For newer devices/softsynths I would expect them to follow the newest document.

Anyway, the weirdest thing is that the controls are reset only the second time the button is pressed. I've also noticed that toggling the keep consistency option without restarting the application changes the outcome.

pedrolcl commented 10 months ago

Anyway, the weirdest thing is that the controls are reset only the second time the button is pressed.

This has been fixed in commit 0d7698e