|
|
|
@ -407,10 +407,10 @@ int perform_release_mod[NUM_DEXED] = { 0 }; |
|
|
|
|
#endif |
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
// Allocate the delay lines for chorus
|
|
|
|
|
int16_t delayline[NUM_DEXED][MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
|
int16_t* delayline[NUM_DEXED]; |
|
|
|
|
#ifdef USE_EPIANO |
|
|
|
|
int16_t ep_delayline_r[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
|
int16_t ep_delayline_l[MOD_DELAY_SAMPLE_BUFFER]; |
|
|
|
|
int16_t* ep_delayline_r; |
|
|
|
|
int16_t* ep_delayline_l; |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
@ -589,7 +589,8 @@ void setup() |
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
#if defined(USE_EPIANO) |
|
|
|
|
// 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)) |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -597,7 +598,8 @@ void setup() |
|
|
|
|
#endif |
|
|
|
|
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)) |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
@ -628,8 +630,9 @@ void setup() |
|
|
|
|
// Setup effects
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
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)) { |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.print(F("AudioEffectModulatedDelay - begin failed [")); |
|
|
|
@ -653,9 +656,9 @@ void setup() |
|
|
|
|
sd_card = check_sd_cards(); |
|
|
|
|
|
|
|
|
|
if (sd_card < 1) |
|
|
|
|
{ |
|
|
|
|
{ |
|
|
|
|
#ifdef DEBUG |
|
|
|
|
Serial.println(F("SD card not accessable.")); |
|
|
|
|
Serial.println(F("SD card not accessable.")); |
|
|
|
|
#endif |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
@ -691,8 +694,8 @@ void setup() |
|
|
|
|
// Load voices
|
|
|
|
|
#ifdef DEBUG |
|
|
|
|
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.println(F(":")); |
|
|
|
|
Serial.print(F("Bank/Voice [")); |
|
|
|
@ -717,8 +720,8 @@ void setup() |
|
|
|
|
// Init master_mixer
|
|
|
|
|
#if NUM_DEXED > 1 |
|
|
|
|
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); |
|
|
|
|
} |
|
|
|
|
#else |
|
|
|
@ -2507,7 +2510,7 @@ void set_fx_params(void) |
|
|
|
|
uint16_t midi_sync_delay_time = uint16_t(60000.0 * midi_ticks_factor[configuration.fx.delay_sync[instance_id]] / seq.seq_bpm); |
|
|
|
|
delay_fx[instance_id]->delay(0, constrain(midi_sync_delay_time, DELAY_TIME_MIN, DELAY_TIME_MAX * 10)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// REVERB SEND
|
|
|
|
|
reverb_mixer_r.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); |
|
|
|
|
reverb_mixer_l.gain(instance_id, volume_transform(mapfloat(configuration.fx.reverb_send[instance_id], REVERB_SEND_MIN, REVERB_SEND_MAX, 0.0, VOL_MAX_FLOAT))); |
|
|
|
|