mirror of
				https://github.com/jhbruhn/eurorack.git
				synced 2025-10-30 02:46:01 +00:00 
			
		
		
		
	Add enum values to part, implement midi thru menu item
This commit is contained in:
		
							parent
							
								
									6ecc160c8b
								
							
						
					
					
						commit
						cb2dec87b9
					
				
					 3 changed files with 12 additions and 12 deletions
				
			
		|  | @ -5,18 +5,14 @@ | ||||||
| 
 | 
 | ||||||
| #define TOTAL_COLUMN_COUNT 4 | #define TOTAL_COLUMN_COUNT 4 | ||||||
| 
 | 
 | ||||||
| typedef enum { MIDI_THRU_OFF, | typedef enum { MIDI_THRU_OFF = 0, | ||||||
|   MIDI_THRU_ON, |   MIDI_THRU_ON = 1, | ||||||
|   MIDI_THRU_POLYCHAIN } MIDIThruMode_t; |   MIDI_THRU_POLYCHAIN = 2 } MIDIThruMode_t; | ||||||
| 
 | 
 | ||||||
| typedef enum { | typedef enum { | ||||||
|   BI_OFF = 0, |   BI_OFF = 0, | ||||||
|   BI_PITCH_UNI, |   BI_PITCH_UNI, | ||||||
|   BI_PITCH_BI, |   BI_PITCH_BI | ||||||
|   BI_SAWTOOTH, |  | ||||||
|   BI_SQUARE, |  | ||||||
|   BI_SINE, |  | ||||||
|   BI_TRIANGLE |  | ||||||
| } BiOutputType_t; | } BiOutputType_t; | ||||||
| 
 | 
 | ||||||
| typedef enum { | typedef enum { | ||||||
|  | @ -44,10 +40,10 @@ typedef enum { | ||||||
| } PartVoiceCount_t; | } PartVoiceCount_t; | ||||||
| 
 | 
 | ||||||
| typedef enum { | typedef enum { | ||||||
|   VOICE_DETAIL_S, |   VOICE_DETAIL_S = 0, | ||||||
|   VOICE_DETAIL_M, |   VOICE_DETAIL_M = 1, | ||||||
|   VOICE_DETAIL_L, |   VOICE_DETAIL_L = 2, | ||||||
|   VOICE_DETAIL_XL |   VOICE_DETAIL_XL = 3 | ||||||
| } PartVoiceDetail_t; | } PartVoiceDetail_t; | ||||||
| 
 | 
 | ||||||
| class Part { | class Part { | ||||||
|  |  | ||||||
|  | @ -8,6 +8,7 @@ static const char* kMidiChannelStrings[] = { "omni", "1", "2", "3", "4", "5", "6 | ||||||
|   "7", "8", "9", "10", "11", "12", "13", |   "7", "8", "9", "10", "11", "12", "13", | ||||||
|   "14", "15", "16" }; |   "14", "15", "16" }; | ||||||
| static const char* kMidiInputStrings[] = { "omni", "usb", "midi" }; | static const char* kMidiInputStrings[] = { "omni", "usb", "midi" }; | ||||||
|  | static const char* kMidiThruStrings[] = {"off", "on", "polychain"}; | ||||||
| 
 | 
 | ||||||
| PartMenu::PartMenu() | PartMenu::PartMenu() | ||||||
|     : item_voice_count("voice count", 1, 1, 4, 1) |     : item_voice_count("voice count", 1, 1, 4, 1) | ||||||
|  | @ -17,6 +18,7 @@ PartMenu::PartMenu() | ||||||
|     , item_midi_input("MIDI input", 0, kMidiInputStrings, 3) |     , 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) | ||||||
|  |     , item_midi_thru_mode("MIDI thru", 0, kMidiThruStrings, 3) | ||||||
| { | { | ||||||
|   this->menu.add_item(&this->item_voice_count); |   this->menu.add_item(&this->item_voice_count); | ||||||
|   this->menu.add_item(&this->item_voice_detail); |   this->menu.add_item(&this->item_voice_detail); | ||||||
|  | @ -25,6 +27,7 @@ PartMenu::PartMenu() | ||||||
|   this->menu.add_item(&this->item_midi_input); |   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); | ||||||
|  |   this->menu.add_item(&this->item_midi_thru_mode); | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| void PartMenu::up() | void PartMenu::up() | ||||||
|  |  | ||||||
|  | @ -24,4 +24,5 @@ class PartMenu { | ||||||
|   StringListMenuItem item_midi_input; |   StringListMenuItem item_midi_input; | ||||||
|   MidiNoteMenuItem item_midi_lowest_note; |   MidiNoteMenuItem item_midi_lowest_note; | ||||||
|   MidiNoteMenuItem item_midi_highest_note; |   MidiNoteMenuItem item_midi_highest_note; | ||||||
|  |   StringListMenuItem item_midi_thru_mode; | ||||||
| }; | }; | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue