pull/112/head
Holger Wirtz 3 years ago
parent acd4ec6bfc
commit 8aaf3b92d4
  1. 30
      MicroDexed.ino
  2. 6
      UI.hpp
  3. 2
      addon/SD/PERFORMANCE/0/fx.json
  4. 0
      addon/SD/PERFORMANCE/1/epiano.json
  5. 2
      addon/SD/PERFORMANCE/1/fx.json
  6. 0
      addon/SD/PERFORMANCE/2/epiano.json
  7. 2
      addon/SD/PERFORMANCE/2/fx.json
  8. 0
      addon/SD/PERFORMANCE/3/epiano.json
  9. 2
      addon/SD/PERFORMANCE/3/fx.json
  10. 0
      addon/SD/PERFORMANCE/4/epiano.json
  11. 2
      addon/SD/PERFORMANCE/4/fx.json
  12. 0
      addon/SD/PERFORMANCE/5/epiano.json
  13. 2
      addon/SD/PERFORMANCE/5/fx.json
  14. 0
      addon/SD/PERFORMANCE/6/epiano.json
  15. 2
      addon/SD/PERFORMANCE/6/fx.json
  16. 0
      addon/SD/PERFORMANCE/7/epiano.json
  17. 2
      addon/SD/PERFORMANCE/7/fx.json
  18. 0
      addon/SD/PERFORMANCE/8/epiano.json
  19. 2
      addon/SD/PERFORMANCE/8/fx.json
  20. 4
      config.h
  21. 4
      dexed_sd.cpp

@ -359,7 +359,7 @@ void create_audio_drum_chain(uint8_t instance_id)
uint8_t sd_card = 0; uint8_t sd_card = 0;
Sd2Card card; Sd2Card card;
SdVolume volume; SdVolume volume;
float midi_ticks_factor[10] = {0.0, 0.25, 0.375, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0 , 4.0}; const float midi_ticks_factor[10] = {0.0, 0.25, 0.375, 0.5, 0.75, 1.0, 1.5, 2.0, 3.0 , 4.0};
uint8_t midi_bpm_counter = 0; uint8_t midi_bpm_counter = 0;
uint8_t midi_bpm = 0; uint8_t midi_bpm = 0;
int16_t _midi_bpm = -1; int16_t _midi_bpm = -1;
@ -565,7 +565,7 @@ void setup()
} }
#endif #endif
//Setup (PROGMEM-) sample drums // Setup (PROGMEM) sample drums
#if NUM_DRUMS > 0 #if NUM_DRUMS > 0
// create dynamic Drum instances // create dynamic Drum instances
for (uint8_t instance_id = 0; instance_id < NUM_DRUMS; instance_id++) for (uint8_t instance_id = 0; instance_id < NUM_DRUMS; instance_id++)
@ -618,18 +618,18 @@ void setup()
#endif #endif
ep_chorus_mixer_r.gain(0, 1.0); ep_chorus_mixer_r.gain(0, 1.0);
ep_chorus_mixer_l.gain(0, 1.0); ep_chorus_mixer_l.gain(0, 1.0);
ep_chorus_mixer_r.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5)); ep_chorus_mixer_r.gain(1, mapfloat(EP_CHORUS_LEVEL_DEFAULT, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5));
ep_chorus_mixer_l.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5)); ep_chorus_mixer_l.gain(1, mapfloat(EP_CHORUS_LEVEL_DEFAULT, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5));
ep_chorus_inverter.gain(-1.0); ep_chorus_inverter.gain(-1.0);
ep_stereo_panorama.panorama(0.0); ep_stereo_panorama.panorama(mapfloat(EP_PANORAMA_DEFAULT, EP_PANORAMA_DEFAULT, EP_PANORAMA_DEFAULT, 0.0, 1.0));
#endif #endif
#endif #endif
// Setup effects // Setup effects
#if defined(USE_FX) #if defined(USE_FX)
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{ {
memset(delayline[instance_id], 0, sizeof(delayline[instance_id])); memset(delayline[instance_id], 0, sizeof(delayline[instance_id]));
if (!modchorus[instance_id]->begin(delayline[instance_id], MOD_DELAY_SAMPLE_BUFFER)) { if (!modchorus[instance_id]->begin(delayline[instance_id], MOD_DELAY_SAMPLE_BUFFER)) {
#ifdef DEBUG #ifdef DEBUG
Serial.print(F("AudioEffectModulatedDelay - begin failed [")); Serial.print(F("AudioEffectModulatedDelay - begin failed ["));
@ -653,9 +653,9 @@ void setup()
sd_card = check_sd_cards(); sd_card = check_sd_cards();
if (sd_card < 1) if (sd_card < 1)
{ {
#ifdef DEBUG #ifdef DEBUG
Serial.println(F("SD card not accessable.")); Serial.println(F("SD card not accessable."));
#endif #endif
} }
else else
@ -691,8 +691,8 @@ void setup()
// Load voices // Load voices
#ifdef DEBUG #ifdef DEBUG
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{ {
Serial.print(F("Dexed instance ")); Serial.print(F("Dexed instance "));
Serial.print(instance_id); Serial.print(instance_id);
Serial.println(F(":")); Serial.println(F(":"));
Serial.print(F("Bank/Voice [")); Serial.print(F("Bank/Voice ["));
@ -717,8 +717,8 @@ void setup()
// Init master_mixer // Init master_mixer
#if NUM_DEXED > 1 #if NUM_DEXED > 1
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++)
{ {
master_mixer_r.gain(instance_id, VOL_MAX_FLOAT); master_mixer_r.gain(instance_id, VOL_MAX_FLOAT);
master_mixer_l.gain(instance_id, VOL_MAX_FLOAT); master_mixer_l.gain(instance_id, VOL_MAX_FLOAT);
} }
#else #else
@ -2256,7 +2256,6 @@ void check_configuration_epiano(void)
configuration.epiano.detune = constrain(configuration.epiano.detune, EP_DETUNE_MIN, EP_DETUNE_MAX); configuration.epiano.detune = constrain(configuration.epiano.detune, EP_DETUNE_MIN, EP_DETUNE_MAX);
configuration.epiano.overdrive = constrain(configuration.epiano.overdrive, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX); configuration.epiano.overdrive = constrain(configuration.epiano.overdrive, EP_OVERDRIVE_MIN, EP_OVERDRIVE_MAX);
configuration.epiano.lowest_note = constrain(configuration.epiano.lowest_note, EP_LOWEST_NOTE_MIN, EP_LOWEST_NOTE_MAX); configuration.epiano.lowest_note = constrain(configuration.epiano.lowest_note, EP_LOWEST_NOTE_MIN, EP_LOWEST_NOTE_MAX);
configuration.epiano.highest_note = 108; // TODO!
configuration.epiano.highest_note = constrain(configuration.epiano.highest_note, EP_HIGHEST_NOTE_MIN, EP_HIGHEST_NOTE_MAX); configuration.epiano.highest_note = constrain(configuration.epiano.highest_note, EP_HIGHEST_NOTE_MIN, EP_HIGHEST_NOTE_MAX);
configuration.epiano.transpose = constrain(configuration.epiano.transpose, EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX); configuration.epiano.transpose = constrain(configuration.epiano.transpose, EP_TRANSPOSE_MIN, EP_TRANSPOSE_MAX);
configuration.epiano.sound_intensity = constrain(configuration.epiano.sound_intensity, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX); configuration.epiano.sound_intensity = constrain(configuration.epiano.sound_intensity, EP_SOUND_INTENSITY_MIN, EP_SOUND_INTENSITY_MAX);
@ -2508,6 +2507,7 @@ void set_fx_params(void)
uint16_t midi_sync_delay_time = uint16_t(60000.0 * midi_ticks_factor[configuration.fx.delay_sync[instance_id]] / seq.seq_bpm); uint16_t midi_sync_delay_time = uint16_t(60000.0 * midi_ticks_factor[configuration.fx.delay_sync[instance_id]] / seq.seq_bpm);
delay_fx[instance_id]->delay(0, constrain(midi_sync_delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX * 10)); delay_fx[instance_id]->delay(0, constrain(midi_sync_delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX * 10));
} }
// REVERB SEND // REVERB SEND
reverb_mixer_r.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); reverb_mixer_r.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT)));
reverb_mixer_l.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); reverb_mixer_l.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT)));
@ -2538,6 +2538,7 @@ void set_fx_params(void)
#endif #endif
#if defined(USE_EPIANO) #if defined(USE_EPIANO)
#ifdef USE_FX
reverb_mixer_r.gain(REVERB_MIX_CH_EPIANO, mapfloat(configuration.fx.ep_reverb_send, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 0.0, 1.0)); // EPiano Reverb-Send reverb_mixer_r.gain(REVERB_MIX_CH_EPIANO, mapfloat(configuration.fx.ep_reverb_send, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 0.0, 1.0)); // EPiano Reverb-Send
reverb_mixer_l.gain(REVERB_MIX_CH_EPIANO, mapfloat(configuration.fx.ep_reverb_send, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 0.0, 1.0)); // EPiano Reverb-Send reverb_mixer_l.gain(REVERB_MIX_CH_EPIANO, mapfloat(configuration.fx.ep_reverb_send, EP_REVERB_SEND_MIN, EP_REVERB_SEND_MAX, 0.0, 1.0)); // EPiano Reverb-Send
@ -2573,6 +2574,7 @@ void set_fx_params(void)
ep_chorus_mixer_r.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5)); ep_chorus_mixer_r.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5));
ep_chorus_mixer_l.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5)); ep_chorus_mixer_l.gain(1, mapfloat(configuration.fx.ep_chorus_level, EP_CHORUS_LEVEL_MIN, EP_CHORUS_LEVEL_MAX, 0.0, 0.5));
ep_chorus_inverter.gain(-1.0); ep_chorus_inverter.gain(-1.0);
#endif
#endif #endif
master_mixer_r.gain(MASTER_MIX_CH_REVERB, volume_transform(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, VOL_MAX_FLOAT))); master_mixer_r.gain(MASTER_MIX_CH_REVERB, volume_transform(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, VOL_MAX_FLOAT)));

@ -160,7 +160,7 @@ extern char g_voice_name[NUM_DEXED][VOICE_NAME_LEN];
extern char g_bank_name[NUM_DEXED][BANK_NAME_LEN]; extern char g_bank_name[NUM_DEXED][BANK_NAME_LEN];
extern int perform_attack_mod[NUM_DEXED]; extern int perform_attack_mod[NUM_DEXED];
extern int perform_release_mod[NUM_DEXED]; extern int perform_release_mod[NUM_DEXED];
extern float midi_ticks_factor[10]; extern const float midi_ticks_factor[10];
extern uint8_t midi_bpm; extern uint8_t midi_bpm;
extern bool save_sys_flag; extern bool save_sys_flag;
extern elapsedMillis save_sys; extern elapsedMillis save_sys;
@ -9314,6 +9314,10 @@ void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bo
sprintf(s, "[%s]", tmp); sprintf(s, "[%s]", tmp);
} }
Serial.println(var);
Serial.println(f);
Serial.println(s);
lcd.print(s); lcd.print(s);
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -66,7 +66,7 @@
"eq_7": 8, "eq_7": 8,
"ep_chorus_frequency": 0, "ep_chorus_frequency": 0,
"ep_chorus_waveform": 0, "ep_chorus_waveform": 0,
"ep_chorus_dept": 0, "ep_chorus_depth": 0,
"ep_chorus_level": 0, "ep_chorus_level": 0,
"ep_reverb_send": 0 "ep_reverb_send": 0
} }

@ -724,8 +724,8 @@
#define EP_TREBLE_DEFAULT 50 #define EP_TREBLE_DEFAULT 50
#define EP_PAN_TREMOLO_MIN 0 #define EP_PAN_TREMOLO_MIN 0
#define EP_PAN_TREMOLO_MAX 100 #define EP_PAN_TREMOLO_MAX 40
#define EP_PAN_TREMOLO_DEFAULT 50 #define EP_PAN_TREMOLO_DEFAULT 20
#define EP_PAN_LFO_MIN 0 #define EP_PAN_LFO_MIN 0
#define EP_PAN_LFO_MAX 100 #define EP_PAN_LFO_MAX 100

@ -464,6 +464,8 @@ bool load_sd_drumsettings_json(uint8_t number)
json = SD.open(filename); json = SD.open(filename);
if (json) if (json)
{ {
Serial.println("2");
deserializeJson(data_json, json); deserializeJson(data_json, json);
json.close(); json.close();
AudioInterrupts(); AudioInterrupts();
@ -842,7 +844,7 @@ bool load_sd_fx_json(uint8_t number)
configuration.fx.eq_7 = data_json["eq_7"]; configuration.fx.eq_7 = data_json["eq_7"];
configuration.fx.ep_chorus_frequency = data_json["ep_chorus_frequency"]; configuration.fx.ep_chorus_frequency = data_json["ep_chorus_frequency"];
configuration.fx.ep_chorus_waveform = data_json["ep_chorus_waveform"]; configuration.fx.ep_chorus_waveform = data_json["ep_chorus_waveform"];
configuration.fx.ep_chorus_depth = data_json["ep_chorus_dept"]; configuration.fx.ep_chorus_depth = data_json["ep_chorus_depth"];
configuration.fx.ep_chorus_level = data_json["ep_chorus_level"]; configuration.fx.ep_chorus_level = data_json["ep_chorus_level"];
configuration.fx.ep_reverb_send = data_json["ep_reverb_send"]; configuration.fx.ep_reverb_send = data_json["ep_reverb_send"];

Loading…
Cancel
Save