From 3efacd5b6e69989a6b32c2a7937175658f8df59d Mon Sep 17 00:00:00 2001 From: Holger Wirtz Date: Mon, 30 Dec 2019 17:03:56 +0100 Subject: [PATCH] Fixing the internal setup and instance description. --- MicroDexed.ino | 8 +- config.h | 16 ++-- doc/sysex-format_dexed-setup.txt | 122 ++++++++++++------------------- 3 files changed, 60 insertions(+), 86 deletions(-) diff --git a/MicroDexed.ino b/MicroDexed.ino index 255951e..0e4076e 100644 --- a/MicroDexed.ino +++ b/MicroDexed.ino @@ -1328,8 +1328,6 @@ void initial_values_from_eeprom(bool init) void check_configuration(void) { configuration.instances = constrain(configuration.instances, INSTANCES_MIN, INSTANCES_MAX); - configuration.instance_mode = constrain(configuration.instance_mode, INSTANCE_MODE_MIN, INSTANCE_MODE_MAX); - configuration.instance_splitpoint = constrain(configuration.instance_splitpoint, INSTANCE_SPLITPOINT_MAX, INSTANCE_SPLITPOINT_MAX); configuration.vol = constrain(configuration.vol, VOLUME_MIN, VOLUME_MAX); configuration.mono = constrain(configuration.mono, MONO_MIN, MONO_MAX); configuration.reverb_roomsize = constrain(configuration.reverb_roomsize, REVERB_ROOMSIZE_MIN, REVERB_ROOMSIZE_MAX); @@ -1347,6 +1345,8 @@ void check_configuration(void) configuration.dexed[instance_id].midi_channel = constrain(configuration.dexed[instance_id].midi_channel, MIDI_CHANNEL_MIN, MIDI_CHANNEL_MAX); configuration.dexed[instance_id].bank = constrain(configuration.dexed[instance_id].bank, 0, MAX_BANKS - 1); configuration.dexed[instance_id].voice = constrain(configuration.dexed[instance_id].voice, 0, MAX_VOICES - 1); + configuration.dexed[instance_id].note_start = constrain(configuration.dexed[instance_id].note_start, INSTANCE_NOTE_START_MIN, INSTANCE_NOTE_START_MAX); + configuration.dexed[instance_id].note_end = constrain(configuration.dexed[instance_id].note_end, INSTANCE_NOTE_END_MIN, INSTANCE_NOTE_END_MAX); configuration.dexed[instance_id].reverb_send = constrain(configuration.dexed[instance_id].reverb_send, REVERB_SEND_MIN, REVERB_SEND_MAX); configuration.dexed[instance_id].chorus_send = constrain(configuration.dexed[instance_id].chorus_send, CHORUS_SEND_MIN, CHORUS_SEND_MAX); configuration.dexed[instance_id].delay_send = constrain(configuration.dexed[instance_id].delay_send, DELAY_SEND_MIN, DELAY_SEND_MAX); @@ -1389,8 +1389,6 @@ void init_configuration(void) configuration.checksum = 0xffff; configuration.instances = INSTANCES_DEFAULT; - configuration.instance_mode = INSTANCE_MODE_DEFAULT; - configuration.instance_splitpoint = INSTANCE_SPLITPOINT_DEFAULT; configuration.vol = VOLUME_DEFAULT; configuration.mono = MONO_DEFAULT; configuration.reverb_roomsize = REVERB_ROOMSIZE_DEFAULT; @@ -1408,6 +1406,8 @@ void init_configuration(void) configuration.dexed[instance_id].midi_channel = DEFAULT_MIDI_CHANNEL; configuration.dexed[instance_id].bank = SYSEXBANK_DEFAULT; configuration.dexed[instance_id].voice = SYSEXSOUND_DEFAULT; + configuration.dexed[instance_id].note_start = INSTANCE_NOTE_START_DEFAULT; + configuration.dexed[instance_id].note_end = INSTANCE_NOTE_END_DEFAULT; configuration.dexed[instance_id].reverb_send = REVERB_SEND_DEFAULT; configuration.dexed[instance_id].chorus_send = CHORUS_SEND_DEFAULT; configuration.dexed[instance_id].delay_send = DELAY_SEND_DEFAULT; diff --git a/config.h b/config.h index ae017ac..e842b95 100644 --- a/config.h +++ b/config.h @@ -434,19 +434,21 @@ enum { DEXED, CHORUS, DELAY, REVERB}; #define INSTANCES_MAX NUM_DEXED #define INSTANCES_DEFAULT 1 -#define INSTANCE_MODE_MIN 0 -#define INSTANCE_MODE_MAX 1 -#define INSTANCE_MODE_DEFAULT 0 +#define INSTANCE_NOTE_START_MIN MIDI_AIS0 +#define INSTANCE_NOTE_START_MAX MIDI_B7 +#define INSTANCE_NOTE_START_DEFAULT INSTANCE_NOTE_START_MIN -#define INSTANCE_SPLITPOINT_MIN MIDI_AIS0 -#define INSTANCE_SPLITPOINT_MAX MIDI_B7 -#define INSTANCE_SPLITPOINT_DEFAULT MIDI_C3 +#define INSTANCE_NOTE_END_MIN MIDI_AIS0 +#define INSTANCE_NOTE_END_MAX MIDI_B7 +#define INSTANCE_NOTE_END_DEFAULT INSTANCE_NOTE_END_MAX // typedef struct { uint8_t midi_channel; uint8_t bank; uint8_t voice; + uint8_t note_start; + uint8_t note_end; uint8_t reverb_send; uint8_t chorus_send; uint8_t delay_send; @@ -479,8 +481,6 @@ typedef struct { typedef struct { uint32_t checksum; uint8_t instances; - uint8_t instance_mode; - uint8_t instance_splitpoint; uint8_t vol; uint8_t mono; uint8_t reverb_roomsize; diff --git a/doc/sysex-format_dexed-setup.txt b/doc/sysex-format_dexed-setup.txt index 8afef73..4bf5390 100644 --- a/doc/sysex-format_dexed-setup.txt +++ b/doc/sysex-format_dexed-setup.txt @@ -17,8 +17,8 @@ SYSEX Message Controller-Set | | | - 0ddddddd ** data byte 19 - 0ddddddd ** data byte 20 instance config 0 + 0ddddddd ** data byte 11 + 0ddddddd ** data byte 12 instance config 0 | | | @@ -28,21 +28,21 @@ SYSEX Message Controller-Set | | | - 0ddddddd ** data byte 72 + 0ddddddd ** data byte 75 \-----------------------------------------------------/ /-Optional--------------------------------------------\ - 0ddddddd ** data byte 73 instance config 2 + 0ddddddd ** data byte 76 instance config 2 | | | - 0ddddddd ** data byte 101 + 0ddddddd ** data byte 107 \-----------------------------------------------------/ /-Optional--------------------------------------------\ - 0ddddddd ** data byte 102 instance config 3 + 0ddddddd ** data byte 108 instance config 3 | | | - 0ddddddd ** data byte 131 + 0ddddddd ** data byte 139 \-----------------------------------------------------/ 0eeeeeee ** checksum (masked 2's comp. of sum of ** bytes) 11110111 F7 Status - end sysex @@ -56,71 +56,45 @@ Parameter 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 CHORUS-FREQUENCY 0-100 (multiplied by 1/10 Hz) - 4 GLOBAL CHORUS-WAVEFORM 0-1 (0=triangle, 1=sine) - 5 GLOBAL CHORUS-DEPTH 0-100 - 6 GLOBAL DELAY-TIME 0-60 (multiplied by 10ms) - 7 GLOBAL DELAY-FEEDBACK 0-100 - 8 DEXED 1 MONO/POLY MODE CHANGE 0-1 O=POLY - 9 DEXED 1 PITCH BEND RANGE 0-12 -10 DEXED 1 " " STEP 0-12 -11 DEXED 1 PORTAMENTO MODE 0-1 0=RETAIN 1=FOLLOW -12 DEXED 1 " GLISS 0-1 -13 DEXED 1 " TIME 0-99 -14 DEXED 1 MOD WHEEL RANGE 0-99 -15 DEXED 1 " " ASSIGN 0-7 b0: pitch, b1:amp, b2: EG bias -16 DEXED 1 FOOT CONTROL RANGE 0-99 -17 DEXED 1 " " ASSIGN 0-7 " -18 DEXED 1 BREATH CONT RANGE 0-99 -19 DEXED 1 " " ASSIGN 0-7 " -20 DEXED 1 AFTERTOUCH RANGE 0-99 -21 DEXED 1 " ASSIGN 0-7 " -22 DEXED 1 OP1_ENABLE 0-1 -23 DEXED 1 OP2_ENABLE 0-1 -24 DEXED 1 OP3_ENABLE 0-1 -25 DEXED 1 OP4_ENABLE 0-1 -26 DEXED 1 OP5_ENABLE 0-1 -27 DEXED 1 OP6_ENABLE 0-1 -28 DEXED 1 MAX_NOTES 0-32 -29 DEXED 1 LOUDNESS 0-100 -30 DEXED 1 PANORAMA 0-40 (20 is middle) -31 DEXED 1 REVERB-LEVEL 0-100 -32 DEXED 1 CHORUS-LEVEL 0-100 -33 DEXED 1 DELAY-LEVEL 0-100 -34 DEXED 1 FILTER-CUTOFF 0-100 -35 DEXED 1 FILTER-RESONANCE 0-100 -26 DEXED 1 MIDI-CHANNEL 0-16 (0=OMNI) -37 DEXED 1 POLYPHONY 0-32 (depends on CPU and FX) -38 DEXED 1 ENGINE 0-2 (1=Modern, 2=Mark1, 2=OPL) + 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-60 (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 +14 DEXED 1 NOTE_START 21-108 +15 DEXED 1 NOTE_END 21-108 +16 DEXED 1 REVERB-SEND 0-100 +17 DEXED 1 CHORUS-SEND 0-100 +18 DEXED 1 DELAY-SEND 0-100 +19 DEXED 1 FILTER-CUTOFF 0-100 +20 DEXED 1 FILTER-RESONANCE 0-100 +21 DEXED 1 TRANSPOSE 0-48 +22 DEXED 1 TUNE 1-199 (100=middle) +23 DEXED 1 SOUND_INTENSITY 0-100 +24 DEXED 1 PANORAMA 0-40 (20 is middle) +25 DEXED 1 POLYPHONY 0-32 (depends on CPU and FX) +26 DEXED 1 ENGINE 0-2 (1=Modern, 2=Mark1, 2=OPL) +27 DEXED 1 MONO/POLY MODE CHANGE 0-1 (O=POLY) +28 DEXED 1 PITCH BEND RANGE 0-12 +29 DEXED 1 " " STEP 0-12 +30 DEXED 1 MOD WHEEL RANGE 0-99 +31 DEXED 1 " " ASSIGN 0-7 (b0: pitch, b1: amp, b2: EG bias) +32 DEXED 1 FOOT CONTROL RANGE 0-99 +33 DEXED 1 " " ASSIGN 0-7 " +34 DEXED 1 BREATH CONT RANGE 0-99 +35 DEXED 1 " " ASSIGN 0-7 " +36 DEXED 1 AFTERTOUCH RANGE 0-99 +37 DEXED 1 " ASSIGN 0-7 " +38 DEXED 1 PORTAMENTO MODE 0-1 (0=RETAIN 1=FOLLOW) +39 DEXED 1 " GLISS 0-1 +40 DEXED 1 " TIME 0-99 +41 DEXED 1 OP_ENABLE 0-64 (bit masked MSB: 00nnnnnn) +42 DEXED 1 MAX_POLYPHONY 0-32 --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- --- -39 DEXED 2 MONO/POLY MODE CHANGE 0-1 O=POLY -40 DEXED 2 PITCH BEND RANGE 0-12 -41 DEXED 2 " " STEP 0-12 -42 DEXED 2 PORTAMENTO MODE 0-1 0=RETAIN 1=FOLLOW -43 DEXED 2 " GLISS 0-1 -44 DEXED 2 " TIME 0-99 -45 DEXED 2 MOD WHEEL RANGE 0-99 -46 DEXED 2 " " ASSIGN 0-7 b0: pitch, b1:amp, b2: EG bias -47 DEXED 2 FOOT CONTROL RANGE 0-99 -48 DEXED 2 " " ASSIGN 0-7 " -49 DEXED 2 BREATH CONT RANGE 0-99 -40 DEXED 2 " " ASSIGN 0-7 " -51 DEXED 2 AFTERTOUCH RANGE 0-99 -52 DEXED 2 " ASSIGN 0-7 " -53 DEXED 2 OP1_ENABLE 0-1 -54 DEXED 2 OP2_ENABLE 0-1 -55 DEXED 2 OP3_ENABLE 0-1 -56 DEXED 2 OP4_ENABLE 0-1 -57 DEXED 2 OP5_ENABLE 0-1 -58 DEXED 2 OP6_ENABLE 0-1 -59 DEXED 2 MAX_NOTES 0-32 -60 DEXED 2 LOUDNESS 0-100 -61 DEXED 2 PANORAMA 0-40 (20 is middle) -62 DEXED 2 REVERB-LEVEL 0-100 -63 DEXED 2 CHORUS-LEVEL 0-100 -64 DEXED 2 DELAY-LEVEL 0-100 -65 DEXED 2 FILTER-CUTOFF 0-100 -66 DEXED 2 FILTER-RESONANCE 0-100 -67 DEXED 2 MIDI-CHANNEL 0-16 (0=OMNI) -68 DEXED 2 POLYPHONY 0-32 (depends on CPU and FX) -69 DEXED 2 ENGINE 0-2 (1=Modern, 2=Mark1, 2=OPL)