|
|
@ -407,10 +407,10 @@ int perform_release_mod[NUM_DEXED] = { 0 }; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
|
// Allocate the delay lines for chorus
|
|
|
|
// Allocate the delay lines for chorus
|
|
|
|
int16_t delayline[NUM_DEXED][MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
int16_t* delayline[NUM_DEXED]; |
|
|
|
#ifdef USE_EPIANO |
|
|
|
#ifdef USE_EPIANO |
|
|
|
int16_t ep_delayline_r[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
int16_t* ep_delayline_r; |
|
|
|
int16_t ep_delayline_l[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
int16_t* ep_delayline_l; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
@ -589,7 +589,8 @@ void setup() |
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_EPIANO) |
|
|
|
#if defined(USE_EPIANO) |
|
|
|
// EP_CHORUS
|
|
|
|
// EP_CHORUS
|
|
|
|
memset(ep_delayline_r, 0, sizeof(ep_delayline_r)); |
|
|
|
ep_delayline_l = new int16_t[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
|
|
|
|
memset(ep_delayline_r, 0, MOD_DELAY_SAMPLE_BUFFER * sizeof(int16_t)); |
|
|
|
if (!ep_modchorus_r.begin(ep_delayline_r, MOD_DELAY_SAMPLE_BUFFER)) |
|
|
|
if (!ep_modchorus_r.begin(ep_delayline_r, MOD_DELAY_SAMPLE_BUFFER)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -597,7 +598,8 @@ void setup() |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
while (1); |
|
|
|
while (1); |
|
|
|
} |
|
|
|
} |
|
|
|
memset(ep_delayline_l, 0, sizeof(ep_delayline_l)); |
|
|
|
ep_delayline_r = new int16_t[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
|
|
|
|
memset(ep_delayline_l, 0, MOD_DELAY_SAMPLE_BUFFER * sizeof(int16_t)); |
|
|
|
if (!ep_modchorus_l.begin(ep_delayline_l, MOD_DELAY_SAMPLE_BUFFER)) |
|
|
|
if (!ep_modchorus_l.begin(ep_delayline_l, MOD_DELAY_SAMPLE_BUFFER)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
@ -628,8 +630,9 @@ void setup() |
|
|
|
// Setup effects
|
|
|
|
// Setup effects
|
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
memset(delayline[instance_id], 0, sizeof(delayline[instance_id])); |
|
|
|
delayline[instance_id] = new int16_t[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
|
|
|
|
memset(delayline[instance_id], 0, MOD_DELAY_SAMPLE_BUFFER * sizeof(int16_t)); |
|
|
|
if (!modchorus[instance_id]->begin(delayline[instance_id], MOD_DELAY_SAMPLE_BUFFER)) { |
|
|
|
if (!modchorus[instance_id]->begin(delayline[instance_id], MOD_DELAY_SAMPLE_BUFFER)) { |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.print(F("AudioEffectModulatedDelay - begin failed [")); |
|
|
|
Serial.print(F("AudioEffectModulatedDelay - begin failed [")); |
|
|
@ -653,7 +656,7 @@ void setup() |
|
|
|
sd_card = check_sd_cards(); |
|
|
|
sd_card = check_sd_cards(); |
|
|
|
|
|
|
|
|
|
|
|
if (sd_card < 1) |
|
|
|
if (sd_card < 1) |
|
|
|
{ |
|
|
|
{ |
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
Serial.println(F("SD card not accessable.")); |
|
|
|
Serial.println(F("SD card not accessable.")); |
|
|
|
#endif |
|
|
|
#endif |
|
|
@ -691,7 +694,7 @@ void setup() |
|
|
|
// Load voices
|
|
|
|
// Load voices
|
|
|
|
#ifdef DEBUG |
|
|
|
#ifdef DEBUG |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Serial.print(F("Dexed instance ")); |
|
|
|
Serial.print(F("Dexed instance ")); |
|
|
|
Serial.print(instance_id); |
|
|
|
Serial.print(instance_id); |
|
|
|
Serial.println(F(":")); |
|
|
|
Serial.println(F(":")); |
|
|
@ -717,7 +720,7 @@ void setup() |
|
|
|
// Init master_mixer
|
|
|
|
// Init master_mixer
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
#if NUM_DEXED > 1 |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
for (uint8_t instance_id = 0; instance_id < NUM_DEXED; instance_id++) |
|
|
|
{ |
|
|
|
{ |
|
|
|
master_mixer_r.gain(instance_id, VOL_MAX_FLOAT); |
|
|
|
master_mixer_r.gain(instance_id, VOL_MAX_FLOAT); |
|
|
|
master_mixer_l.gain(instance_id, VOL_MAX_FLOAT); |
|
|
|
master_mixer_l.gain(instance_id, VOL_MAX_FLOAT); |
|
|
|
} |
|
|
|
} |
|
|
|