Copyright dates modified.

FIxes for displaying a bar on the LCD.
pull/32/head
Holger Wirtz 5 years ago
parent 5b2b663af0
commit ddd1ce00d4
  1. BIN
      .swp
  2. 4
      MicroDexed.ino
  3. 89
      UI.hpp
  4. 2
      UI_1.h
  5. 2
      UI_1_FX.h
  6. 2
      UI_2.h
  7. 2
      UI_2_FX.h
  8. 4
      config.h
  9. 12
      dexed.cpp
  10. 2
      dexed.h
  11. 2
      dexed_sysex.cpp
  12. 2
      dexed_sysex.h
  13. 2
      effect_auto_pan.cpp
  14. 2
      effect_auto_pan.h
  15. 2
      effect_modulated_delay.cpp
  16. 2
      effect_modulated_delay.h
  17. 2
      effect_mono_stereo.cpp
  18. 2
      effect_mono_stereo.h
  19. 2
      effect_stereo_mono.cpp
  20. 2
      effect_stereo_mono.h
  21. 4
      midi_devices.hpp

BIN
.swp

Binary file not shown.

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -262,7 +262,7 @@ void setup()
#endif #endif
Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed")); Serial.println(F("MicroDexed based on https://github.com/asb2m10/dexed"));
Serial.println(F("(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de>")); Serial.println(F("(c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>"));
Serial.println(F("https://codeberg.org/dcoredump/MicroDexed")); Serial.println(F("https://codeberg.org/dcoredump/MicroDexed"));
Serial.print(F("Version: ")); Serial.print(F("Version: "));
Serial.println(VERSION); Serial.println(VERSION);

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -202,7 +202,7 @@ void UI_function_not_enabled(void);
void UI_function_not_implemented(uint8_t param); void UI_function_not_implemented(uint8_t param);
void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign); void lcd_display_int(int16_t var, uint8_t size, bool zeros, bool brackets, bool sign);
void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign); void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bool zeros, bool brackets, bool sign);
void lcd_display_bar(const char* title, uint32_t value, uint32_t min_value, uint32_t max_value, bool init); void lcd_display_bar_int(const char* title, uint32_t value, uint32_t min_value, uint32_t max_value, uint8_t size, bool zeros, bool brackets, bool sign, bool init);
void lcd_special_chars(uint8_t mode); void lcd_special_chars(uint8_t mode);
// normal menu // normal menu
@ -295,7 +295,6 @@ void lcdml_menu_control(void)
{ {
lcd_special_chars(SCROLLBAR); lcd_special_chars(SCROLLBAR);
UI_func_voice_selection(0); UI_func_voice_selection(0);
return;
} }
//Volatile Variable //Volatile Variable
@ -2094,7 +2093,7 @@ void UI_func_pb_range(uint8_t param)
{ {
// setup function // setup function
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("PB Range", configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX, true); lcd_display_bar_int("PB Range", configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2123,7 +2122,7 @@ void UI_func_pb_range(uint8_t param)
MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step); MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step);
} }
lcd_display_bar("PB Range", configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX, false); lcd_display_bar_int("PB Range", configuration.dexed[instance_id].pb_range, PB_RANGE_MIN, PB_RANGE_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2144,7 +2143,7 @@ void UI_func_pb_step(uint8_t param)
{ {
// setup function // setup function
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("PB Step", configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX, true); lcd_display_bar_int("PB Step", configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2173,7 +2172,7 @@ void UI_func_pb_step(uint8_t param)
MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step); MicroDexed[instance_id]->setPBController(configuration.dexed[instance_id].pb_range, configuration.dexed[instance_id].pb_step);
} }
lcd_display_bar("PB Step", configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX, false); lcd_display_bar_int("PB Step", configuration.dexed[instance_id].pb_step, PB_STEP_MIN, PB_STEP_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2195,7 +2194,7 @@ void UI_func_mw_range(uint8_t param)
{ {
// setup function // setup function
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("MW Range", configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX, true); lcd_display_bar_int("MW Range", configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2224,7 +2223,7 @@ void UI_func_mw_range(uint8_t param)
MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign); MicroDexed[instance_id]->setMWController(configuration.dexed[instance_id].mw_range, configuration.dexed[instance_id].mw_assign);
} }
lcd_display_bar("MW Range", configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX, false); lcd_display_bar_int("MW Range", configuration.dexed[instance_id].mw_range, MW_RANGE_MIN, MW_RANGE_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2323,7 +2322,7 @@ void UI_func_fc_range(uint8_t param)
{ {
// setup function // setup function
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("FC Range", configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX, true); lcd_display_bar_int("FC Range", configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2352,7 +2351,7 @@ void UI_func_fc_range(uint8_t param)
MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign); MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign);
} }
lcd_display_bar("FC Range", configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX, false); lcd_display_bar_int("FC Range", configuration.dexed[instance_id].fc_range, FC_RANGE_MIN, FC_RANGE_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2400,7 +2399,6 @@ void UI_func_fc_assign(uint8_t param)
} }
} }
MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign); MicroDexed[instance_id]->setFCController(configuration.dexed[instance_id].fc_range, configuration.dexed[instance_id].fc_assign);
} }
@ -2452,7 +2450,7 @@ void UI_func_bc_range(uint8_t param)
{ {
// setup function // setup function
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("BC Range", configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX, true); lcd_display_bar_int("BC Range", configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2481,7 +2479,7 @@ void UI_func_bc_range(uint8_t param)
MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign); MicroDexed[instance_id]->setBCController(configuration.dexed[instance_id].bc_range, configuration.dexed[instance_id].bc_assign);
} }
lcd_display_bar("BC Range", configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX, false); lcd_display_bar_int("BC Range", configuration.dexed[instance_id].bc_range, BC_RANGE_MIN, BC_RANGE_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2580,7 +2578,7 @@ void UI_func_at_range(uint8_t param)
{ {
// setup function // setup function
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("AT Range", configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX, true); lcd_display_bar_int("AT Range", configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2609,7 +2607,7 @@ void UI_func_at_range(uint8_t param)
MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign); MicroDexed[instance_id]->setATController(configuration.dexed[instance_id].at_range, configuration.dexed[instance_id].at_assign);
} }
lcd_display_bar("AT Range", configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX, false); lcd_display_bar_int("AT Range", configuration.dexed[instance_id].at_range, AT_RANGE_MIN, AT_RANGE_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -2831,7 +2829,7 @@ void UI_func_portamento_time(uint8_t param)
if (LCDML.FUNC_setup()) // ****** SETUP ********* if (LCDML.FUNC_setup()) // ****** SETUP *********
{ {
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("Portam. Time", configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, true); lcd_display_bar_int("Portam. Time", configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false, true);
} }
if (LCDML.FUNC_loop()) // ****** LOOP ********* if (LCDML.FUNC_loop()) // ****** LOOP *********
@ -2860,7 +2858,7 @@ void UI_func_portamento_time(uint8_t param)
MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time); MicroDexed[instance_id]->setPortamentoMode(configuration.dexed[instance_id].portamento_mode, configuration.dexed[instance_id].portamento_glissando, configuration.dexed[instance_id].portamento_time);
} }
lcd_display_bar("Portam. Time", configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, false); lcd_display_bar_int("Portam. Time", configuration.dexed[instance_id].portamento_time, PORTAMENTO_TIME_MIN, PORTAMENTO_TIME_MAX, 2, false, false, false, false);
} }
if (LCDML.FUNC_close()) // ****** STABLE END ********* if (LCDML.FUNC_close()) // ****** STABLE END *********
@ -3129,15 +3127,14 @@ void UI_func_volume(uint8_t param)
if (menu_state != MENU_VOLUME) if (menu_state != MENU_VOLUME)
{ {
lcd_special_chars(BLOCKBAR); lcd_special_chars(BLOCKBAR);
lcd_display_bar("Volume", configuration.vol, VOLUME_MIN, VOLUME_MAX, true); lcd_display_bar_int("Volume", configuration.vol, VOLUME_MIN, VOLUME_MAX, 3, false, false, false, true);
menu_state = MENU_VOLUME; menu_state = MENU_VOLUME;
} }
else else
lcd_display_bar("Volume", configuration.vol, VOLUME_MIN, VOLUME_MAX, false); lcd_display_bar_int("Volume", configuration.vol, VOLUME_MIN, VOLUME_MAX, 3, false, false, false, false);
set_volume(configuration.vol, configuration.mono); set_volume(configuration.vol, configuration.mono);
eeprom_write(); eeprom_write();
} }
void UI_func_load(uint8_t param) void UI_func_load(uint8_t param)
@ -3375,18 +3372,20 @@ void lcd_display_float(float var, uint8_t size_number, uint8_t size_fraction, bo
lcd.print(F("]")); lcd.print(F("]"));
} }
void lcd_display_bar(const char* title, uint32_t value, uint32_t min_value, uint32_t max_value, bool init) void lcd_display_bar_int(const char* title, uint32_t value, uint32_t min_value, uint32_t max_value, uint8_t size, bool zeros, bool brackets, bool sign, bool init)
{ {
float _v = float(value * LCD_cols) / (max_value - min_value); float _v = float(value * LCD_cols) / (max_value - min_value);
float _vi; float _vi;
uint8_t vf = uint8_t(modff(_v, &_vi) * 10.0); uint8_t vf = uint8_t(modff(_v, &_vi) * 10.0 + 0.5);
uint8_t vi = uint8_t(_vi); uint8_t vi = uint8_t(_vi);
if (init == true) if (init == true)
{ {
// show initial title, value and bar
lcd.clear();
lcd.show(0, 0, LCD_cols, title); lcd.show(0, 0, LCD_cols, title);
lcd.setCursor(strlen(title) + 1, 0); lcd.setCursor(LCD_cols - (size + 1) + 1, 0);
lcd_display_int(value, 3, true, false, false); lcd_display_int(value, size, zeros, brackets, sign);
lcd.setCursor(0, 1); lcd.setCursor(0, 1);
if (vi == 0 && uint8_t(vf / 2) == 0) if (vi == 0 && uint8_t(vf / 2) == 0)
@ -3398,7 +3397,7 @@ void lcd_display_bar(const char* title, uint32_t value, uint32_t min_value, uint
{ {
for (uint8_t i = 0; i < LCD_cols; i++) for (uint8_t i = 0; i < LCD_cols; i++)
{ {
if (i < vi) if (i <= vi)
lcd.write((uint8_t)4); // full block lcd.write((uint8_t)4); // full block
else else
lcd.print(F(" ")); lcd.print(F(" "));
@ -3406,17 +3405,18 @@ void lcd_display_bar(const char* title, uint32_t value, uint32_t min_value, uint
if (vf > 1) if (vf > 1)
{ {
lcd.setCursor(vi - 1, 1); lcd.setCursor(vi, 1);
lcd.write((uint8_t)int(vf / 2) - 1); lcd.write((uint8_t)int(vf / 2) - 1);
} }
} }
} }
else else
{ {
uint8_t ca = (float((LCD_cols) / (max_value - min_value)) + 0.5) + 1; // show only changed value and changed part of the bar
uint8_t ca = max((float((LCD_cols) / float(max_value - min_value)) + 0.5), 1);
lcd.setCursor(strlen(title) + 1, 0); lcd.setCursor(LCD_cols - (size + 1) + 1, 0);
lcd_display_int(value, 3, true, false, false); lcd_display_int(value, size, zeros, brackets, sign);
if (vi == 0 && uint8_t(vf / 2) == 0) if (vi == 0 && uint8_t(vf / 2) == 0)
{ {
@ -3425,41 +3425,26 @@ void lcd_display_bar(const char* title, uint32_t value, uint32_t min_value, uint
for (uint8_t n = 1; n <= ca; n++) for (uint8_t n = 1; n <= ca; n++)
lcd.print(F(" ")); lcd.print(F(" "));
} }
else if (vi == LCD_cols && uint8_t(vf / 2) == 0) else if (vi == LCD_cols - 1 && uint8_t(vf / 2) == 0)
{ {
lcd.setCursor(LCD_cols - ca - 1, 1); lcd.setCursor(LCD_cols - 1 - ca, 1);
lcd.write((uint8_t)4); // full block for (uint8_t n = LCD_cols - 1 - ca; n < LCD_cols; n++)
for (uint8_t n = LCD_cols - ca; n < LCD_cols; n++)
lcd.write((uint8_t)4); // full block lcd.write((uint8_t)4); // full block
} }
else else
{ {
uint8_t b, e; uint8_t b, e;
if (vi - ca < 0) b = max(0, vi - ca);
b = 0; e = min(LCD_cols - 1, vi + ca);
else
b = vi - ca;
if (vi + ca >= LCD_cols)
e = LCD_cols;
else
e = vi + ca;
Serial.print("ca=");
Serial.print(ca);
Serial.print(" b=");
Serial.print(b);
Serial.print(" e=");
Serial.print(e);
Serial.println();
lcd.setCursor(b - 1, 1); lcd.setCursor(b, 1);
for (uint8_t n = b; n <= e; n++) for (uint8_t n = b; n <= e; n++)
{ {
if (n < vi) if (n < vi)
lcd.write((uint8_t)4); // full block lcd.write((uint8_t)4); // full block
else if (n == vi && uint8_t(vf / 2) != 0) else if (n == vi && uint8_t(vf / 2) != 0)
lcd.write((uint8_t)uint8_t(vf / 2) - 1); lcd.write(uint8_t(vf / 2) - 1);
else else
lcd.print(F(" ")); lcd.print(F(" "));
} }

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -144,7 +144,7 @@
#endif #endif
#define CONTROL_RATE_MS 50 #define CONTROL_RATE_MS 50
#define BACK_FROM_VOLUME_MS 1000 #define BACK_FROM_VOLUME_MS 2000
//************************************************************************************************* //*************************************************************************************************
//* DEBUG OUTPUT SETTINGS //* DEBUG OUTPUT SETTINGS

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by
@ -364,7 +364,9 @@ bool Dexed::getSustain(void)
return sustain; return sustain;
} }
void Dexed::panic(void) { void Dexed::panic(void)
{
AudioNoInterrupts();
for (uint8_t i = 0; i < MAX_ACTIVE_NOTES; i++) for (uint8_t i = 0; i < MAX_ACTIVE_NOTES; i++)
{ {
if (voices[i].live == true) { if (voices[i].live == true) {
@ -376,6 +378,7 @@ void Dexed::panic(void) {
} }
} }
} }
AudioInterrupts();
} }
void Dexed::resetControllers(void) void Dexed::resetControllers(void)
@ -471,7 +474,7 @@ bool Dexed::loadPackedVoiceParameters(uint8_t* new_data)
uint8_t tmp; uint8_t tmp;
char dexed_voice_name[11]; char dexed_voice_name[11];
notesOff(); panic();
for (op = 0; op < 6; op++) for (op = 0; op < 6; op++)
{ {
@ -547,11 +550,10 @@ bool Dexed::loadVoiceParameters(uint8_t* new_data)
{ {
char dexed_voice_name[11]; char dexed_voice_name[11];
notesOff(); panic();
memcpy(&data, new_data, 155); memcpy(&data, new_data, 155);
panic();
doRefreshVoice(); doRefreshVoice();
//activate(); //activate();

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -5,7 +5,7 @@
(https://github.com/asb2m10/dexed) for the Teensy-3.5/3.6 with audio shield. (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 Dexed ist heavily based on https://github.com/google/music-synthesizer-for-android
(c)2018,2019 H. Wirtz <wirtz@parasitstudio.de> (c)2018-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019, Holger Wirtz Copyright (c) 2019-2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019, Holger Wirtz Copyright (c) 2019-2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2014, Pete (El Supremo) Copyright (c) 2014, Pete (El Supremo)
Copyright (c) 2019, Holger Wirtz Copyright (c) 2019-2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,6 +1,6 @@
/* /*
Copyright (c) 2014, Pete (El Supremo) Copyright (c) 2014, Pete (El Supremo)
Copyright (c) 2019, Holger Wirtz Copyright (c) 2019-2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019, Holger Wirtz Copyright (c) 2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019, Holger Wirtz Copyright (c) 2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019, Holger Wirtz Copyright (c) 2019-2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,5 +1,5 @@
/* /*
Copyright (c) 2019, Holger Wirtz Copyright (c) 2019-2020, Holger Wirtz
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal

@ -1,10 +1,10 @@
/* /*
MicroMDAEPiano MicroDexed
MicroMDAEPiano is a port of the MDA-EPiano sound engine MicroMDAEPiano is a port of the MDA-EPiano sound engine
(https://sourceforge.net/projects/mda-vst/) for the Teensy-3.5/3.6 with audio shield. (https://sourceforge.net/projects/mda-vst/) for the Teensy-3.5/3.6 with audio shield.
(c)2019 H. Wirtz <wirtz@parasitstudio.de> (c)2019-2020 H. Wirtz <wirtz@parasitstudio.de>
This program is free software; you can redistribute it and/or modify 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 it under the terms of the GNU General Public License as published by

Loading…
Cancel
Save