|
|
|
@ -236,7 +236,7 @@ extern void getNoteName(char* noteName, uint8_t noteNumber); |
|
|
|
|
void setup() |
|
|
|
|
{ |
|
|
|
|
// Start audio system
|
|
|
|
|
AudioNoInterrupts(); |
|
|
|
|
//AudioNoInterrupts();
|
|
|
|
|
AudioMemory(AUDIO_MEM); |
|
|
|
|
|
|
|
|
|
#ifdef DISPLAY_LCD_SPI |
|
|
|
@ -259,6 +259,7 @@ void setup() |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
generate_version_string(version_string, sizeof(version_string)); |
|
|
|
|
|
|
|
|
@ -269,7 +270,11 @@ void setup() |
|
|
|
|
Serial.println(version_string); |
|
|
|
|
Serial.print(F("CPU-Speed: ")); |
|
|
|
|
Serial.print(F_CPU / 1000000.0, 1); |
|
|
|
|
Serial.println(F(" MHz")); |
|
|
|
|
Serial.print(F(" MHz / ")); |
|
|
|
|
Serial.print(NUM_DEXED, DEC); |
|
|
|
|
Serial.print(F(" Instances with ")); |
|
|
|
|
Serial.print(MAX_NOTES); |
|
|
|
|
Serial.println(F(" notes for each instance")); |
|
|
|
|
Serial.println(F("<setup start>")); |
|
|
|
|
Serial.flush(); |
|
|
|
|
#endif |
|
|
|
@ -473,7 +478,7 @@ void setup() |
|
|
|
|
master_mixer_r.gain(3, 0.0); |
|
|
|
|
master_mixer_l.gain(3, 0.0); |
|
|
|
|
|
|
|
|
|
AudioInterrupts(); |
|
|
|
|
//AudioInterrupts();
|
|
|
|
|
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("<setup end>")); |
|
|
|
@ -1504,11 +1509,7 @@ void check_configuration(void) |
|
|
|
|
configuration.dexed[instance_id].pan = constrain(configuration.dexed[instance_id].pan, PANORAMA_MIN, PANORAMA_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); |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony + ((POLYPHONY_MAX % 2) - instance_id) , POLYPHONY_MIN, POLYPHONY_MAX / 2); |
|
|
|
|
#else |
|
|
|
|
configuration.dexed[instance_id].polyphony = constrain(configuration.dexed[instance_id].polyphony, POLYPHONY_MIN, POLYPHONY_MAX); |
|
|
|
|
#endif |
|
|
|
|
configuration.dexed[instance_id].velocity_level = constrain(configuration.dexed[instance_id].velocity_level, VELOCITY_LEVEL_MIN, VELOCITY_LEVEL_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); |
|
|
|
@ -1576,11 +1577,7 @@ void init_configuration(void) |
|
|
|
|
configuration.dexed[instance_id].pan = PANORAMA_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].transpose = TRANSPOSE_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].tune = TUNE_DEFAULT; |
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
configuration.dexed[instance_id].polyphony = (POLYPHONY_DEFAULT / 2) + (POLYPHONY_DEFAULT % 2) - instance_id; |
|
|
|
|
#else |
|
|
|
|
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT; |
|
|
|
|
#endif |
|
|
|
|
configuration.dexed[instance_id].velocity_level = VELOCITY_LEVEL_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].engine = ENGINE_DEFAULT; |
|
|
|
|
configuration.dexed[instance_id].monopoly = MONOPOLY_DEFAULT; |
|
|
|
@ -1616,18 +1613,8 @@ void init_configuration(void) |
|
|
|
|
configuration.performance.bank[instance_id] = SYSEXBANK_DEFAULT; |
|
|
|
|
configuration.performance.voice[instance_id] = SYSEXSOUND_DEFAULT; |
|
|
|
|
|
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT / 2; |
|
|
|
|
#else |
|
|
|
|
if (instance_id == 0) |
|
|
|
|
{ |
|
|
|
|
configuration.dexed[instance_id].polyphony = POLYPHONY_DEFAULT; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
configuration.dexed[instance_id].polyphony = 0; |
|
|
|
|
} |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
MicroDexed[instance_id]->controllers.refresh(); |
|
|
|
|