Added menus for transpose and tune.

Optimization of handling of menu functions.
pull/17/head
Holger Wirtz 5 years ago
parent bd6b251441
commit d1706cfe92
  1. 8
      MicroDexed.ino
  2. 624
      UI.hpp
  3. 10
      config.h
  4. 4
      dexed_sysex.cpp

@ -1181,6 +1181,8 @@ void check_configuration(void)
configuration.dexed[instance_id].filter_cutoff = constrain(configuration.dexed[instance_id].filter_cutoff, FILTER_CUTOFF_MIN, FILTER_CUTOFF_MAX);
configuration.dexed[instance_id].filter_resonance = constrain(configuration.dexed[instance_id].filter_resonance, FILTER_RESONANCE_MIN, FILTER_RESONANCE_MAX);
configuration.dexed[instance_id].loudness = constrain(configuration.dexed[instance_id].loudness, LOUDNESS_MIN, LOUDNESS_MAX);
configuration.dexed[instance_id].transpose = constrain(configuration.dexed[instance_id].transpose, TRANSPOSE_MIN, TRANSPOSE_MAX);
configuration.dexed[instance_id].tune = constrain(configuration.dexed[instance_id].tune, TUNE_MIN, TUNE_MAX);
configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony, POLYPHONY_MIN, POLYPHONY_MAX);
configuration.dexed[instance_id].engine = constrain(configuration.dexed[instance_id].engine, ENGINE_MIN, ENGINE_MAX);
configuration.dexed[instance_id].monopoly = constrain(configuration.dexed[instance_id].monopoly, MONOPOLY_MIN, MONOPOLY_MAX);
@ -1228,7 +1230,9 @@ void init_configuration(void)
configuration.dexed[instance_id].delay_send = DELAY_SEND_DEFAULT;
configuration.dexed[instance_id].filter_cutoff = FILTER_CUTOFF_DEFAULT;
configuration.dexed[instance_id].filter_resonance = FILTER_RESONANCE_DEFAULT;
configuration.dexed[instance_id].loudness = LOUDNESS_DEFAULT;
configuration.dexed[instance_id].loudness = TRANSPOSE_DEFAULT;
configuration.dexed[instance_id].transpose = TUNE_DEFAULT;
configuration.dexed[instance_id].tune = LOUDNESS_DEFAULT;
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT;
configuration.dexed[instance_id].engine = ENGINE_DEFAULT;
configuration.dexed[instance_id].monopoly = MONOPOLY_DEFAULT;
@ -1362,6 +1366,8 @@ void show_configuration(void)
Serial.print(F(" Filter Cutoff ")); Serial.println(configuration.dexed[instance_id].filter_cutoff, DEC);
Serial.print(F(" Filter Resonance ")); Serial.println(configuration.dexed[instance_id].filter_resonance, DEC);
Serial.print(F(" Loudness ")); Serial.println(configuration.dexed[instance_id].loudness, DEC);
Serial.print(F(" Transpose ")); Serial.println(configuration.dexed[instance_id].transpose, DEC);
Serial.print(F(" Tune ")); Serial.println(configuration.dexed[instance_id].tune, DEC);
Serial.print(F(" Polyphony ")); Serial.println(configuration.dexed[instance_id].polyphony, DEC);
Serial.print(F(" Engine ")); Serial.println(configuration.dexed[instance_id].engine, DEC);
Serial.print(F(" Mono/Poly ")); Serial.println(configuration.dexed[instance_id].monopoly, DEC);

624
UI.hpp

File diff suppressed because it is too large Load Diff

@ -331,6 +331,14 @@ enum { DEXED, REVERB, DELAY, CHORUS };
#define FILTER_RESONANCE_MAX 100
#define FILTER_RESONANCE_DEFAULT 0
#define TRANSPOSE_MIN 0
#define TRANSPOSE_MAX 48
#define TRANSPOSE_DEFAULT 12
#define TUNE_MIN 0
#define TUNE_MAX 10
#define TUNE_DEFAULT 0
#define LOUDNESS_MIN 0
#define LOUDNESS_MAX 100
#define LOUDNESS_DEFAULT 100
@ -425,6 +433,8 @@ typedef struct {
uint8_t delay_send;
uint8_t filter_cutoff;
uint8_t filter_resonance;
uint8_t transpose;
uint8_t tune;
uint8_t loudness;
uint8_t polyphony;
uint8_t engine;

@ -254,7 +254,9 @@ bool load_sysex(uint8_t b, uint8_t v, uint8_t instance_id)
Serial.print(voice_names[instance_id][v]);
Serial.println(F("]"));
#endif
return (MicroDexed[instance_id]->loadPackedVoiceParameters(data));
bool ret = MicroDexed[instance_id]->loadPackedVoiceParameters(data);
configuration.dexed[instance_id].transpose = MicroDexed[instance_id]->data[DEXED_VOICE_OFFSET + DEXED_TRANSPOSE];
return (ret);
}
#ifdef DEBUG
else

Loading…
Cancel
Save