Implement Midi Channel select as stringlist, add midi input filter

This commit is contained in:
Jan-Henrik 2020-02-23 02:40:43 +01:00
parent 6e04536dd8
commit 6ecc160c8b
2 changed files with 10 additions and 3 deletions

View file

@ -3,13 +3,18 @@
#include "../menu/menu_items.h" #include "../menu/menu_items.h"
#include <u8g2.h> #include <u8g2.h>
static const char* kVoiceDetailStrings[] = {"S", "M", "L", "XL"}; static const char* kVoiceDetailStrings[] = { "S", "M", "L", "XL" };
static const char* kMidiChannelStrings[] = { "omni", "1", "2", "3", "4", "5", "6",
"7", "8", "9", "10", "11", "12", "13",
"14", "15", "16" };
static const char* kMidiInputStrings[] = { "omni", "usb", "midi" };
PartMenu::PartMenu() PartMenu::PartMenu()
: item_voice_count("voice count", 1, 1, 4, 1) : item_voice_count("voice count", 1, 1, 4, 1)
, item_voice_detail("voice detail", 0, kVoiceDetailStrings, 4) , item_voice_detail("voice detail", 0, kVoiceDetailStrings, 4)
, item_midi_filter_enabled("MIDI filter", 1, "on", "off") , item_midi_filter_enabled("MIDI filter", 1, "on", "off")
, item_midi_channel("MIDI channel", 0, 0, 16, 1) , item_midi_channel("MIDI channel", 0, kMidiChannelStrings, 17)
, item_midi_input("MIDI input", 0, kMidiInputStrings, 3)
, item_midi_lowest_note("MIDI lowest", 0) , item_midi_lowest_note("MIDI lowest", 0)
, item_midi_highest_note("MIDI highest", 127) , item_midi_highest_note("MIDI highest", 127)
{ {
@ -17,6 +22,7 @@ PartMenu::PartMenu()
this->menu.add_item(&this->item_voice_detail); this->menu.add_item(&this->item_voice_detail);
this->menu.add_item(&this->item_midi_filter_enabled); this->menu.add_item(&this->item_midi_filter_enabled);
this->menu.add_item(&this->item_midi_channel); this->menu.add_item(&this->item_midi_channel);
this->menu.add_item(&this->item_midi_input);
this->menu.add_item(&this->item_midi_lowest_note); this->menu.add_item(&this->item_midi_lowest_note);
this->menu.add_item(&this->item_midi_highest_note); this->menu.add_item(&this->item_midi_highest_note);
} }

View file

@ -20,7 +20,8 @@ class PartMenu {
UIntMenuItem item_voice_count; UIntMenuItem item_voice_count;
StringListMenuItem item_voice_detail; StringListMenuItem item_voice_detail;
BoolMenuItem item_midi_filter_enabled; BoolMenuItem item_midi_filter_enabled;
UIntMenuItem item_midi_channel; StringListMenuItem item_midi_channel;
StringListMenuItem item_midi_input;
MidiNoteMenuItem item_midi_lowest_note; MidiNoteMenuItem item_midi_lowest_note;
MidiNoteMenuItem item_midi_highest_note; MidiNoteMenuItem item_midi_highest_note;
}; };