Midi switch events stopped working in 1.11

Bug #995652 reported by Owen Williams
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mixxx
Fix Released
High
Owen Williams

Bug Description

Midi switch events (controlpushbuttons) only respond to the NOTE_ON status, so there was some code in Mixxx that converted all midi events for switches into NOTE_ON. This code was stripped in the midi rewrite. Because of this, my switches stopped working. This patch restores the old behavior.

Related branches

Revision history for this message
Owen Williams (ywwg) wrote :
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

I can confirm the logic was dropped.

It looks like the old code also did this for MIDI_OPT_BUTTON. Should we do this for options.button as well?

Sean, can you comment as well? Was there a particular reason you dropped the logic or just an oversight?

Changed in mixxx:
assignee: nobody → Owen Williams (ywwg)
status: New → Confirmed
status: Confirmed → In Progress
Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

A little bit of both. I had initially removed sending MIDI status to COs because I didn't see it being used. But that has since been restored since ControlPushButton does indeed need it. However, the comment from the old code is (no longer) accurate since ControlPushButton does check for NOTE_OFF as well. So I'm not sure of the best way to fix this without breaking the toggle or the new power-window functionality.

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Perhaps making appropriate changes in ControlPushButton is the best, since forcing the status to ON when it's not seems like a hack.

Revision history for this message
Owen Williams (ywwg) wrote :

My controller is sending MIDI_CC events, so I never understood why controlpushbutton required NOTE events in the first place

Revision history for this message
RJ Skerry-Ryan (rryan) wrote : Re: [Bug 995652] Re: Midi switch events stopped working in 1.11

It's true that without a corresponding NOTE_OFF the power-window logic in
CPB will be confused.

Owen -- what controls do you normally bind this to? Can you paste some of
the CC messages your controller sends when you hit the button?

The switch/button midi-status is explicitly telling Mixxx to interpret
incoming commands from this MIDI message as a button/switch. We shouldn't
add the logic to CPB since at that point it won't know that the
switch/button midi-option was set and I think it's a bigger hack to treat
CC commands as buttons in the general case.

On Fri, May 11, 2012 at 10:11 AM, Owen Williams <email address hidden> wrote:

> My controller is sending MIDI_CC events, so I never understood why
> controlpushbutton required NOTE events in the first place
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/995652
>
> Title:
> Midi switch events stopped working in 1.11
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/995652/+subscriptions
>

Revision history for this message
Sean M. Pappalardo (pegasus-renegadetech) wrote :

Yeah CCs on buttons is rare and is best handled with script. (If we later find that it's not so rare, we can add another <option> to handle that special case.)

So please post a few messages the controller sends when you press and release a couple buttons.

Revision history for this message
Owen Williams (ywwg) wrote :

OK I have to wait until I get home. This is a KORG nanoKontrol which is fairly popular. Until I actually get the debug output, I believe it's sending messages identical to NOTE_ON/NOTE_OFF messages, except that they used CC. (I think it sends velocity 127 and 0 on button push)

Simply converting CC to NOTE_ON always worked, at least.

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

To be clear, the midi-option codes are by definition hacks to put special
interpretations on incoming midi-messages so IMO there's no problem trying
to massage an incoming CC message into a 'button-like' message if the
button/switch midi-status is set. If the CC message velocity is 127 for on
and 0 for off then we should convert CC, v127 to NOTE_ON and CC, v0 to
NOTE_OFF and it sounds like it would work fine.

On Fri, May 11, 2012 at 11:40 AM, Owen Williams <email address hidden> wrote:

> OK I have to wait until I get home. This is a KORG nanoKontrol which is
> fairly popular. Until I actually get the debug output, I believe it's
> sending messages identical to NOTE_ON/NOTE_OFF messages, except that
> they used CC. (I think it sends velocity 127 and 0 on button push)
>
> Simply converting CC to NOTE_ON always worked, at least.
>
> --
> You received this bug notification because you are a member of Mixxx
> Development Team, which is subscribed to Mixxx.
> https://bugs.launchpad.net/bugs/995652
>
> Title:
> Midi switch events stopped working in 1.11
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/mixxx/+bug/995652/+subscriptions
>

Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Looks like this is serious since it breaks all sorts of MIDI scripts in the wild.

Changed in mixxx:
importance: Medium → High
Revision history for this message
RJ Skerry-Ryan (rryan) wrote :

Patch committed restoring 1.10.x behavior. Thanks Owen!

Changed in mixxx:
status: In Progress → Fix Committed
RJ Skerry-Ryan (rryan)
Changed in mixxx:
status: Fix Committed → Fix Released
Revision history for this message
Swiftb0y (swiftb0y) wrote :

Mixxx now uses GitHub for bug tracking. This bug has been migrated to:
https://github.com/mixxxdj/mixxx/issues/6401

lock status: Metadata changes locked and limited to project staff
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.