diff --git a/MicroDexed.ino b/MicroDexed.ino index 01b3c28..837eeda 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -218,9 +218,6 @@ uint32_t peak_l = 0; bool eeprom_update_flag = false; config_t configuration; uint8_t selected_dexed_instance = 0; -#if defined(TEENSY_AUDIO_BOARD) -uint8_t sgtl5000_level = SGTL5000_LINEOUT_LEVEL_DEFAULT; -#endif #if defined(USE_FX) // Allocate the delay lines for chorus @@ -332,7 +329,7 @@ void setup() #if defined(TEENSY_AUDIO_BOARD) sgtl5000_1.enable(); - sgtl5000_1.lineOutLevel(sgtl5000_level); + sgtl5000_1.lineOutLevel(SGTL5000_LINEOUT_LEVEL); sgtl5000_1.dacVolumeRamp(); sgtl5000_1.dacVolume(1.0); //sgtl5000_1.dacVolumeRampLinear(); @@ -1349,6 +1346,7 @@ void initial_values_from_eeprom(bool init) MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign); MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled); MicroDexed[instance_id]->doRefreshVoice(); + MicroDexed[instance_id]->setVelocityLevel(configuration.dexed[instance_id].velocity_level); #if defined(USE_FX) chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0); @@ -1384,11 +1382,6 @@ void initial_values_from_eeprom(bool init) master_mixer_l.gain(REVERB, mapfloat(configuration.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); set_volume(configuration.vol, configuration.mono); - -#if defined(TEENSY_AUDIO_BOARD) - EEPROM.get(EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS, sgtl5000_level); - sgtl5000_1.lineOutLevel(sgtl5000_level); -#endif } #ifdef DEBUG show_configuration(); @@ -1411,6 +1404,7 @@ void check_configuration(void) configuration.delay_feedback = constrain(configuration.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX); configuration.delay_level = constrain(configuration.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX); configuration.soft_midi_thru = constrain(configuration.soft_midi_thru, SOFT_MIDI_THRU_MIN, SOFT_MIDI_THRU_MAX); + for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { configuration.dexed[instance_id].midi_channel = constrain(configuration.dexed[instance_id].midi_channel, MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); @@ -1428,6 +1422,7 @@ void check_configuration(void) configuration.dexed[instance_id].transpose = constrain(configuration.dexed[instance_id].transpose, TRANSPOSE_MIN, TRANSPOSE_MAX); configuration.dexed[instance_id].tune = constrain(configuration.dexed[instance_id].tune, TUNE_MIN, TUNE_MAX); configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony, POLYPHONY_MIN, POLYPHONY_MAX); + configuration.dexed[instance_id].velocity_level = constrain(configuration.dexed[instance_id].velocity_level, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX); configuration.dexed[instance_id].engine = constrain(configuration.dexed[instance_id].engine, ENGINE_MIN, ENGINE_MAX); configuration.dexed[instance_id].monopoly = constrain(configuration.dexed[instance_id].monopoly, MONOPOLY_MIN, MONOPOLY_MAX); configuration.dexed[instance_id].pb_range = constrain(configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX); @@ -1452,15 +1447,6 @@ void check_configuration(void) master_mixer_l.gain(DELAY, mapfloat(configuration.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0)); master_mixer_r.gain(REVERB, mapfloat(configuration.delay_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); master_mixer_l.gain(REVERB, mapfloat(configuration.delay_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, 1.0)); - -#if defined(TEENSY_AUDIO_ADAPTER) - // Special handling for SGTL5000 volume setting - if (sgtl5000_level > SGTL5000_LINEOUT_LEVEL_MAX || sgtl5000_level < SGTL5000_LINEOUT_LEVEL_MIN) - { - sgtl5000_level = SGTL5000_LINEOUT_LEVEL_DEFAULT; - EEPROM.put(EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS, SGTL5000_LINEOUT_LEVEL_DEFAULT); - } -#endif } void init_configuration(void) @@ -1485,6 +1471,7 @@ void init_configuration(void) configuration.delay_level = DELAY_LEVEL_DEFAULT; configuration.soft_midi_thru = SOFT_MIDI_THRU_DEFAULT; strcpy(configuration.config_name, "INITCONFIG"); + for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { configuration.dexed[instance_id].midi_channel = DEFAULT_MIDI_CHANNEL; @@ -1502,6 +1489,7 @@ void init_configuration(void) configuration.dexed[instance_id].transpose = TRANSPOSE_DEFAULT; configuration.dexed[instance_id].tune = TUNE_DEFAULT; configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT; + configuration.dexed[instance_id].velocity_level = VELOCITY_LEVEL_DEFAULT; configuration.dexed[instance_id].engine = ENGINE_DEFAULT; configuration.dexed[instance_id].monopoly = MONOPOLY_DEFAULT; configuration.dexed[instance_id].pb_range = PB_RANGE_DEFAULT; @@ -1520,11 +1508,6 @@ void init_configuration(void) configuration.dexed[instance_id].op_enabled = OP_ENABLED_DEFAULT; } eeprom_update(); -#if defined(TEENSY_AUDIO_ADAPTER) - sgtl5000_level = SGTL5000_LINEOUT_LEVEL_DEFAULT; - EEPROM.put(EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS, SGTL5000_LINEOUT_LEVEL_DEFAULT); - sgtl5000_1.lineOutLevel(sgtl5000_level); -#endif } void eeprom_write(void) @@ -1592,7 +1575,7 @@ void generate_version_string(char* buffer, uint8_t len) itoa (MAX_NOTES, tmp, 10); strncat(buffer, tmp, 2); #endif - buffer[len] = '\0'; + buffer[len - 1] = '\0'; } /****************************************************************************** @@ -1684,9 +1667,6 @@ void show_configuration(void) Serial.print(F("Delay Feedback ")); Serial.println(configuration.delay_feedback, DEC); Serial.print(F("Delay Level ")); Serial.println(configuration.delay_level, DEC); Serial.print(F("Soft MIDI Thru ")); Serial.println(configuration.soft_midi_thru, DEC); -#if defined(TEENSY_AUDIO_BOARD) - Serial.print(F("SGTL5000 level ")); Serial.println(sgtl5000_level, DEC); -#endif for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) { diff --git a/UI.hpp b/UI.hpp index f8acc8d..5bbeb62 100644 --- a/UI.hpp +++ b/UI.hpp @@ -88,7 +88,6 @@ extern AudioAmplifier* dexed_level[NUM_DEXED]; extern AudioEffectMonoStereo* mono2stereo[NUM_DEXED]; extern AudioSynthWaveformDc* pan[NUM_DEXED]; extern uint8_t selected_dexed_instance; -extern uint8_t sgtl5000_level; /*********************************************************************** GLOBAL @@ -200,9 +199,7 @@ void UI_func_volume(uint8_t param); void UI_func_load(uint8_t param); void UI_func_save(uint8_t param); void UI_func_midi_soft_thru(uint8_t param); -#if defined(TEENSY_AUDIO_BOARD) -void UI_func_output_level(uint8_t param); -#endif +void UI_func_velocity_level(uint8_t param); void UI_function_not_enabled(void); void UI_function_not_implemented(uint8_t param); void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign); @@ -2914,10 +2911,10 @@ void UI_func_information(uint8_t param) { if (LCDML.FUNC_setup()) // ****** SETUP ********* { - char version_string[LCD_cols+1]; + char version_string[LCD_cols + 1]; + + generate_version_string(version_string, sizeof(version_string)); - generate_version_string(version_string,sizeof(version_string)); - // setup function lcd.setCursor(0, 0); lcd.print(F("MicroDexed")); @@ -2993,15 +2990,18 @@ void UI_func_midi_soft_thru(uint8_t param) } } -#if defined(TEENSY_AUDIO_BOARD) -void UI_func_output_level(uint8_t param) +void UI_func_velocity_level(uint8_t param) { + uint8_t instance_id = 0; + + if (LCDML.FUNC_getID() > MENU_ID_OF_INSTANCE_2) + instance_id = 1; + if (LCDML.FUNC_setup()) // ****** SETUP ********* { // setup function - EEPROM.get(EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS, sgtl5000_level); lcd_special_chars(BLOCKBAR); - lcd_display_bar_int("Output Level", sgtl5000_level, SGTL5000_LINEOUT_LEVEL_MIN, SGTL5000_LINEOUT_LEVEL_MAX, 2, false, false, false, true); + lcd_display_bar_int("Velocity Lvl", configuration.dexed[instance_id].velocity_level, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false, true); } if (LCDML.FUNC_loop()) // ****** LOOP ********* @@ -3014,32 +3014,31 @@ void UI_func_output_level(uint8_t param) { if (LCDML.BT_checkDown()) { - if (sgtl5000_level < SGTL5000_LINEOUT_LEVEL_MAX) + if (configuration.dexed[instance_id].velocity_level < VELOCITY_LEVEL_MAX) { - sgtl5000_level += 1; + configuration.dexed[instance_id].velocity_level += 1; } } else if (LCDML.BT_checkUp()) { - if (sgtl5000_level > SGTL5000_LINEOUT_LEVEL_MIN) + if (configuration.dexed[instance_id].velocity_level > VELOCITY_LEVEL_MIN) { - sgtl5000_level -= 1; + configuration.dexed[instance_id].velocity_level -= 1; } } } - sgtl5000_1.lineOutLevel(sgtl5000_level); - - lcd_display_bar_int("Output Level", sgtl5000_level, SGTL5000_LINEOUT_LEVEL_MIN, SGTL5000_LINEOUT_LEVEL_MAX, 2, false, false, false, false); + + MicroDexed[instance_id]->setVelocityLevel(configuration.dexed[instance_id].velocity_level); + lcd_display_bar_int("Velocity Lvl", configuration.dexed[instance_id].velocity_level, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_MAX, 3, false, false, false, false); } if (LCDML.FUNC_close()) // ****** STABLE END ********* { // you can here reset some global vars or do nothing lcd_special_chars(SCROLLBAR); - EEPROM.put(EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS, sgtl5000_level); + eeprom_write(); } } -#endif void UI_func_voice_selection(uint8_t param) { diff --git a/UI_1.h b/UI_1.h index 333519c..9c67d27 100644 --- a/UI_1.h +++ b/UI_1.h @@ -32,48 +32,43 @@ LCDML_add(3, LCDML_0_1, 3, "Transpose", UI_func_transpose); LCDML_add(4, LCDML_0_1, 4, "Tune", UI_func_tune); LCDML_add(5, LCDML_0_1, 5, "Panorama", UI_func_panorama); LCDML_add(6, LCDML_0_1, 6, "Polyphony", UI_func_polyphony); -LCDML_add(7, LCDML_0_1, 7, "Engine", UI_func_engine); -LCDML_add(8, LCDML_0_1, 8, "Mono/Poly", UI_func_mono_poly); -LCDML_add(9, LCDML_0_1, 9, "Pitchbend", NULL); -LCDML_add(10, LCDML_0_1_9, 1, "PB Range", UI_func_pb_range); -LCDML_add(11, LCDML_0_1_9, 2, "PB Step", UI_func_pb_step); -LCDML_add(12, LCDML_0_1, 10, "Mod Wheel", NULL); -LCDML_add(13, LCDML_0_1_10, 1, "MW Range", UI_func_mw_range); -LCDML_add(14, LCDML_0_1_10, 2, "MW Assign", UI_func_mw_assign); -LCDML_add(15, LCDML_0_1, 11, "Foot Ctrl", NULL); -LCDML_add(16, LCDML_0_1_11, 1, "FC Range", UI_func_fc_range); -LCDML_add(17, LCDML_0_1_11, 2, "FC Assign", UI_func_fc_assign); -LCDML_add(18, LCDML_0_1, 12, "Breath Ctrl", NULL); -LCDML_add(19, LCDML_0_1_12, 1, "BC Range", UI_func_bc_range); -LCDML_add(20, LCDML_0_1_12, 2, "BC Assign", UI_func_bc_assign); -LCDML_add(21, LCDML_0_1, 13, "Aftertouch", NULL); -LCDML_add(22, LCDML_0_1_13, 1, "AT Range", UI_func_at_range); -LCDML_add(23, LCDML_0_1_13, 2, "AT Assign", UI_func_at_assign); -LCDML_add(24, LCDML_0_1, 14, "Portamento", NULL); -LCDML_add(25, LCDML_0_1_14, 1, "Port. Mode", UI_func_portamento_mode); -LCDML_add(26, LCDML_0_1_14, 2, "Port. Gliss", UI_func_portamento_glissando); -LCDML_add(27, LCDML_0_1_14, 3, "Port. Time", UI_func_portamento_time); -LCDML_add(28, LCDML_0_1, 15, "Operator", NULL); -LCDML_add(29, LCDML_0_1_15, 1, "OP1", UI_func_OP1); -LCDML_add(30, LCDML_0_1_15, 2, "OP2", UI_func_OP2); -LCDML_add(31, LCDML_0_1_15, 3, "OP3", UI_func_OP3); -LCDML_add(32, LCDML_0_1_15, 4, "OP4", UI_func_OP4); -LCDML_add(33, LCDML_0_1_15, 5, "OP5", UI_func_OP5); -LCDML_add(34, LCDML_0_1_15, 6, "OP6", UI_func_OP6); -LCDML_add(35, LCDML_0, 2, "Load/Save", NULL); -LCDML_add(36, LCDML_0_2, 1, "Load", UI_func_load); -LCDML_add(37, LCDML_0_2, 2, "Save", UI_func_save); -LCDML_add(38, LCDML_0, 3, "System", NULL); -LCDML_add(39, LCDML_0_3, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(40, LCDML_0_3, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -#if defined(TEENSY_AUDIO_BOARD) -LCDML_add(41, LCDML_0_3, 3, "Output Level", UI_func_output_level); +LCDML_add(7, LCDML_0_1, 7, "Velocity Lvl", UI_func_velocity_level); +LCDML_add(8, LCDML_0_1, 8, "Engine", UI_func_engine); +LCDML_add(9, LCDML_0_1, 9, "Mono/Poly", UI_func_mono_poly); +LCDML_add(10, LCDML_0_1, 10, "Pitchbend", NULL); +LCDML_add(11, LCDML_0_1_10, 1, "PB Range", UI_func_pb_range); +LCDML_add(12, LCDML_0_1_10, 2, "PB Step", UI_func_pb_step); +LCDML_add(13, LCDML_0_1, 11, "Mod Wheel", NULL); +LCDML_add(14, LCDML_0_1_11, 1, "MW Range", UI_func_mw_range); +LCDML_add(15, LCDML_0_1_11, 2, "MW Assign", UI_func_mw_assign); +LCDML_add(16, LCDML_0_1, 12, "Foot Ctrl", NULL); +LCDML_add(17, LCDML_0_1_12, 1, "FC Range", UI_func_fc_range); +LCDML_add(18, LCDML_0_1_12, 2, "FC Assign", UI_func_fc_assign); +LCDML_add(19, LCDML_0_1, 13, "Breath Ctrl", NULL); +LCDML_add(20, LCDML_0_1_13, 1, "BC Range", UI_func_bc_range); +LCDML_add(21, LCDML_0_1_13, 2, "BC Assign", UI_func_bc_assign); +LCDML_add(22, LCDML_0_1, 14, "Aftertouch", NULL); +LCDML_add(23, LCDML_0_1_14, 1, "AT Range", UI_func_at_range); +LCDML_add(24, LCDML_0_1_14, 2, "AT Assign", UI_func_at_assign); +LCDML_add(25, LCDML_0_1, 15, "Portamento", NULL); +LCDML_add(26, LCDML_0_1_15, 1, "Port. Mode", UI_func_portamento_mode); +LCDML_add(27, LCDML_0_1_15, 2, "Port. Gliss", UI_func_portamento_glissando); +LCDML_add(28, LCDML_0_1_15, 3, "Port. Time", UI_func_portamento_time); +LCDML_add(29, LCDML_0_1, 16, "Operator", NULL); +LCDML_add(30, LCDML_0_1_16, 1, "OP1", UI_func_OP1); +LCDML_add(31, LCDML_0_1_16, 2, "OP2", UI_func_OP2); +LCDML_add(32, LCDML_0_1_16, 3, "OP3", UI_func_OP3); +LCDML_add(33, LCDML_0_1_16, 4, "OP4", UI_func_OP4); +LCDML_add(34, LCDML_0_1_16, 5, "OP5", UI_func_OP5); +LCDML_add(35, LCDML_0_1_16, 6, "OP6", UI_func_OP6); +LCDML_add(36, LCDML_0, 2, "Load/Save", NULL); +LCDML_add(37, LCDML_0_2, 1, "Load", UI_func_load); +LCDML_add(38, LCDML_0_2, 2, "Save", UI_func_save); +LCDML_add(39, LCDML_0, 3, "System", NULL); +LCDML_add(40, LCDML_0_3, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(41, LCDML_0_3, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); LCDML_add(42, LCDML_0, 4, "Info", UI_func_information); #define _LCDML_DISP_cnt 42 -#else -LCDML_add(41, LCDML_0, 4, "Info", UI_func_information); -#define _LCDML_DISP_cnt 41 -#endif -#define MENU_ID_OF_INSTANCE_2 35 +#define MENU_ID_OF_INSTANCE_2 36 #endif diff --git a/UI_1_FX.h b/UI_1_FX.h index 468b6d7..08aafa3 100644 --- a/UI_1_FX.h +++ b/UI_1_FX.h @@ -38,62 +38,56 @@ LCDML_add(9, LCDML_0_1_8, 1, "Cutoff", UI_func_filter_cutoff); LCDML_add(10, LCDML_0_1_8, 2, "Resonance", UI_func_filter_resonance); LCDML_add(11, LCDML_0_1, 9, "Panorama", UI_func_panorama); LCDML_add(12, LCDML_0_1, 10, "Polyphony", UI_func_polyphony); -LCDML_add(13, LCDML_0_1, 11, "Engine", UI_func_engine); -LCDML_add(14, LCDML_0_1, 12, "Mono/Poly", UI_func_mono_poly); -LCDML_add(15, LCDML_0_1, 13, "Pitchbend", NULL); -LCDML_add(16, LCDML_0_1_13, 1, "PB Range", UI_func_pb_range); -LCDML_add(17, LCDML_0_1_13, 2, "PB Step", UI_func_pb_step); -LCDML_add(18, LCDML_0_1, 14, "Mod Wheel", NULL); -LCDML_add(19, LCDML_0_1_14, 1, "MW Range", UI_func_mw_range); -LCDML_add(20, LCDML_0_1_14, 2, "MW Assign", UI_func_mw_assign); -LCDML_add(21, LCDML_0_1, 15, "Foot Ctrl", NULL); -LCDML_add(22, LCDML_0_1_15, 1, "FC Range", UI_func_fc_range); -LCDML_add(23, LCDML_0_1_15, 2, "FC Assign", UI_func_fc_assign); -LCDML_add(24, LCDML_0_1, 16, "Breath Ctrl", NULL); -LCDML_add(25, LCDML_0_1_16, 1, "BC Range", UI_func_bc_range); -LCDML_add(26, LCDML_0_1_16, 2, "BC Assign", UI_func_bc_assign); -LCDML_add(27, LCDML_0_1, 17, "Aftertouch", NULL); -LCDML_add(28, LCDML_0_1_17, 1, "AT Range", UI_func_at_range); -LCDML_add(29, LCDML_0_1_17, 2, "AT Assign", UI_func_at_assign); -LCDML_add(30, LCDML_0_1, 18, "Portamento", NULL); -LCDML_add(31, LCDML_0_1_18, 1, "Port. Mode", UI_func_portamento_mode); -LCDML_add(32, LCDML_0_1_18, 2, "Port. Gliss", UI_func_portamento_glissando); -LCDML_add(33, LCDML_0_1_18, 3, "Port. Time", UI_func_portamento_time); -LCDML_add(34, LCDML_0_1, 19, "Operator", NULL); -LCDML_add(35, LCDML_0_1_19, 1, "OP1", UI_func_OP1); -LCDML_add(36, LCDML_0_1_19, 2, "OP2", UI_func_OP2); -LCDML_add(37, LCDML_0_1_19, 3, "OP3", UI_func_OP3); -LCDML_add(38, LCDML_0_1_19, 4, "OP4", UI_func_OP4); -LCDML_add(39, LCDML_0_1_19, 5, "OP5", UI_func_OP5); -LCDML_add(40, LCDML_0_1_19, 6, "OP6", UI_func_OP6); -LCDML_add(41, LCDML_0, 2, "Effect", NULL); -LCDML_add(42, LCDML_0_2, 1, "Reverb", NULL); -LCDML_add(43, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); -LCDML_add(44, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); -LCDML_add(45, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); -LCDML_add(46, LCDML_0_2, 2, "Chorus", NULL); -LCDML_add(47, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); -LCDML_add(48, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); -LCDML_add(49, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); -LCDML_add(50, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); -LCDML_add(51, LCDML_0_2, 3, "Delay", NULL); -LCDML_add(52, LCDML_0_2_3, 1, "Time", UI_func_delay_time); -LCDML_add(53, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); -LCDML_add(54, LCDML_0_2_3, 3, "Level", UI_func_delay_level); -LCDML_add(55, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(56, LCDML_0_3, 1, "Load", UI_func_load); -LCDML_add(57, LCDML_0_3, 2, "Save", UI_func_save); -LCDML_add(58, LCDML_0, 4, "System", NULL); -LCDML_add(59, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(60, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -#if defined(TEENSY_AUDIO_BOARD) -LCDML_add(61, LCDML_0_4, 3, "Output Level", UI_func_output_level); +LCDML_add(13, LCDML_0_1, 11, "Velocity Lvl", UI_func_velocity_level); +LCDML_add(14, LCDML_0_1, 12, "Engine", UI_func_engine); +LCDML_add(15, LCDML_0_1, 13, "Mono/Poly", UI_func_mono_poly); +LCDML_add(16, LCDML_0_1, 14, "Pitchbend", NULL); +LCDML_add(17, LCDML_0_1_14, 1, "PB Range", UI_func_pb_range); +LCDML_add(18, LCDML_0_1_14, 2, "PB Step", UI_func_pb_step); +LCDML_add(19, LCDML_0_1, 15, "Mod Wheel", NULL); +LCDML_add(20, LCDML_0_1_15, 1, "MW Range", UI_func_mw_range); +LCDML_add(21, LCDML_0_1_15, 2, "MW Assign", UI_func_mw_assign); +LCDML_add(22, LCDML_0_1, 16, "Foot Ctrl", NULL); +LCDML_add(23, LCDML_0_1_16, 1, "FC Range", UI_func_fc_range); +LCDML_add(24, LCDML_0_1_16, 2, "FC Assign", UI_func_fc_assign); +LCDML_add(25, LCDML_0_1, 17, "Breath Ctrl", NULL); +LCDML_add(26, LCDML_0_1_17, 1, "BC Range", UI_func_bc_range); +LCDML_add(27, LCDML_0_1_17, 2, "BC Assign", UI_func_bc_assign); +LCDML_add(28, LCDML_0_1, 18, "Aftertouch", NULL); +LCDML_add(29, LCDML_0_1_18, 1, "AT Range", UI_func_at_range); +LCDML_add(30, LCDML_0_1_18, 2, "AT Assign", UI_func_at_assign); +LCDML_add(31, LCDML_0_1, 19, "Portamento", NULL); +LCDML_add(32, LCDML_0_1_19, 1, "Port. Mode", UI_func_portamento_mode); +LCDML_add(33, LCDML_0_1_19, 2, "Port. Gliss", UI_func_portamento_glissando); +LCDML_add(34, LCDML_0_1_19, 3, "Port. Time", UI_func_portamento_time); +LCDML_add(35, LCDML_0_1, 20, "Operator", NULL); +LCDML_add(36, LCDML_0_1_20, 1, "OP1", UI_func_OP1); +LCDML_add(37, LCDML_0_1_20, 2, "OP2", UI_func_OP2); +LCDML_add(38, LCDML_0_1_20, 3, "OP3", UI_func_OP3); +LCDML_add(39, LCDML_0_1_20, 4, "OP4", UI_func_OP4); +LCDML_add(40, LCDML_0_1_20, 5, "OP5", UI_func_OP5); +LCDML_add(41, LCDML_0_1_20, 6, "OP6", UI_func_OP6); +LCDML_add(42, LCDML_0, 2, "Effect", NULL); +LCDML_add(43, LCDML_0_2, 1, "Reverb", NULL); +LCDML_add(44, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); +LCDML_add(45, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); +LCDML_add(46, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); +LCDML_add(47, LCDML_0_2, 2, "Chorus", NULL); +LCDML_add(48, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); +LCDML_add(49, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); +LCDML_add(50, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); +LCDML_add(51, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); +LCDML_add(52, LCDML_0_2, 3, "Delay", NULL); +LCDML_add(53, LCDML_0_2_3, 1, "Time", UI_func_delay_time); +LCDML_add(54, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); +LCDML_add(55, LCDML_0_2_3, 3, "Level", UI_func_delay_level); +LCDML_add(56, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(57, LCDML_0_3, 1, "Load", UI_func_load); +LCDML_add(58, LCDML_0_3, 2, "Save", UI_func_save); +LCDML_add(59, LCDML_0, 4, "System", NULL); +LCDML_add(60, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(61, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); LCDML_add(62, LCDML_0, 5, "Info", UI_func_information); #define _LCDML_DISP_cnt 62 -#else -LCDML_add(61, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 61 -#endif -#define MENU_ID_OF_INSTANCE_2 41 - +#define MENU_ID_OF_INSTANCE_2 42 #endif diff --git a/UI_2.h b/UI_2.h index 14b9ddf..87633b0 100644 --- a/UI_2.h +++ b/UI_2.h @@ -33,83 +33,79 @@ LCDML_add(4, LCDML_0_1_1, 3, "Tune 1", UI_func_tune); LCDML_add(5, LCDML_0_1_1, 4, "Sound Intens. 1", UI_func_sound_intensity); LCDML_add(6, LCDML_0_1_1, 9, "Panorama 1", UI_func_panorama); LCDML_add(7, LCDML_0_1_1, 10, "Polyphony 1", UI_func_polyphony); -LCDML_add(8, LCDML_0_1_1, 11, "Engine 1", UI_func_engine); -LCDML_add(9, LCDML_0_1_1, 12, "Mono/Poly 1", UI_func_mono_poly); -LCDML_add(10, LCDML_0_1_1, 13, "Pitchbend 1", NULL); -LCDML_add(11, LCDML_0_1_1_13, 1, "PB Range 1", UI_func_pb_range); -LCDML_add(12, LCDML_0_1_1_13, 2, "PB Step 1", UI_func_pb_step); -LCDML_add(13, LCDML_0_1_1, 14, "Mod Wheel 1", NULL); -LCDML_add(14, LCDML_0_1_1_14, 1, "MW Range 1", UI_func_mw_range); -LCDML_add(15, LCDML_0_1_1_14, 2, "MW Assign 1", UI_func_mw_assign); -LCDML_add(16, LCDML_0_1_1, 15, "Foot Ctrl 1", NULL); -LCDML_add(17, LCDML_0_1_1_15, 1, "FC Range 1", UI_func_fc_range); -LCDML_add(18, LCDML_0_1_1_15, 2, "FC Assign 1", UI_func_fc_assign); -LCDML_add(19, LCDML_0_1_1, 16, "Breath Ctrl 1", NULL); -LCDML_add(20, LCDML_0_1_1_16, 1, "BC Range 1", UI_func_bc_range); -LCDML_add(21, LCDML_0_1_1_16, 2, "BC Assign 1", UI_func_bc_assign); -LCDML_add(22, LCDML_0_1_1, 17, "Aftertouch 1", NULL); -LCDML_add(23, LCDML_0_1_1_17, 1, "AT Range 1", UI_func_at_range); -LCDML_add(24, LCDML_0_1_1_17, 2, "AT Assign 1", UI_func_at_assign); -LCDML_add(25, LCDML_0_1_1, 18, "Portamento 1", NULL); -LCDML_add(26, LCDML_0_1_1_18, 1, "Port. Mode 1", UI_func_portamento_mode); -LCDML_add(27, LCDML_0_1_1_18, 2, "Port. Gliss 1", UI_func_portamento_glissando); -LCDML_add(28, LCDML_0_1_1_18, 3, "Port. Time 1", UI_func_portamento_time); -LCDML_add(29, LCDML_0_1_1, 19, "Operator 1", NULL); -LCDML_add(30, LCDML_0_1_1_19, 1, "OP1 1", UI_func_OP1); -LCDML_add(31, LCDML_0_1_1_19, 2, "OP2 1", UI_func_OP2); -LCDML_add(32, LCDML_0_1_1_19, 3, "OP3 1", UI_func_OP3); -LCDML_add(33, LCDML_0_1_1_19, 4, "OP4 1", UI_func_OP4); -LCDML_add(34, LCDML_0_1_1_19, 5, "OP5 1", UI_func_OP5); -LCDML_add(35, LCDML_0_1_1_19, 6, "OP6 1", UI_func_OP6); -LCDML_add(36, LCDML_0_1, 2, "Instance 2", NULL); -LCDML_add(37, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); -LCDML_add(38, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); -LCDML_add(39, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); -LCDML_add(40, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); -LCDML_add(41, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); -LCDML_add(42, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); -LCDML_add(43, LCDML_0_1_2, 11, "Engine 2", UI_func_engine); -LCDML_add(44, LCDML_0_1_2, 12, "Mono/Poly 2", UI_func_mono_poly); -LCDML_add(45, LCDML_0_1_2, 13, "Pitchbend 2", NULL); -LCDML_add(46, LCDML_0_1_2_13, 1, "PB Range 2", UI_func_pb_range); -LCDML_add(47, LCDML_0_1_2_13, 2, "PB Step 2", UI_func_pb_step); -LCDML_add(48, LCDML_0_1_2, 14, "Mod Wheel 2", NULL); -LCDML_add(49, LCDML_0_1_2_14, 1, "MW Range 2", UI_func_mw_range); -LCDML_add(50, LCDML_0_1_2_14, 2, "MW Assign 2", UI_func_mw_assign); -LCDML_add(51, LCDML_0_1_2, 15, "Foot Ctrl 2", NULL); -LCDML_add(52, LCDML_0_1_2_15, 1, "FC Range 2", UI_func_fc_range); -LCDML_add(53, LCDML_0_1_2_15, 2, "FC Assign 2", UI_func_fc_assign); -LCDML_add(54, LCDML_0_1_2, 16, "Breat Ctrl 2", NULL); -LCDML_add(55, LCDML_0_1_2_16, 1, "BC Range 2", UI_func_bc_range); -LCDML_add(56, LCDML_0_1_2_16, 2, "BC Assign 2", UI_func_bc_assign); -LCDML_add(57, LCDML_0_1_2, 17, "Aftertouch 2", NULL); -LCDML_add(58, LCDML_0_1_2_17, 1, "AT Range 2", UI_func_at_range); -LCDML_add(59, LCDML_0_1_2_17, 2, "AT Assign 2", UI_func_at_assign); -LCDML_add(60, LCDML_0_1_2, 18, "Portamento 2", NULL); -LCDML_add(61, LCDML_0_1_2_18, 1, "Port. Mode 2", UI_func_portamento_mode); -LCDML_add(62, LCDML_0_1_2_18, 2, "Port. Gliss 2", UI_func_portamento_glissando); -LCDML_add(63, LCDML_0_1_2_18, 3, "Port. Time 2", UI_func_portamento_time); -LCDML_add(64, LCDML_0_1_2, 19, "Operator 2", NULL); -LCDML_add(65, LCDML_0_1_2_19, 1, "OP1 2", UI_func_OP1); -LCDML_add(66, LCDML_0_1_2_19, 2, "OP2 2", UI_func_OP2); -LCDML_add(67, LCDML_0_1_2_19, 3, "OP3 2", UI_func_OP3); -LCDML_add(68, LCDML_0_1_2_19, 4, "OP4 2", UI_func_OP4); -LCDML_add(69, LCDML_0_1_2_19, 5, "OP5 2", UI_func_OP5); -LCDML_add(70, LCDML_0_1_2_19, 6, "OP6 2", UI_func_OP6); -LCDML_add(71, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(72, LCDML_0_3, 1, "Load", UI_func_load); -LCDML_add(73, LCDML_0_3, 2, "Save", UI_func_save); -LCDML_add(74, LCDML_0, 4, "System", NULL); -LCDML_add(74, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(75, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -#if defined(TEENSY_AUDIO_BOARD) -LCDML_add(76, LCDML_0_4, 3, "Output Level", UI_func_output_level); -LCDML_add(77, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 77 -#else -LCDML_add(76, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 76 -#endif -#define MENU_ID_OF_INSTANCE_2 36 +LCDML_add(8, LCDML_0_1_1, 11, "Velocity Lvl 1", UI_func_velocity_level); +LCDML_add(9, LCDML_0_1_1, 12, "Engine 1", UI_func_engine); +LCDML_add(10, LCDML_0_1_1, 13, "Mono/Poly 1", UI_func_mono_poly); +LCDML_add(11, LCDML_0_1_1, 14, "Pitchbend 1", NULL); +LCDML_add(12, LCDML_0_1_1_14, 1, "PB Range 1", UI_func_pb_range); +LCDML_add(13, LCDML_0_1_1_14, 2, "PB Step 1", UI_func_pb_step); +LCDML_add(14, LCDML_0_1_1, 15, "Mod Wheel 1", NULL); +LCDML_add(15, LCDML_0_1_1_15, 1, "MW Range 1", UI_func_mw_range); +LCDML_add(16, LCDML_0_1_1_15, 2, "MW Assign 1", UI_func_mw_assign); +LCDML_add(17, LCDML_0_1_1, 16, "Foot Ctrl 1", NULL); +LCDML_add(18, LCDML_0_1_1_16, 1, "FC Range 1", UI_func_fc_range); +LCDML_add(19, LCDML_0_1_1_16, 2, "FC Assign 1", UI_func_fc_assign); +LCDML_add(20, LCDML_0_1_1, 17, "Breath Ctrl 1", NULL); +LCDML_add(21, LCDML_0_1_1_17, 1, "BC Range 1", UI_func_bc_range); +LCDML_add(22, LCDML_0_1_1_17, 2, "BC Assign 1", UI_func_bc_assign); +LCDML_add(23, LCDML_0_1_1, 18, "Aftertouch 1", NULL); +LCDML_add(24, LCDML_0_1_1_18, 1, "AT Range 1", UI_func_at_range); +LCDML_add(25, LCDML_0_1_1_18, 2, "AT Assign 1", UI_func_at_assign); +LCDML_add(26, LCDML_0_1_1, 19, "Portamento 1", NULL); +LCDML_add(27, LCDML_0_1_1_19, 1, "Port. Mode 1", UI_func_portamento_mode); +LCDML_add(28, LCDML_0_1_1_19, 2, "Port. Gliss 1", UI_func_portamento_glissando); +LCDML_add(29, LCDML_0_1_1_19, 3, "Port. Time 1", UI_func_portamento_time); +LCDML_add(30, LCDML_0_1_1, 20, "Operator 1", NULL); +LCDML_add(31, LCDML_0_1_1_20, 1, "OP1 1", UI_func_OP1); +LCDML_add(32, LCDML_0_1_1_20, 2, "OP2 1", UI_func_OP2); +LCDML_add(33, LCDML_0_1_1_20, 3, "OP3 1", UI_func_OP3); +LCDML_add(34, LCDML_0_1_1_20, 4, "OP4 1", UI_func_OP4); +LCDML_add(35, LCDML_0_1_1_20, 5, "OP5 1", UI_func_OP5); +LCDML_add(36, LCDML_0_1_1_20, 6, "OP6 1", UI_func_OP6); +LCDML_add(37, LCDML_0_1, 2, "Instance 2", NULL); +LCDML_add(38, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); +LCDML_add(39, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); +LCDML_add(40, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); +LCDML_add(41, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); +LCDML_add(42, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); +LCDML_add(43, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); +LCDML_add(44, LCDML_0_1_2, 11, "Velocity Lvl 2", UI_func_velocity_level); +LCDML_add(45, LCDML_0_1_2, 12, "Engine 2", UI_func_engine); +LCDML_add(46, LCDML_0_1_2, 13, "Mono/Poly 2", UI_func_mono_poly); +LCDML_add(47, LCDML_0_1_2, 14, "Pitchbend 2", NULL); +LCDML_add(48, LCDML_0_1_2_14, 1, "PB Range 2", UI_func_pb_range); +LCDML_add(49, LCDML_0_1_2_14, 2, "PB Step 2", UI_func_pb_step); +LCDML_add(50, LCDML_0_1_2, 15, "Mod Wheel 2", NULL); +LCDML_add(51, LCDML_0_1_2_15, 1, "MW Range 2", UI_func_mw_range); +LCDML_add(52, LCDML_0_1_2_15, 2, "MW Assign 2", UI_func_mw_assign); +LCDML_add(53, LCDML_0_1_2, 16, "Foot Ctrl 2", NULL); +LCDML_add(54, LCDML_0_1_2_16, 1, "FC Range 2", UI_func_fc_range); +LCDML_add(55, LCDML_0_1_2_16, 2, "FC Assign 2", UI_func_fc_assign); +LCDML_add(56, LCDML_0_1_2, 17, "Breat Ctrl 2", NULL); +LCDML_add(57, LCDML_0_1_2_17, 1, "BC Range 2", UI_func_bc_range); +LCDML_add(58, LCDML_0_1_2_17, 2, "BC Assign 2", UI_func_bc_assign); +LCDML_add(59, LCDML_0_1_2, 18, "Aftertouch 2", NULL); +LCDML_add(60, LCDML_0_1_2_18, 1, "AT Range 2", UI_func_at_range); +LCDML_add(61, LCDML_0_1_2_18, 2, "AT Assign 2", UI_func_at_assign); +LCDML_add(62, LCDML_0_1_2, 19, "Portamento 2", NULL); +LCDML_add(63, LCDML_0_1_2_19, 1, "Port. Mode 2", UI_func_portamento_mode); +LCDML_add(64, LCDML_0_1_2_19, 2, "Port. Gliss 2", UI_func_portamento_glissando); +LCDML_add(65, LCDML_0_1_2_19, 3, "Port. Time 2", UI_func_portamento_time); +LCDML_add(66, LCDML_0_1_2, 20, "Operator 2", NULL); +LCDML_add(67, LCDML_0_1_2_20, 1, "OP1 2", UI_func_OP1); +LCDML_add(68, LCDML_0_1_2_20, 2, "OP2 2", UI_func_OP2); +LCDML_add(69, LCDML_0_1_2_20, 3, "OP3 2", UI_func_OP3); +LCDML_add(70, LCDML_0_1_2_20, 4, "OP4 2", UI_func_OP4); +LCDML_add(71, LCDML_0_1_2_20, 5, "OP5 2", UI_func_OP5); +LCDML_add(72, LCDML_0_1_2_20, 6, "OP6 2", UI_func_OP6); +LCDML_add(73, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(74, LCDML_0_3, 1, "Load", UI_func_load); +LCDML_add(75, LCDML_0_3, 2, "Save", UI_func_save); +LCDML_add(76, LCDML_0, 4, "System", NULL); +LCDML_add(77, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(78, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(79, LCDML_0, 5, "Info", UI_func_information); +#define _LCDML_DISP_cnt 79 +#define MENU_ID_OF_INSTANCE_2 37 #endif diff --git a/UI_2_FX.h b/UI_2_FX.h index cd71f74..5a23303 100644 --- a/UI_2_FX.h +++ b/UI_2_FX.h @@ -39,103 +39,99 @@ LCDML_add(10, LCDML_0_1_1_8, 1, "Cutoff 1", UI_func_filter_cutoff); LCDML_add(11, LCDML_0_1_1_8, 2, "Resonance 1", UI_func_filter_resonance); LCDML_add(12, LCDML_0_1_1, 9, "Panorama 1", UI_func_panorama); LCDML_add(13, LCDML_0_1_1, 10, "Polyphony 1", UI_func_polyphony); -LCDML_add(14, LCDML_0_1_1, 11, "Engine 1", UI_func_engine); -LCDML_add(15, LCDML_0_1_1, 12, "Mono/Poly 1", UI_func_mono_poly); -LCDML_add(16, LCDML_0_1_1, 13, "Pitchbend 1", NULL); -LCDML_add(17, LCDML_0_1_1_13, 1, "PB Range 1", UI_func_pb_range); -LCDML_add(18, LCDML_0_1_1_13, 2, "PB Step 1", UI_func_pb_step); -LCDML_add(19, LCDML_0_1_1, 14, "Mod Wheel 1", NULL); -LCDML_add(20, LCDML_0_1_1_14, 1, "MW Range 1", UI_func_mw_range); -LCDML_add(21, LCDML_0_1_1_14, 2, "MW Assign 1", UI_func_mw_assign); -LCDML_add(22, LCDML_0_1_1, 15, "Foot Ctrl 1", NULL); -LCDML_add(23, LCDML_0_1_1_15, 1, "FC Range 1", UI_func_fc_range); -LCDML_add(24, LCDML_0_1_1_15, 2, "FC Assign 1", UI_func_fc_assign); -LCDML_add(25, LCDML_0_1_1, 16, "Breath Ctrl 1", NULL); -LCDML_add(26, LCDML_0_1_1_16, 1, "BC Range 1", UI_func_bc_range); -LCDML_add(27, LCDML_0_1_1_16, 2, "BC Assign 1", UI_func_bc_assign); -LCDML_add(28, LCDML_0_1_1, 17, "Aftertouch 1", NULL); -LCDML_add(29, LCDML_0_1_1_17, 1, "AT Range 1", UI_func_at_range); -LCDML_add(30, LCDML_0_1_1_17, 2, "AT Assign 1", UI_func_at_assign); -LCDML_add(31, LCDML_0_1_1, 18, "Portamento 1", NULL); -LCDML_add(32, LCDML_0_1_1_18, 1, "Port. Mode 1", UI_func_portamento_mode); -LCDML_add(33, LCDML_0_1_1_18, 2, "Port. Gliss 1", UI_func_portamento_glissando); -LCDML_add(34, LCDML_0_1_1_18, 3, "Port. Time 1", UI_func_portamento_time); -LCDML_add(35, LCDML_0_1_1, 19, "Operator 1", NULL); -LCDML_add(36, LCDML_0_1_1_19, 1, "OP1 1", UI_func_OP1); -LCDML_add(37, LCDML_0_1_1_19, 2, "OP2 1", UI_func_OP2); -LCDML_add(38, LCDML_0_1_1_19, 3, "OP3 1", UI_func_OP3); -LCDML_add(39, LCDML_0_1_1_19, 4, "OP4 1", UI_func_OP4); -LCDML_add(40, LCDML_0_1_1_19, 5, "OP5 1", UI_func_OP5); -LCDML_add(41, LCDML_0_1_1_19, 6, "OP6 1", UI_func_OP6); -LCDML_add(42, LCDML_0_1, 2, "Instance 2", NULL); -LCDML_add(43, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); -LCDML_add(44, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); -LCDML_add(45, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); -LCDML_add(46, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); -LCDML_add(47, LCDML_0_1_2, 5, "Reverb Send 2", UI_func_reverb_send); -LCDML_add(48, LCDML_0_1_2, 6, "Chorus Send 2", UI_func_chorus_send); -LCDML_add(49, LCDML_0_1_2, 7, "Delay Send 2", UI_func_delay_send); -LCDML_add(50, LCDML_0_1_2, 8, "Filter 1", NULL); -LCDML_add(51, LCDML_0_1_2_8, 1, "Cutoff 1", UI_func_filter_cutoff); -LCDML_add(52, LCDML_0_1_2_8, 2, "Resonance 1", UI_func_filter_resonance); -LCDML_add(53, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); -LCDML_add(54, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); -LCDML_add(55, LCDML_0_1_2, 11, "Engine 2", UI_func_engine); -LCDML_add(56, LCDML_0_1_2, 12, "Mono/Poly 2", UI_func_mono_poly); -LCDML_add(57, LCDML_0_1_2, 13, "Pitchbend 2", NULL); -LCDML_add(58, LCDML_0_1_2_13, 1, "PB Range 2", UI_func_pb_range); -LCDML_add(59, LCDML_0_1_2_13, 2, "PB Step 2", UI_func_pb_step); -LCDML_add(60, LCDML_0_1_2, 14, "Mod Wheel 2", NULL); -LCDML_add(61, LCDML_0_1_2_14, 1, "MW Range 2", UI_func_mw_range); -LCDML_add(62, LCDML_0_1_2_14, 2, "MW Assign 2", UI_func_mw_assign); -LCDML_add(63, LCDML_0_1_2, 15, "Foot Ctrl 2", NULL); -LCDML_add(64, LCDML_0_1_2_15, 1, "FC Range 2", UI_func_fc_range); -LCDML_add(65, LCDML_0_1_2_15, 2, "FC Assign 2", UI_func_fc_assign); -LCDML_add(66, LCDML_0_1_2, 16, "Breat Ctrl 2", NULL); -LCDML_add(67, LCDML_0_1_2_16, 1, "BC Range 2", UI_func_bc_range); -LCDML_add(68, LCDML_0_1_2_16, 2, "BC Assign 2", UI_func_bc_assign); -LCDML_add(69, LCDML_0_1_2, 17, "Aftertouch 2", NULL); -LCDML_add(70, LCDML_0_1_2_17, 1, "AT Range 2", UI_func_at_range); -LCDML_add(71, LCDML_0_1_2_17, 2, "AT Assign 2", UI_func_at_assign); -LCDML_add(72, LCDML_0_1_2, 18, "Portamento 2", NULL); -LCDML_add(73, LCDML_0_1_2_18, 1, "Port. Mode 2", UI_func_portamento_mode); -LCDML_add(74, LCDML_0_1_2_18, 2, "Port. Gliss 2", UI_func_portamento_glissando); -LCDML_add(75, LCDML_0_1_2_18, 3, "Port. Time 2", UI_func_portamento_time); -LCDML_add(76, LCDML_0_1_2, 19, "Operator 2", NULL); -LCDML_add(77, LCDML_0_1_2_19, 1, "OP1 2", UI_func_OP1); -LCDML_add(78, LCDML_0_1_2_19, 2, "OP2 2", UI_func_OP2); -LCDML_add(79, LCDML_0_1_2_19, 3, "OP3 2", UI_func_OP3); -LCDML_add(80, LCDML_0_1_2_19, 4, "OP4 2", UI_func_OP4); -LCDML_add(81, LCDML_0_1_2_19, 5, "OP5 2", UI_func_OP5); -LCDML_add(82, LCDML_0_1_2_19, 6, "OP6 2", UI_func_OP6); -LCDML_add(83, LCDML_0, 2, "Effect", NULL); -LCDML_add(84, LCDML_0_2, 1, "Reverb", NULL); -LCDML_add(85, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); -LCDML_add(86, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); -LCDML_add(87, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); -LCDML_add(88, LCDML_0_2, 2, "Chorus", NULL); -LCDML_add(89, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); -LCDML_add(90, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); -LCDML_add(91, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); -LCDML_add(92, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); -LCDML_add(93, LCDML_0_2, 3, "Delay", NULL); -LCDML_add(94, LCDML_0_2_3, 1, "Time", UI_func_delay_time); -LCDML_add(95, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); -LCDML_add(96, LCDML_0_2_3, 3, "Level", UI_func_delay_level); -LCDML_add(97, LCDML_0, 3, "Load/Save", NULL); -LCDML_add(98, LCDML_0_3, 1, "Load", UI_func_load); -LCDML_add(99, LCDML_0_3, 2, "Save", UI_func_save); -LCDML_add(100, LCDML_0, 4, "System", NULL); -LCDML_add(101, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); -LCDML_add(102, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); -#if defined(TEENSY_AUDIO_BOARD) -LCDML_add(103, LCDML_0_4, 3, "Output Level", UI_func_output_level); -LCDML_add(104, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 104 -#else -LCDML_add(103, LCDML_0, 5, "Info", UI_func_information); -#define _LCDML_DISP_cnt 103 -#endif -#define MENU_ID_OF_INSTANCE_2 42 +LCDML_add(14, LCDML_0_1_1, 11, "Velocity Lvl 1", UI_func_velocity_level); +LCDML_add(15, LCDML_0_1_1, 12, "Engine 1", UI_func_engine); +LCDML_add(16, LCDML_0_1_1, 13, "Mono/Poly 1", UI_func_mono_poly); +LCDML_add(17, LCDML_0_1_1, 14, "Pitchbend 1", NULL); +LCDML_add(18, LCDML_0_1_1_14, 1, "PB Range 1", UI_func_pb_range); +LCDML_add(19, LCDML_0_1_1_14, 2, "PB Step 1", UI_func_pb_step); +LCDML_add(20, LCDML_0_1_1, 15, "Mod Wheel 1", NULL); +LCDML_add(21, LCDML_0_1_1_15, 1, "MW Range 1", UI_func_mw_range); +LCDML_add(22, LCDML_0_1_1_15, 2, "MW Assign 1", UI_func_mw_assign); +LCDML_add(23, LCDML_0_1_1, 16, "Foot Ctrl 1", NULL); +LCDML_add(24, LCDML_0_1_1_16, 1, "FC Range 1", UI_func_fc_range); +LCDML_add(25, LCDML_0_1_1_16, 2, "FC Assign 1", UI_func_fc_assign); +LCDML_add(26, LCDML_0_1_1, 17, "Breath Ctrl 1", NULL); +LCDML_add(27, LCDML_0_1_1_17, 1, "BC Range 1", UI_func_bc_range); +LCDML_add(28, LCDML_0_1_1_17, 2, "BC Assign 1", UI_func_bc_assign); +LCDML_add(29, LCDML_0_1_1, 18, "Aftertouch 1", NULL); +LCDML_add(30, LCDML_0_1_1_18, 1, "AT Range 1", UI_func_at_range); +LCDML_add(31, LCDML_0_1_1_18, 2, "AT Assign 1", UI_func_at_assign); +LCDML_add(32, LCDML_0_1_1, 19, "Portamento 1", NULL); +LCDML_add(33, LCDML_0_1_1_19, 1, "Port. Mode 1", UI_func_portamento_mode); +LCDML_add(34, LCDML_0_1_1_19, 2, "Port. Gliss 1", UI_func_portamento_glissando); +LCDML_add(35, LCDML_0_1_1_19, 3, "Port. Time 1", UI_func_portamento_time); +LCDML_add(36, LCDML_0_1_1, 20, "Operator 1", NULL); +LCDML_add(37, LCDML_0_1_1_20, 1, "OP1 1", UI_func_OP1); +LCDML_add(38, LCDML_0_1_1_20, 2, "OP2 1", UI_func_OP2); +LCDML_add(39, LCDML_0_1_1_20, 3, "OP3 1", UI_func_OP3); +LCDML_add(40, LCDML_0_1_1_20, 4, "OP4 1", UI_func_OP4); +LCDML_add(41, LCDML_0_1_1_20, 5, "OP5 1", UI_func_OP5); +LCDML_add(42, LCDML_0_1_1_20, 6, "OP6 1", UI_func_OP6); +LCDML_add(43, LCDML_0_1, 2, "Instance 2", NULL); +LCDML_add(44, LCDML_0_1_2, 1, "MIDI Channel 2", UI_func_midi_channel); +LCDML_add(45, LCDML_0_1_2, 2, "Sound Intens. 2", UI_func_sound_intensity); +LCDML_add(46, LCDML_0_1_2, 3, "Transpose 2", UI_func_transpose); +LCDML_add(47, LCDML_0_1_2, 4, "Tune 2", UI_func_tune); +LCDML_add(48, LCDML_0_1_2, 5, "Reverb Send 2", UI_func_reverb_send); +LCDML_add(49, LCDML_0_1_2, 6, "Chorus Send 2", UI_func_chorus_send); +LCDML_add(50, LCDML_0_1_2, 7, "Delay Send 2", UI_func_delay_send); +LCDML_add(51, LCDML_0_1_2, 8, "Filter 1", NULL); +LCDML_add(52, LCDML_0_1_2_8, 1, "Cutoff 1", UI_func_filter_cutoff); +LCDML_add(53, LCDML_0_1_2_8, 2, "Resonance 1", UI_func_filter_resonance); +LCDML_add(54, LCDML_0_1_2, 9, "Panorama 2", UI_func_panorama); +LCDML_add(55, LCDML_0_1_2, 10, "Polyphony 2", UI_func_polyphony); +LCDML_add(56, LCDML_0_1_2, 11, "Velocity Lvl 2", UI_func_velocity_level); +LCDML_add(57, LCDML_0_1_2, 12, "Engine 2", UI_func_engine); +LCDML_add(58, LCDML_0_1_2, 13, "Mono/Poly 2", UI_func_mono_poly); +LCDML_add(59, LCDML_0_1_2, 14, "Pitchbend 2", NULL); +LCDML_add(60, LCDML_0_1_2_14, 1, "PB Range 2", UI_func_pb_range); +LCDML_add(61, LCDML_0_1_2_14, 2, "PB Step 2", UI_func_pb_step); +LCDML_add(62, LCDML_0_1_2, 15, "Mod Wheel 2", NULL); +LCDML_add(63, LCDML_0_1_2_15, 1, "MW Range 2", UI_func_mw_range); +LCDML_add(64, LCDML_0_1_2_15, 2, "MW Assign 2", UI_func_mw_assign); +LCDML_add(65, LCDML_0_1_2, 16, "Foot Ctrl 2", NULL); +LCDML_add(66, LCDML_0_1_2_16, 1, "FC Range 2", UI_func_fc_range); +LCDML_add(67, LCDML_0_1_2_16, 2, "FC Assign 2", UI_func_fc_assign); +LCDML_add(68, LCDML_0_1_2, 17, "Breat Ctrl 2", NULL); +LCDML_add(69, LCDML_0_1_2_17, 1, "BC Range 2", UI_func_bc_range); +LCDML_add(70, LCDML_0_1_2_17, 2, "BC Assign 2", UI_func_bc_assign); +LCDML_add(71, LCDML_0_1_2, 18, "Aftertouch 2", NULL); +LCDML_add(72, LCDML_0_1_2_18, 1, "AT Range 2", UI_func_at_range); +LCDML_add(73, LCDML_0_1_2_18, 2, "AT Assign 2", UI_func_at_assign); +LCDML_add(74, LCDML_0_1_2, 19, "Portamento 2", NULL); +LCDML_add(75, LCDML_0_1_2_19, 1, "Port. Mode 2", UI_func_portamento_mode); +LCDML_add(76, LCDML_0_1_2_19, 2, "Port. Gliss 2", UI_func_portamento_glissando); +LCDML_add(77, LCDML_0_1_2_19, 3, "Port. Time 2", UI_func_portamento_time); +LCDML_add(78, LCDML_0_1_2, 20, "Operator 2", NULL); +LCDML_add(79, LCDML_0_1_2_20, 1, "OP1 2", UI_func_OP1); +LCDML_add(80, LCDML_0_1_2_20, 2, "OP2 2", UI_func_OP2); +LCDML_add(81, LCDML_0_1_2_20, 3, "OP3 2", UI_func_OP3); +LCDML_add(82, LCDML_0_1_2_20, 4, "OP4 2", UI_func_OP4); +LCDML_add(83, LCDML_0_1_2_20, 5, "OP5 2", UI_func_OP5); +LCDML_add(84, LCDML_0_1_2_20, 6, "OP6 2", UI_func_OP6); +LCDML_add(85, LCDML_0, 2, "Effect", NULL); +LCDML_add(86, LCDML_0_2, 1, "Reverb", NULL); +LCDML_add(87, LCDML_0_2_1, 1, "Roomsize", UI_func_reverb_roomsize); +LCDML_add(88, LCDML_0_2_1, 2, "Damping", UI_func_reverb_damping); +LCDML_add(89, LCDML_0_2_1, 3, "Level", UI_func_reverb_level); +LCDML_add(90, LCDML_0_2, 2, "Chorus", NULL); +LCDML_add(91, LCDML_0_2_2, 1, "Frequency", UI_func_chorus_frequency); +LCDML_add(92, LCDML_0_2_2, 2, "Waveform", UI_func_chorus_waveform); +LCDML_add(93, LCDML_0_2_2, 3, "Depth", UI_func_chorus_depth); +LCDML_add(94, LCDML_0_2_2, 4, "Level", UI_func_chorus_level); +LCDML_add(95, LCDML_0_2, 3, "Delay", NULL); +LCDML_add(96, LCDML_0_2_3, 1, "Time", UI_func_delay_time); +LCDML_add(97, LCDML_0_2_3, 2, "Feedback", UI_func_delay_feedback); +LCDML_add(98, LCDML_0_2_3, 3, "Level", UI_func_delay_level); +LCDML_add(99, LCDML_0, 3, "Load/Save", NULL); +LCDML_add(100, LCDML_0_3, 1, "Load", UI_func_load); +LCDML_add(101, LCDML_0_3, 2, "Save", UI_func_save); +LCDML_add(102, LCDML_0, 4, "System", NULL); +LCDML_add(103, LCDML_0_4, 1, "Stereo/Mono", UI_func_stereo_mono); +LCDML_add(104, LCDML_0_4, 2, "MIDI Soft THRU", UI_func_midi_soft_thru); +LCDML_add(105, LCDML_0, 5, "Info", UI_func_information); +#define _LCDML_DISP_cnt 105 +#define MENU_ID_OF_INSTANCE_2 43 #endif diff --git a/config.h b/config.h index 37b5def..1e9d741 100644 --- a/config.h +++ b/config.h @@ -218,9 +218,6 @@ // EEPROM address #define EEPROM_START_ADDRESS 100 -#if defined(TEENSY_AUDIO_BOARD) -#define EEPROM_SGTL5000_LINEOUT_LEVEL_ADDRESS 4095 -#endif #define MAX_BANKS 100 #define MAX_VOICES 32 // voices per bank @@ -232,7 +229,6 @@ //************************************************************************************************* #define NUM_DEXED 1 #define MAX_DEXED 2 -#define NORMALIZE_DX_VELOCITY 1 //#define CPU_OVERLOAD_THROTTLE 95.0 // Level (in percent) when throttling should start #define CPU_OVERLOAD_THROTTLE_TIMER 100 // timer (in ms) when next throttling is possible enum { DEXED, CHORUS, DELAY, REVERB}; @@ -475,9 +471,9 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define SOFT_MIDI_THRU_MAX 1 #define SOFT_MIDI_THRU_DEFAULT 1 -#define SGTL5000_LINEOUT_LEVEL_MIN 13 -#define SGTL5000_LINEOUT_LEVEL_MAX 31 -#define SGTL5000_LINEOUT_LEVEL_DEFAULT SGTL5000_LINEOUT_LEVEL +#define VELOCITY_LEVEL_MIN 100 +#define VELOCITY_LEVEL_MAX 127 +#define VELOCITY_LEVEL_DEFAULT 100 // typedef struct { @@ -496,6 +492,7 @@ typedef struct { uint8_t sound_intensity; uint8_t pan; uint8_t polyphony; + uint8_t velocity_level; uint8_t engine; uint8_t monopoly; uint8_t pb_range; diff --git a/dexed.cpp b/dexed.cpp index 4264000..e43138a 100644 --- a/dexed.cpp +++ b/dexed.cpp @@ -111,7 +111,7 @@ void Dexed::deactivate(void) void Dexed::getSamples(uint16_t n_samples, int16_t* buffer) { - uint16_t i,j; + uint16_t i, j; uint8_t note; float sumbuf[n_samples]; @@ -168,10 +168,7 @@ void Dexed::keydown(int16_t pitch, uint8_t velo) { } pitch += data[144] - TRANSPOSE_FIX; - -#if defined(NORMALIZE_DX_VELOCITY) - velo = (((float)velo) * 0.7874015 + 0.5); // 100/127 -#endif + velo = (((float)velo) * velocity_level + 0.5); // 100/127 int previousKeyDown = lastKeyDown; lastKeyDown = pitch; @@ -731,3 +728,8 @@ void Dexed::setPortamentoMode(uint8_t portamento_mode, uint8_t portamento_glissa controllers.refresh(); } + +void Dexed::setVelocityLevel(uint8_t velocity_level) +{ + velocity_level = float(velocity_level) / 127.0; +} diff --git a/dexed.h b/dexed.h index c481635..1132dec 100644 --- a/dexed.h +++ b/dexed.h @@ -172,6 +172,7 @@ class Dexed void setBCController(uint8_t bc_range, uint8_t bc_assign); void setATController(uint8_t at_range, uint8_t pb_assign); void setPortamentoMode(uint8_t portamento_mode, uint8_t portamento_glissando, uint8_t portamento_time); + void setVelocityLevel(uint8_t velocity_level); ProcessorVoice voices[MAX_NOTES]; Controllers controllers; @@ -207,6 +208,7 @@ class Dexed FmCore* engineMsfa; EngineMkI* engineMkI; EngineOpl* engineOpl; + float velocity_level; }; #endif // PLUGINPROCESSOR_H_INCLUDED