@ -85,9 +85,7 @@ AudioSynthWaveform ep_chorus_modulator;
# if MOD_FILTER_OUTPUT != MOD_NO_FILTER_OUTPUT
AudioFilterBiquad ep_modchorus_filter ;
# endif
AudioEffectModulatedDelay ep_modchorus_r ;
AudioEffectModulatedDelay ep_modchorus_l ;
AudioAmplifier ep_chorus_inverter ;
AudioEffectModulatedDelayStereo ep_modchorus ;
AudioMixer < 2 > ep_chorus_mixer_r ;
AudioMixer < 2 > ep_chorus_mixer_l ;
# endif
@ -254,19 +252,16 @@ AudioConnection patchCord[] = {
# if defined(USE_FX)
{ ep_stereo_panorama , 0 , ep_chorus_mixer_r , 0 } ,
{ ep_stereo_panorama , 1 , ep_chorus_mixer_l , 0 } ,
{ ep_stereo_panorama , 0 , ep_modchorus_r , 0 } ,
{ ep_stereo_panorama , 1 , ep_modchorus_l , 0 } ,
{ ep_stereo_panorama , 0 , ep_modchorus , 0 } ,
{ ep_stereo_panorama , 1 , ep_modchorus , 1 } ,
# if MOD_FILTER_OUTPUT != MOD_NO_FILTER_OUTPUT
{ ep_chorus_modulator , 0 , ep_modchorus_filter , 0 } ,
{ ep_modchorus_filter , 0 , ep_modchorus_r , 1 } ,
{ ep_modchorus_filter , 0 , ep_chorus_inverter , 0 } ,
{ ep_modchorus_filter , 0 , ep_modchorus , 2 } ,
# else
{ ep_chorus_modulator , 0 , ep_modchorus_r , 1 } ,
{ ep_chorus_modulator , 0 , ep_chorus_inverter , 0 } ,
{ ep_chorus_modulator , 0 , ep_modchorus , 2 } ,
# endif
{ ep_chorus_inverter , 0 , ep_modchorus_l , 1 } ,
{ ep_modchorus_r , 0 , ep_chorus_mixer_r , 1 } ,
{ ep_modchorus_l , 0 , ep_chorus_mixer_l , 1 } ,
{ ep_modchorus , 0 , ep_chorus_mixer_r , 1 } ,
{ ep_modchorus , 1 , ep_chorus_mixer_l , 1 } ,
{ ep_chorus_mixer_r , 0 , reverb_mixer_r , REVERB_MIX_CH_EPIANO } ,
{ ep_chorus_mixer_l , 0 , reverb_mixer_l , REVERB_MIX_CH_EPIANO } ,
{ ep_stereo_panorama , 0 , master_mixer_r , MASTER_MIX_CH_EPIANO } ,
@ -588,41 +583,26 @@ void setup()
# if defined(USE_EPIANO)
// EP_CHORUS
ep_delayline_r = ( int16_t * ) malloc ( MOD_DELAY_SAMPLE_BUFFER * sizeof ( int16_t ) ) ;
if ( ep_delayline_r ! = NULL )
{
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
Serial . println ( F ( " AudioEffectModulatedDelay R - begin failed EP " ) ) ;
# endif
while ( 1 ) ;
}
}
else
if ( ep_delayline_r = = NULL )
{
# ifdef DEBUG
Serial . println ( F ( " AudioEffectModulatedDelay R - memory allocation failed EP " ) ) ;
# endif
while ( 1 ) ;
}
ep_delayline_l = ( int16_t * ) malloc ( MOD_DELAY_SAMPLE_BUFFER * sizeof ( int16_t ) ) ;
if ( ep_delayline_l ! = NULL )
{
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_delayline_l = = NULL )
{
# ifdef DEBUG
Serial . println ( F ( " AudioEffectModulatedDelay L - begi n failed EP " ) ) ;
Serial . println ( F ( " AudioEffectModulatedDelay L - memory allocation failed EP " ) ) ;
# endif
while ( 1 ) ;
}
}
els e
if ( ! ep_modchorus . b egin ( ep_delayline_r , ep_delayline_l , MOD_DELAY_SAMPLE_BUFFER ) )
{
# ifdef DEBUG
Serial . println ( F ( " AudioEffectModulatedDelay L - memory allocatio n failed EP " ) ) ;
Serial . println ( F ( " AudioEffectModulatedDelayStereo - begi n failed EP " ) ) ;
# endif
while ( 1 ) ;
}
@ -641,7 +621,6 @@ void setup()
ep_chorus_mixer_l . gain ( 0 , 1.0 ) ;
ep_chorus_mixer_r . gain ( 1 , mapfloat ( EP_CHORUS_LEVEL_DEFAULT , EP_CHORUS_LEVEL_MIN , EP_CHORUS_LEVEL_MAX , 0.0 , 0.5 ) ) ;
ep_chorus_mixer_l . gain ( 1 , mapfloat ( EP_CHORUS_LEVEL_DEFAULT , EP_CHORUS_LEVEL_MIN , EP_CHORUS_LEVEL_MAX , 0.0 , 0.5 ) ) ;
ep_chorus_inverter . gain ( - 1.0 ) ;
ep_stereo_panorama . panorama ( mapfloat ( EP_PANORAMA_DEFAULT , EP_PANORAMA_MIN , EP_PANORAMA_MAX , - 1.0 , 1.0 ) ) ;
# endif
# endif
@ -797,6 +776,8 @@ void setup()
Serial . println ( F ( " <setup end> " ) ) ;
# endif
ep_modchorus . set_bypass ( true ) ;
strcpy ( seq . seq_name , " INIT Perf " ) ;
LCDML . OTHER_jumpToFunc ( UI_func_voice_select ) ;
}
@ -2608,7 +2589,6 @@ void set_fx_params(void)
ep_chorus_mixer_l . gain ( 0 , 1.0 ) ;
ep_chorus_mixer_r . gain ( 1 , mapfloat ( configuration . fx . ep_chorus_level , EP_CHORUS_LEVEL_MIN , EP_CHORUS_LEVEL_MAX , 0.0 , 0.5 ) ) ;
ep_chorus_mixer_l . gain ( 1 , mapfloat ( configuration . fx . ep_chorus_level , EP_CHORUS_LEVEL_MIN , EP_CHORUS_LEVEL_MAX , 0.0 , 0.5 ) ) ;
ep_chorus_inverter . gain ( - 1.0 ) ;
# endif
# endif