@ -127,9 +127,9 @@ AudioConnection patchCord13(stereo2mono, 1, dacOut, 1);
//
//
uint8_t nDynamic = 0 ;
uint8_t nDynamic = 0 ;
# if defined(USE_FX) && MOD_FILTER_OUTPUT != MOD_NO_FILTER_OUTPUT
# if defined(USE_FX) && MOD_FILTER_OUTPUT != MOD_NO_FILTER_OUTPUT
AudioConnection * dynamicConnections [ NUM_DEXED * 19 ] ;
# elif defined(USE_FX) && MOD_FILTER_OUTPUT == MOD_NO_FILTER_OUTPUT
AudioConnection * dynamicConnections [ NUM_DEXED * 17 ] ;
AudioConnection * dynamicConnections [ NUM_DEXED * 17 ] ;
# elif defined(USE_FX) && MOD_FILTER_OUTPUT == MOD_NO_FILTER_OUTPUT
AudioConnection * dynamicConnections [ NUM_DEXED * 16 ] ;
# else
# else
AudioConnection * dynamicConnections [ NUM_DEXED * 5 ] ;
AudioConnection * dynamicConnections [ NUM_DEXED * 5 ] ;
# endif
# endif
@ -171,8 +171,10 @@ void create_audio_engine_chain(uint8_t instance_id)
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * delay_mixer [ instance_id ] , 0 , * delay_fb_mixer [ instance_id ] , 1 ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * delay_mixer [ instance_id ] , 0 , * delay_fb_mixer [ instance_id ] , 1 ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 0 , reverb_mixer_r , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 0 , reverb_mixer_r , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 1 , reverb_mixer_l , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 1 , reverb_mixer_l , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 0 , master_mixer_r , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 1 , master_mixer_l , instance_id ) ;
# else
# else
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * dexed_level [ instance_id ] , 0 , mono2stereo [ instance_id ] , 0 ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * dexed_level [ instance_id ] , 0 , * mono2stereo [ instance_id ] , 0 ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 0 , master_mixer_r , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 0 , master_mixer_r , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 1 , master_mixer_l , instance_id ) ;
dynamicConnections [ nDynamic + + ] = new AudioConnection ( * mono2stereo [ instance_id ] , 1 , master_mixer_l , instance_id ) ;
# endif
# endif
@ -397,9 +399,6 @@ void setup()
# endif
# endif
# endif
# endif
master_mixer_r . gain ( 0 , 1.0 ) ;
master_mixer_l . gain ( 0 , 1.0 ) ;
set_fx_params ( ) ;
set_fx_params ( ) ;
for ( uint8_t instance_id = 0 ; instance_id < NUM_DEXED ; instance_id + + )
for ( uint8_t instance_id = 0 ; instance_id < NUM_DEXED ; instance_id + + )
@ -412,7 +411,12 @@ void setup()
// INIT DEXED VOICE CONFIG
// INIT DEXED VOICE CONFIG
set_voiceconfig_params ( instance_id ) ;
set_voiceconfig_params ( instance_id ) ;
master_mixer_r . gain ( instance_id , 1.0 ) ;
master_mixer_l . gain ( instance_id , 1.0 ) ;
}
}
master_mixer_r . gain ( 3 , 1.0 ) ;
master_mixer_l . gain ( 3 , 1.0 ) ;
set_sys_params ( ) ;
set_sys_params ( ) ;
@ -703,7 +707,7 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue)
}
}
case 106 : // CC 106: delay feedback
case 106 : // CC 106: delay feedback
configuration . fx . delay_feedback [ instance_id ] = map ( inValue , 0 , 0x7f , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX ) ;
configuration . fx . delay_feedback [ instance_id ] = map ( inValue , 0 , 0x7f , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX ) ;
delay_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_feedback [ instance_id ] , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX , 0.0 , 1.0 ) ) ; // amount of feedback
delay_fb_ mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_feedback [ instance_id ] , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX , 0.0 , 1.0 ) ) ; // amount of feedback
if ( LCDML . FUNC_getID ( ) = = LCDML . OTHER_getIDFromFunction ( UI_func_delay_feedback ) )
if ( LCDML . FUNC_getID ( ) = = LCDML . OTHER_getIDFromFunction ( UI_func_delay_feedback ) )
{
{
LCDML . OTHER_updateFunc ( ) ;
LCDML . OTHER_updateFunc ( ) ;
@ -1351,9 +1355,11 @@ void initial_values_from_eeprom(bool init)
# if defined(USE_FX)
# if defined(USE_FX)
chorus_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
chorus_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
chorus_mixer [ instance_id ] - > gain ( 1 , configuration . fx . chorus_level [ instance_id ] / 100.0 ) ;
chorus_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . chorus_level [ instance_id ] , CHORUS_LEVEL_MIN , CHORUS_LEVEL_MAX , 0.0 , 1.0 ) ) ;
delay_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_mixer [ instance_id ] - > gain ( 0 , configuration . fx . delay_level [ instance_id ] / 100.0 ) ;
delay_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_level [ instance_id ] , DELAY_LEVEL_MIN , DELAY_LEVEL_MAX , 0.0 , 1.0 ) ) ;
delay_fb_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_fb_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_feedback [ instance_id ] , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX , 0.0 , 1.0 ) ) ;
// MicroDexed[instance_id]->fx.Gain = configuration.dexed[instance_id].sound_intensity / 100.0;
// MicroDexed[instance_id]->fx.Gain = configuration.dexed[instance_id].sound_intensity / 100.0;
MicroDexed [ instance_id ] - > fx . Gain = 1.0 ;
MicroDexed [ instance_id ] - > fx . Gain = 1.0 ;
@ -1646,6 +1652,8 @@ void set_fx_params(void)
for ( uint8_t instance_id = 0 ; instance_id < NUM_DEXED ; instance_id + + )
for ( uint8_t instance_id = 0 ; instance_id < NUM_DEXED ; instance_id + + )
{
{
// CHORUS
// CHORUS
chorus_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
chorus_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . chorus_level [ instance_id ] , CHORUS_LEVEL_MIN , CHORUS_LEVEL_MAX , 0.0 , 1.0 ) ) ;
switch ( configuration . fx . chorus_waveform [ instance_id ] )
switch ( configuration . fx . chorus_waveform [ instance_id ] )
{
{
case 0 :
case 0 :
@ -1673,9 +1681,9 @@ void set_fx_params(void)
# endif
# endif
// DELAY
// DELAY
delay_fx [ instance_id ] - > delay ( 0 , mapfloat ( configuration . fx . delay_time [ instance_id ] * 10 , DELAY_TIME_MIN , DELAY_TIME_MAX , 0.0 , float ( DELAY_TIME_MAX ) ) ) ;
delay_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_level [ instance_id ] , DELAY_LEVEL_MIN , DELAY_LEVEL_MAX , 0.0 , 1.0 ) ) ;
delay_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_level [ instance_id ] , DELAY_LEVEL_MIN , DELAY_LEVEL_MAX , 0.0 , 1.0 ) ) ;
delay_fx [ instance_id ] - > delay ( 0 , mapfloat ( configuration . fx . delay_time [ instance_id ] * 10 , DELAY_TIME_MIN , DELAY_TIME_MAX , 0.0 , float ( DELAY_TIME_MAX ) ) ) ;
delay_fb_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_fb_mixer [ instance_id ] - > gain ( 0 , 1.0 ) ;
delay_fb_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_feedback [ instance_id ] , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX , 0.0 , 1.0 ) ) ;
delay_fb_mixer [ instance_id ] - > gain ( 1 , mapfloat ( configuration . fx . delay_feedback [ instance_id ] , DELAY_FEEDBACK_MIN , DELAY_FEEDBACK_MAX , 0.0 , 1.0 ) ) ;