Permalink
Browse files

Fix definitions of MIDI_CC_BANK_SELECT_MSB/LSB

Fixes #116
  • Loading branch information...
nickdowell committed Dec 31, 2017
1 parent c3a562f commit 84af4c3bbb14ef8250e3450792f701268b0047ac
Showing with 13 additions and 9 deletions.
  1. +3 −3 src/MidiController.cc
  2. +10 −6 src/midi.h
View
@@ -173,12 +173,12 @@ MidiController::controller_change(unsigned char cc, unsigned char value)
}
switch (cc) {
case MIDI_CC_BANK_SELECT_LSB: {
case MIDI_CC_BANK_SELECT_MSB: {
presetController->selectBank(value);
presetController->selectPreset(presetController->getCurrPresetNumber());
break;
}
case MIDI_CC_BANK_SELECT_MSB:
case MIDI_CC_BANK_SELECT_LSB:
break;
case MIDI_CC_PAN_MSB: {
// http://www.midi.org/techspecs/rp36.php
@@ -224,7 +224,7 @@ MidiController::controller_change(unsigned char cc, unsigned char value)
case MIDI_CC_MONO_MODE_ON:
case MIDI_CC_POLY_MODE_ON:
_handler->HandleMidiAllNotesOff();
case MIDI_CC_MODULATION_WHEEL:
case MIDI_CC_MODULATION_WHEEL_MSB:
default:
break;
}
View
@@ -34,13 +34,17 @@ enum {
MIDI_STATUS_PITCH_WHEEL = 0xE0,
};
/* https://www.midi.org/specifications/item/table-3-control-change-messages-data-bytes-2
*/
enum {
MIDI_CC_BANK_SELECT_LSB = 0x00,
MIDI_CC_MODULATION_WHEEL = 0x01,
MIDI_CC_DATA_ENTRY_MSB = 0x06,
MIDI_CC_PAN_MSB = 0x0A,
MIDI_CC_BANK_SELECT_MSB = 0x20,
MIDI_CC_DATA_ENTRY_LSB = 0x26,
MIDI_CC_BANK_SELECT_MSB = 0x00,
MIDI_CC_MODULATION_WHEEL_MSB = 0x01,
MIDI_CC_DATA_ENTRY_MSB = 0x06,
MIDI_CC_PAN_MSB = 0x0A,
MIDI_CC_BANK_SELECT_LSB = 0x20,
MIDI_CC_DATA_ENTRY_LSB = 0x26,
MIDI_CC_SUSTAIN_PEDAL = 0x40,
MIDI_CC_PORTAMENTO = 0x41,
MIDI_CC_SOSTENUTO = 0x42,

0 comments on commit 84af4c3

Please sign in to comment.