Completely disabling FX engine at compile time (undef USE_FX) is now

possible.
pull/32/head
Holger Wirtz 4 years ago
parent f53a6d0d96
commit f2eea03669
  1. 9
      MicroDexed.ino
  2. 182
      UI.hpp
  3. 73
      UI_1.h
  4. 93
      UI_1_FX.h
  5. 109
      UI_2.h
  6. 135
      UI_2_FX.h
  7. 2
      config.h
  8. 8
      dexed.cpp

@ -449,6 +449,7 @@ void setup()
dexed_mixer_r.gain(instance_id, 1.0);
dexed_mixer_l.gain(instance_id, 1.0);
#if defined(USE_FX)
// INIT REVERB
reverb_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0));
reverb_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, 1.0));
@ -460,6 +461,7 @@ void setup()
// INIT CHORUS
chorus_send_mixer_r.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0));
chorus_send_mixer_l.gain(instance_id, mapfloat(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX, 0.0, 1.0));
#endif
// DEXED FILTER
MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, 1.0);
@ -470,7 +472,7 @@ void setup()
// PANORAMA
mono2stereo[instance_id]->panorama(mapfloat(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_MAX, -1.0, 1.0));
}
#if defined(USE_FX)
// DELAY
delay_r.delay(0, mapfloat(configuration.delay_time * 10, DELAY_TIME_MIN, DELAY_TIME_MAX, 0.0, float(DELAY_TIME_MAX)));
@ -758,6 +760,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue)
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
eeprom_write();
break;
#if defined(USE_FX)
case 103: // CC 103: filter resonance
configuration.dexed[instance_id].filter_resonance = map(inValue, 0, 0x7f, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX);
MicroDexed[instance_id]->fx.Reso = mapfloat(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX, 1.0, 0.0);
@ -787,6 +790,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue)
master_mixer_l.gain(DELAY, mapfloat(configuration.delay_level, DELAY_LEVEL_MIN, DELAY_LEVEL_MAX, 0.0, 1.0));
eeprom_write();
break;
#endif
case 120:
MicroDexed[instance_id]->panic();
break;
@ -1286,6 +1290,7 @@ void initial_values_from_eeprom(bool init)
MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled);
MicroDexed[instance_id]->doRefreshVoice();
#if defined(USE_FX)
chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0);
chorus_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].chorus_send / 100.0);
delay_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].delay_send / 100.0);
@ -1296,7 +1301,7 @@ void initial_values_from_eeprom(bool init)
delay_fb_mixer_l.gain(1, mapfloat(configuration.delay_feedback, DELAY_FEEDBACK_MIN, DELAY_FEEDBACK_MAX, 0.0, 1.0)); // amount of feedback
reverb_send_mixer_r.gain(instance_id, configuration.dexed[instance_id].reverb_send / 100.0);
reverb_send_mixer_l.gain(instance_id, configuration.dexed[instance_id].reverb_send / 100.0);
#endif
MicroDexed[instance_id]->setOPs(configuration.dexed[instance_id].op_enabled);
MicroDexed[instance_id]->fx.Gain = configuration.dexed[instance_id].sound_intensity / 100.0;

182
UI.hpp

@ -151,9 +151,9 @@ void UI_func_delay_time(uint8_t param);
void UI_func_delay_feedback(uint8_t param);
void UI_func_delay_send(uint8_t param);
void UI_func_delay_level(uint8_t param);
#endif
void UI_func_filter_cutoff(uint8_t param);
void UI_func_filter_resonance(uint8_t param);
#endif
void UI_func_transpose(uint8_t param);
void UI_func_tune(uint8_t param);
void UI_func_midi_channel(uint8_t param);
@ -198,180 +198,16 @@ void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bo
LCDMenuLib2_menu LCDML_0(255, 0, 0, NULL, NULL); // normal root menu element (do not change)
LCDMenuLib2 LCDML(LCDML_0, _LCDML_DISP_rows, _LCDML_DISP_cols, lcdml_menu_display, lcdml_menu_clear, lcdml_menu_control);
// LCDML_add(id, prev_layer, new_num, lang_char_array, callback_function)
#if NUM_DEXED > 1
LCDML_add(0, LCDML_0, 1, "Setup", NULL);
LCDML_add(1, LCDML_0_1, 1, "Instance 1", NULL);
LCDML_add(2, LCDML_0_1_1, 1, "MIDI Channel 1", UI_func_midi_channel);
LCDML_add(3, LCDML_0_1_1, 2, "Transpose 1", UI_func_transpose);
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, 5, "Reverb Send 1", UI_func_reverb_send);
LCDML_add(7, LCDML_0_1_1, 6, "Chorus Send 1", UI_func_chorus_send);
LCDML_add(8, LCDML_0_1_1, 7, "Delay Send 1", UI_func_delay_send);
LCDML_add(9, LCDML_0_1_1, 8, "Filter 1", NULL);
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);
LCDML_add(103, LCDML_0, 5, "Info", UI_func_information);
#define _LCDML_DISP_cnt 103
#define MENU_ID_OF_INSTANCE_2 42
#if defined(NUM_DEXED)>1 && defined(USE_FX)
#include "UI_2_FX.h"
#elif defined(NUM_DEXED)==1 && defined(USE_FX)
#include "UI_1_FX.h"
#elif defined(NUM_DEXED)==2 && !defined(USE_FX)
#include "UI_2.h"
#else
LCDML_add(0, LCDML_0, 1, "Setup", NULL);
LCDML_add(1, LCDML_0_1, 1, "MIDI Channel", UI_func_midi_channel);
LCDML_add(2, LCDML_0_1, 2, "Sound Intens.", UI_func_sound_intensity);
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, "Reverb Send", UI_func_reverb_send);
LCDML_add(6, LCDML_0_1, 6, "Chorus Send", UI_func_chorus_send);
LCDML_add(7, LCDML_0_1, 7, "Delay Send", UI_func_delay_send);
LCDML_add(8, LCDML_0_1, 8, "Filter", NULL);
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);
LCDML_add(61, LCDML_0, 5, "Info", UI_func_information);
#define _LCDML_DISP_cnt 61
#define MENU_ID_OF_INSTANCE_2 41
#include "UI_1.h"
#endif
// create menu
LCDML_createMenu(_LCDML_DISP_cnt);

@ -0,0 +1,73 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
LCDML_add(0, LCDML_0, 1, "Setup", NULL);
LCDML_add(1, LCDML_0_1, 1, "MIDI Channel", UI_func_midi_channel);
LCDML_add(2, LCDML_0_1, 2, "Sound Intens.", UI_func_sound_intensity);
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);
LCDML_add(41, LCDML_0, 4, "Info", UI_func_information);
#define _LCDML_DISP_cnt 41
#define MENU_ID_OF_INSTANCE_2 35
#endif

@ -0,0 +1,93 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
LCDML_add(0, LCDML_0, 1, "Setup", NULL);
LCDML_add(1, LCDML_0_1, 1, "MIDI Channel", UI_func_midi_channel);
LCDML_add(2, LCDML_0_1, 2, "Sound Intens.", UI_func_sound_intensity);
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, "Reverb Send", UI_func_reverb_send);
LCDML_add(6, LCDML_0_1, 6, "Chorus Send", UI_func_chorus_send);
LCDML_add(7, LCDML_0_1, 7, "Delay Send", UI_func_delay_send);
LCDML_add(8, LCDML_0_1, 8, "Filter", NULL);
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);
LCDML_add(61, LCDML_0, 5, "Info", UI_func_information);
#define _LCDML_DISP_cnt 61
#define MENU_ID_OF_INSTANCE_2 41
#endif

109
UI_2.h

@ -0,0 +1,109 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
LCDML_add(0, LCDML_0, 1, "Setup", NULL);
LCDML_add(1, LCDML_0_1, 1, "Instance 1", NULL);
LCDML_add(2, LCDML_0_1_1, 1, "MIDI Channel 1", UI_func_midi_channel);
LCDML_add(3, LCDML_0_1_1, 2, "Transpose 1", UI_func_transpose);
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);
LCDML_add(76, LCDML_0, 5, "Info", UI_func_information);
#define _LCDML_DISP_cnt 76
#define MENU_ID_OF_INSTANCE_2 36
#endif

@ -0,0 +1,135 @@
/*
MicroDexed
MicroDexed is a port of the Dexed sound engine
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield.
Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef _UI_H_
#define _UI_H_
LCDML_add(0, LCDML_0, 1, "Setup", NULL);
LCDML_add(1, LCDML_0_1, 1, "Instance 1", NULL);
LCDML_add(2, LCDML_0_1_1, 1, "MIDI Channel 1", UI_func_midi_channel);
LCDML_add(3, LCDML_0_1_1, 2, "Transpose 1", UI_func_transpose);
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, 5, "Reverb Send 1", UI_func_reverb_send);
LCDML_add(7, LCDML_0_1_1, 6, "Chorus Send 1", UI_func_chorus_send);
LCDML_add(8, LCDML_0_1_1, 7, "Delay Send 1", UI_func_delay_send);
LCDML_add(9, LCDML_0_1_1, 8, "Filter 1", NULL);
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);
LCDML_add(103, LCDML_0, 5, "Info", UI_func_information);
#define _LCDML_DISP_cnt 103
#define MENU_ID_OF_INSTANCE_2 42
#endif

@ -85,7 +85,7 @@
#define MOD_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT // MOD_LINKWITZ_RILEY_FILTER_OUTPUT MOD_BUTTERWORTH_FILTER_OUTPUT MOD_NO_FILTER_OUTPUT
#define MOD_FILTER_CUTOFF_HZ 3000
// FX-CHAIN ENABLE/DISABLE
#define USE_FX 1
//#define USE_FX 1
//*************************************************************************************************
//* AUDIO SOFTWARE SETTINGS

@ -41,6 +41,8 @@
#include <Audio.h>
#endif
extern config_t configuration;
Dexed::Dexed(int rate)
{
uint8_t i;
@ -171,13 +173,17 @@ void Dexed::getSamples(uint16_t n_samples, int16_t* buffer)
}
}
#ifdef USE_FX
fx.process(sumbuf, n_samples);
#else
arm_scale_f32(sumbuf, 1.0, sumbuf, n_samples); // This is crap! Have to set the right volume here...
#endif
//#ifdef USE_TEENSY_DSP
arm_float_to_q15(sumbuf, buffer, AUDIO_BLOCK_SAMPLES);
//#else
//for (i = 0; i < n_samples; ++i)
//buffer[i] = static_cast<int16_t>(sumbuf[i] * 0x7fff);
//buffer[i] = static_cast<int16_t>(sumbuf[i] * 0x7fff);
//#endif
}

Loading…
Cancel
Save