Midi Fighter 64 Note+CC Explanation

May 1st, 2021 (edited)
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Background info:
  2. In Ableton Live, there exists a MIDI mapping feature that can be incredibly useful in live performances. If the user maps a MIDI note message to a parameter, the mapping will be a toggle — pressing and releasing a button that sends a MIDI Note On message once will set the parameter to 127, and pressing that same button and sending a second MIDI Note On message will set the parameter back to zero. If, however, the user maps a MIDI control change message to the parameter, the mapping is momentary — pressing and holding a button that sends a MIDI CC value of 127 sets the parameter to 127, and letting go of that button sends a MIDI CC value of zero, which sets the parameter to zero.
  4. The Midi Fighter 3D has a very unique and extremely handy mode called Notes+CC Mode (aka Ableton Mode) that allows the user to use any button as a toggle control or a momentary control. When set to this mode, every button on the Midi Fighter sends both a MIDI Note message and a CC messages on a separate MIDI channel. When the CC messages is sent first, and on a different MIDI channel, Ableton Live interprets this in an interesting way. When assigning a MIDI mapping, holding the button and exiting the MIDI mapping mode will assign a CC mapping to the mapped parameter, so the parameter will only be active when the Midi Fighter button is held. If, when assigning a MIDI mapping, the user presses the button and lets go of it before exiting the MIDI mapping mode, a Note message will instead be assigned, and the parameter will now toggle on and off when the button is pressed multiple times.
  6. ----------------------------------------------------------------------------------------------------------------------------------
  8. The problem with the Midi Fighter 64 Note+CC Mode:
  9. However, this behavior only works when the CC message is sent first. For unknown reasons, when designing the Midi Fighter 64 firmware, the order of these messages was swapped, and the CC messages and note messages were made to be sent on the same channel. When a button is pressed on the 3D, a CC message on MIDI channel 4 is sent, then a note message is sent on MIDI channel 3. On the contrary, when a button on the 64 is pressed, a note message is sent on channel 3, followed by a CC message on channel 3. This makes the Note+CC trick no longer work in Live; the behavior is very inconsistent and assigning a momentary mapping is difficult, if not impossible, to achieve. That's where this script comes in.
  11. -----------------------------------------------------------------------------------------------------------------------------------
  13. How the script works:
  14. When the Bome MIDI Translator script is active, when a button is pressed and the initial note on message is received, the message is swallowed and replaced with a CC message with a value of 127 on the same MIDI # and on one channel higher. When the initial CC message with a value of 127 is received from the Midi Fighter, the message is swallowed and replaced with a MIDI note on message on the same MIDI # and with the same channel as the original MIDI note on message. The same is done when the button is released — the note off message is converted to a CC message with a value of 0 on the next channel, and the CC value 0 message that follows is converted into a note off on the original note on channel. By updating the CC channel and swapping the order of the note and CC messages by turning notes into CCs and vice versa, the intended functionality of the Note+CC mode is restored. Further details can be found commented inside of the file.
RAW Paste Data