cpyarger / obs-midi

Use MIDI devices to trigger events in OBS and vice versa
https://obs-midi.org
GNU General Public License v2.0
168 stars 20 forks source link

Button triggers twice on Novation Launchpad Mk2 #100

Closed Shorts1999 closed 3 years ago

Shorts1999 commented 3 years ago

Platform

Operating system and version: Windows 10 (version 2004) OBS Studio version: 26.1.1 Obs-midi version 0.9.3 Alpha-3.3 Release

Expected Behavior

When I press the button it should do the action, the release of the button should do no action

Current Behavior

I set a change on the press of a pad on the Launchpad Mk2, if I press it it triggers the action, but when I let go it triggers it again. For example: I set it to toggle my camera visibility, if I press it down it will hide, when I let go it shows it again, so it doesn't work as a toggle properly.

I think the cause would be this: When setting to "listen many" I can see that both press and release of a button send a "Note ON" on the same Note/control, with the difference being that a press has "value 127" and a release has "value 0" So both are seen as a Note On and thus trigger the action

Steps to Reproduce

  1. plug in controller
  2. bind key in Obs-midi
  3. press down the key and then release

Additional information

cpyarger commented 3 years ago

Release should be a note off. I'd personally take a look at if you can remap the buttons, to have a toggle mode instead of a momentary one.

cpyarger commented 3 years ago

The current event filtering is based primarily on the message type, so note on, note off and control change, so if it's seeing the same type, channel, and NorC (Note or Control) then it's going to trigger, I don't include value in that filtering.

Shorts1999 commented 3 years ago

I see, I'll look into if it's configurable to change it to a note off on release. However then as an added feature would it be possible to have the option to take the value in as a parameter? Might be an interesting thing to experiment with.

Anyway, thanks for the quick reply!

Shorts1999 commented 3 years ago

Looked through the manual of the launchpad and it seems to be hard coded in and thus non-configurable to change to a "note off" instead of a note on with 0 velocity. So I guess this should then be changed to a feature request instead of a bug ;)

cpyarger commented 3 years ago

About to push a release that will fix this Fixed in f0f2bbc9d56fcf307e170a20a2303074074e01cc