Several small fixes.

pull/32/head
Holger Wirtz 4 years ago
parent 4bd73a6fb5
commit eeaf8b6f46
  1. 29
      MicroDexed.ino
  2. 2
      UI.hpp
  3. 14
      config.h
  4. 53
      doc/sysex-format_dexed-setup.txt

@ -306,24 +306,6 @@ void setup()
}
}
/*
// Init EEPROM if both buttons are pressed at startup
if (digitalRead(BUT_R_PIN) == HIGH && digitalRead(BUT_L_PIN) == HIGH)
{
#ifdef DEBUG
Serial.println(F("Init EEPROM"));
#endif
lcd.clear();
lcd.setCursor(0, 0);
lcd.print(F("INIT"));
lcd.setCursor(0, 1);
lcd.print(F("EEPROM"));
initial_values_from_eeprom(true);
delay(2000);
}
else
initial_values_from_eeprom(false);
*/
initial_values_from_eeprom(false);
#if defined(TEENSY_AUDIO_BOARD)
@ -1521,6 +1503,15 @@ void eeprom_update(void)
/******************************************************************************
HELPERS
******************************************************************************/
// https://www.reddit.com/r/Teensy/comments/7r19uk/reset_and_reboot_teensy_lc_via_code/
#define SCB_AIRCR (*(volatile uint32_t *)0xE000ED0C) // Application Interrupt and Reset Control location
void _softRestart(void)
{
Serial.end(); //clears the serial monitor if used
SCB_AIRCR = 0x05FA0004; //write value for restart
}
uint32_t crc32(byte * calc_start, uint16_t calc_bytes) // base code from https://www.arduino.cc/en/Tutorial/EEPROMCrc
{
const uint32_t crc_table[16] =
@ -1804,7 +1795,7 @@ void show_configuration(void)
Serial.print(F(" Breathctrl Assign ")); Serial.println(configuration.dexed[instance_id].bc_assign, DEC);
Serial.print(F(" Breathctrl Mode ")); Serial.println(configuration.dexed[instance_id].bc_mode, DEC);
Serial.print(F(" Aftertouch Range ")); Serial.println(configuration.dexed[instance_id].at_range, DEC);
Serial.print(F(" Aftertouch Assign ")); Serial.println(configuration.dexed[instance_id].at_range, DEC);
Serial.print(F(" Aftertouch Assign ")); Serial.println(configuration.dexed[instance_id].at_assign, DEC);
Serial.print(F(" Aftertouch Mode ")); Serial.println(configuration.dexed[instance_id].at_mode, DEC);
Serial.print(F(" Portamento Mode ")); Serial.println(configuration.dexed[instance_id].portamento_mode, DEC);
Serial.print(F(" Portamento Glissando ")); Serial.println(configuration.dexed[instance_id].portamento_glissando, DEC);

@ -59,6 +59,7 @@ extern bool get_voice_names_from_bank(uint8_t b, uint8_t instance_id);
extern bool load_sysex(uint8_t b, uint8_t v);
extern void generate_version_string(char* buffer, uint8_t len);
extern void initial_values_from_eeprom(bool init);
extern void _softRestart(void);
#ifdef DISPLAY_LCD_SPI
extern void change_disp_sd(bool d);
@ -2989,6 +2990,7 @@ void UI_func_eeprom_reset(uint8_t param)
lcd.setCursor(0, 1);
lcd.print("Done.");
delay(500);
_softRestart();
}
encoderDir[ENC_R].reset();
}

@ -438,18 +438,18 @@ enum { DEXED, CHORUS, DELAY, REVERB};
#define FC_MODE_MIN 0
#define FC_MODE_MAX MIDI_CONTROLLER_MODE_MAX
#define FC_MODE_DEFAULT 1
#define FC_MODE_DEFAULT 0
#define BC_RANGE_MIN 0
#define BC_RANGE_MAX 99
#define BC_RANGE_DEFAULT 50
#define BC_ASSIGN_MIN 0
#define BC_ASSIGN_MAX 0
#define BC_ASSIGN_DEFAULT 2 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define BC_ASSIGN_MAX 7
#define BC_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define BC_MODE_MIN 0
#define BC_MODE_MAX 0
#define BC_MODE_MAX MIDI_CONTROLLER_MODE_MAX
#define BC_MODE_DEFAULT 0
#define AT_RANGE_MIN 0
@ -457,12 +457,12 @@ enum { DEXED, CHORUS, DELAY, REVERB};
#define AT_RANGE_DEFAULT 50
#define AT_ASSIGN_MIN 0
#define AT_ASSIGN_MAX 0
#define AT_ASSIGN_MAX 7
#define AT_ASSIGN_DEFAULT 0 // Bitmapped: 0: Pitch, 1: Amp, 2: Bias
#define AT_MODE_MIN 0
#define AT_MODE_MAX 0
#define AT_MODE_DEFAULT 1
#define AT_MODE_MAX MIDI_CONTROLLER_MODE_MAX
#define AT_MODE_DEFAULT 0
#define OP_ENABLED_MIN 0
#define OP_ENABLED_MAX 0x3f

@ -6,7 +6,7 @@ SYSEX Message Controller-Set
11110000 F0 Status byte - start sysex
0iiiiiii 67 ID # (i=103; unofficial SYSEX-ID for MicroDexed)
0fffffff ** format number (f=66..69; 1..4 MicroDexed setup(s))
0fffffff ** format number (f=66 MicroDexed config)
0ddddddd ** data byte 1 setup config
| | |
@ -17,47 +17,11 @@ SYSEX Message Controller-Set
| | |
0ddddddd ** data byte 44
/-Optional--------------------------------------------\
0ddddddd ** data byte 45 instance config 1
| | |
0ddddddd ** data byte 74
\-----------------------------------------------------/
/-Optional--------------------------------------------\
0ddddddd ** data byte 75 instance config 2
| | |
0ddddddd ** data byte 105
\-----------------------------------------------------/
/-Optional--------------------------------------------\
0ddddddd ** data byte 106 instance config 3
| | |
0ddddddd ** data byte 137
\-----------------------------------------------------/
0eeeeeee ** checksum (masked 2's comp. of sum of ** bytes)
11110111 F7 Status - end sysex
Data Structure: MicroDexed Setup Dump
-------------------------------------
Number Parameter Value Range
--------- --------- -----------
0 GLOBAL STERO/MONO 0-3 (0=stereo, 1=mono, 2=mono-r, 3=mono-l)
1 GLOBAL REVERB-ROOMSIZE 0-100
2 GLOBAL REVERB-DAMPING 0-100
3 GLOBAL REVERB-LEVEL 0-100
4 GLOBAL CHORUS-FREQUENCY 0-100 (multiplied by 1/10 Hz)
5 GLOBAL CHORUS-WAVEFORM 0-1 (0=triangle, 1=sine)
6 GLOBAL CHORUS-DEPTH 0-100
7 GLOBAL CHORUS-LEVEL 0-100
8 GLOBAL DELAY-TIME 0-50 (multiplied by 10ms)
9 GLOBAL DELAY-FEEDBACK 0-100
10 GLOBAL DELAY-LEVEL 0-100
--- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- ---
11 DEXED 1 MIDI-CHANNEL 0-16 (0=OMNI)
12 DEXED 1 BANK 0-99
13 DEXED 1 VOICE 0-31
@ -89,3 +53,18 @@ Data Structure: MicroDexed Setup Dump
39 DEXED 1 " GLISS 0-1
40 DEXED 1 " TIME 0-99
41 DEXED 1 OP_ENABLE 0-31
---------
Number Parameter Value Range
--------- --------- -----------
0 GLOBAL STERO/MONO 0-3 (0=stereo, 1=mono, 2=mono-r, 3=mono-l)
1 GLOBAL REVERB-ROOMSIZE 0-100
2 GLOBAL REVERB-DAMPING 0-100
3 GLOBAL REVERB-LEVEL 0-100
4 GLOBAL CHORUS-FREQUENCY 0-100 (multiplied by 1/10 Hz)
5 GLOBAL CHORUS-WAVEFORM 0-1 (0=triangle, 1=sine)
6 GLOBAL CHORUS-DEPTH 0-100
7 GLOBAL CHORUS-LEVEL 0-100
8 GLOBAL DELAY-TIME 0-50 (multiplied by 10ms)
9 GLOBAL DELAY-FEEDBACK 0-100
10 GLOBAL DELAY-LEVEL 0-100

Loading…
Cancel
Save