@ -321,6 +321,7 @@ void setup()
# if defined(TEENSY_AUDIO_BOARD)
sgtl5000_1 . enable ( ) ;
sgtl5000_1 . dacVolumeRamp ( ) ;
sgtl5000_1 . dacVolume ( 1.0 ) ;
//sgtl5000_1.dacVolumeRampLinear();
//sgtl5000_1.dacVolumeRampDisable();
sgtl5000_1 . unmuteHeadphone ( ) ;
@ -330,10 +331,13 @@ void setup()
sgtl5000_1 . lineOutLevel ( sgtl5000_level ) ;
sgtl5000_1 . audioPostProcessorEnable ( ) ;
sgtl5000_1 . autoVolumeControl ( 1 , 1 , 1 , 0.9 , 0.01 , 0.05 ) ;
sgtl5000_1 . autoVolumeEnable ( ) ;
sgtl5000_1 . surroundSoundEnable ( ) ;
//sgtl5000_1.autoVolumeEnable();
sgtl5000_1 . autoVolumeDisable ( ) ;
//sgtl5000_1.surroundSoundEnable();
sgtl5000_1 . surroundSoundDisable ( ) ;
sgtl5000_1 . surroundSound ( 7 , 2 ) ; // Configures virtual surround width from 0 (mono) to 7 (widest). select may be set to 1 (disable), 2 (mono input) or 3 (stereo input).
sgtl5000_1 . enhanceBassEnable ( ) ;
//sgtl5000_1.enhanceBassEnable();
sgtl5000_1 . enhanceBassDisable ( ) ;
sgtl5000_1 . enhanceBass ( 1.0 , 0.2 , 1 , 2 ) ; // Configures the bass enhancement by setting the levels of the original stereo signal and the bass-enhanced mono level which will be mixed together. The high-pass filter may be enabled (0) or bypassed (1).
/* The cutoff frequency is specified as follows:
value frequency
@ -469,7 +473,7 @@ void setup()
chorus_send_mixer_l . gain ( instance_id , mapfloat ( configuration . dexed [ instance_id ] . chorus_send , CHORUS_SEND_MIN , CHORUS_SEND_MAX , 0.0 , 1.0 ) ) ;
// DEXED FILTER
//MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, 1.0);
//MicroDexed[instance_id]->fx.Gain = mapfloat(configuration.dexed[instance_id].sound_intensity, SOUND_INTENSITY_MIN, SOUND_INTENSITY_MAX, 0.0, SOUND_INTENSITY_MAX/ 100 .0);
MicroDexed [ instance_id ] - > fx . Gain = 1.0 ;
MicroDexed [ instance_id ] - > fx . Reso = mapfloat ( configuration . dexed [ instance_id ] . filter_resonance , FILTER_RESONANCE_MIN , FILTER_RESONANCE_MAX , 1.0 , 0.0 ) ;
MicroDexed [ instance_id ] - > fx . Cutoff = mapfloat ( configuration . dexed [ instance_id ] . filter_cutoff , FILTER_CUTOFF_MIN , FILTER_CUTOFF_MAX , 1.0 , 0.0 ) ;
@ -477,7 +481,7 @@ void setup()
# endif
// Dexed output level
dexed_level [ instance_id ] - > gain ( 1.0 ) ;
dexed_level [ instance_id ] - > gain ( mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , SOUND_INTENSITY_MAX / 100 .0 ) ) ;
// PANORAMA
mono2stereo [ instance_id ] - > panorama ( mapfloat ( configuration . dexed [ instance_id ] . pan , PANORAMA_MIN , PANORAMA_MAX , - 1.0 , 1.0 ) ) ;
@ -735,9 +739,9 @@ void handleControlChange(byte inChannel, byte inCtrl, byte inValue)
# endif
configuration . dexed [ instance_id ] . sound_intensity = map ( inValue , 0 , 0x7f , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX ) ;
# ifdef USE_FX
MicroDexed [ instance_id ] - > fx . Gain = mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , 1.0 ) ;
MicroDexed [ instance_id ] - > fx . Gain = mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , SOUND_INTENSITY_MAX / 100 .0 ) ;
# else
dexed_level [ instance_id ] - > gain ( mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , 2 .0) ) ;
dexed_level [ instance_id ] - > gain ( mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , SOUND_INTENSITY_MAX / 100 .0) ) ;
# endif
eeprom_write ( ) ;
break ;
@ -1321,7 +1325,7 @@ void initial_values_from_eeprom(bool init)
MicroDexed [ instance_id ] - > fx . Cutoff = mapfloat ( configuration . dexed [ instance_id ] . filter_cutoff , FILTER_CUTOFF_MIN , FILTER_CUTOFF_MAX , 1.0 , 0.0 ) ;
# endif
MicroDexed [ instance_id ] - > setOPs ( configuration . dexed [ instance_id ] . op_enabled ) ;
dexed_level [ instance_id ] - > gain ( mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , 2 .0) ) ;
dexed_level [ instance_id ] - > gain ( mapfloat ( configuration . dexed [ instance_id ] . sound_intensity , SOUND_INTENSITY_MIN , SOUND_INTENSITY_MAX , 0.0 , SOUND_INTENSITY_MAX / 100 .0) ) ;
}
}
Serial . println ( F ( " OK, loaded! " ) ) ;