|
|
|
@ -55,7 +55,7 @@ using namespace TeensyTimerTool; |
|
|
|
|
#ifdef SGTL5000_AUDIO_ENHANCE |
|
|
|
|
#include "control_sgtl5000plus.h" |
|
|
|
|
#endif |
|
|
|
|
#if NUM_EPIANO_VOICES > 0 |
|
|
|
|
#if defined (USE_EPIANO) |
|
|
|
|
#include "synth_mda_epiano.h" |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
@ -109,7 +109,7 @@ AudioEffectFreeverbStereoFloat freeverb; |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if defined(USE_EPIANO) |
|
|
|
|
#if defined(USE_FX) && defined(USE_EPIANO) |
|
|
|
|
AudioMixer<5> master_mixer_r; |
|
|
|
|
AudioMixer<5> master_mixer_l; |
|
|
|
|
#else |
|
|
|
@ -122,8 +122,8 @@ AudioEffectStereoMono stereo2mono; |
|
|
|
|
AudioAnalyzePeak master_peak_r; |
|
|
|
|
AudioAnalyzePeak master_peak_l; |
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) && defined(SGTL5000_AUDIO_THRU) |
|
|
|
|
AudioMixer<4> audio_thru_mixer_r; |
|
|
|
|
AudioMixer<4> audio_thru_mixer_l; |
|
|
|
|
AudioMixer<2> audio_thru_mixer_r; |
|
|
|
|
AudioMixer<2> audio_thru_mixer_l; |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
// Drumset
|
|
|
|
@ -181,13 +181,13 @@ AudioConnection patchCord[] = { |
|
|
|
|
#ifdef USE_PLATEREVERB |
|
|
|
|
{reverb_mixer_r, 0, reverb, 0}, |
|
|
|
|
{reverb_mixer_l, 0, reverb, 1}, |
|
|
|
|
{reverb, 0, master_mixer_r, CH_REVERB}, |
|
|
|
|
{reverb, 1, master_mixer_l, CH_REVERB}, |
|
|
|
|
{reverb, 0, master_mixer_r, MASTER_MIX_CH_REVERB}, |
|
|
|
|
{reverb, 1, master_mixer_l, MASTER_MIX_CH_REVERB}, |
|
|
|
|
#else |
|
|
|
|
{reverb_mixer_r, 0, freeverb, 0}, |
|
|
|
|
{reverb_mixer_l, 0, freeverb, 1}, |
|
|
|
|
{freeverb, 0, master_mixer_r, CH_REVERB}, |
|
|
|
|
{freeverb, 1, master_mixer_l, CH_REVERB}, |
|
|
|
|
{freeverb, 0, master_mixer_r, MASTER_MIX_CH_REVERB}, |
|
|
|
|
{freeverb, 1, master_mixer_l, MASTER_MIX_CH_REVERB}, |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
{master_mixer_r, volume_r}, |
|
|
|
@ -236,13 +236,13 @@ AudioConnection patchCord[] = { |
|
|
|
|
|
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
#ifdef USE_FX |
|
|
|
|
{drum_reverb_send_mixer_r, 0, reverb_mixer_r, 2}, |
|
|
|
|
{drum_reverb_send_mixer_l, 0, reverb_mixer_l, 2}, |
|
|
|
|
{drum_mixer_r, 0, master_mixer_r, CH_DRUMS}, |
|
|
|
|
{drum_mixer_l, 0, master_mixer_l, CH_DRUMS}, |
|
|
|
|
{drum_reverb_send_mixer_r, 0, reverb_mixer_r, REVERB_MIX_CH_DRUMS}, |
|
|
|
|
{drum_reverb_send_mixer_l, 0, reverb_mixer_l, REVERB_MIX_CH_DRUMS}, |
|
|
|
|
{drum_mixer_r, 0, master_mixer_r, MASTER_MIX_CH_DRUMS}, |
|
|
|
|
{drum_mixer_l, 0, master_mixer_l, MASTER_MIX_CH_DRUMS}, |
|
|
|
|
#else |
|
|
|
|
{drum_mixer_r, 0, master_mixer_r, CH_DRUMS}, |
|
|
|
|
{drum_mixer_l, 0, master_mixer_l, CH_DRUMS}, |
|
|
|
|
{drum_mixer_r, 0, master_mixer_r, MASTER_MIX_CH_DRUMS}, |
|
|
|
|
{drum_mixer_l, 0, master_mixer_l, MASTER_MIX_CH_DRUMS}, |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
@ -263,11 +263,13 @@ AudioConnection patchCord[] = { |
|
|
|
|
{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_chorus_mixer_r, 0, reverb_mixer_r, 3}, |
|
|
|
|
{ep_chorus_mixer_l, 0, reverb_mixer_l, 3}, |
|
|
|
|
{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, 0, master_mixer_r, MASTER_MIX_CH_EPIANO}, |
|
|
|
|
{ep, 1, master_mixer_l, MASTER_MIX_CH_EPIANO}, |
|
|
|
|
#else |
|
|
|
|
{ep, 0, master_mixer_r, CH_EPIANO}, |
|
|
|
|
{ep, 1, master_mixer_l, CH_EPIANO}, |
|
|
|
|
{ep, 0, master_mixer_r, MASTER_MIX_CH_EPIANO}, |
|
|
|
|
{ep, 1, master_mixer_l, MASTER_MIX_CH_EPIANO}, |
|
|
|
|
#endif |
|
|
|
|
#endif |
|
|
|
|
}; |
|
|
|
@ -715,24 +717,24 @@ void setup() |
|
|
|
|
master_mixer_l.gain(instance_id, VOL_MAX_FLOAT); |
|
|
|
|
} |
|
|
|
|
#else |
|
|
|
|
master_mixer_r.gain(CH_DEXED1, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(CH_DEXED1, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_r.gain(CH_DEXED2, 0.0); |
|
|
|
|
master_mixer_l.gain(CH_DEXED2, 0.0); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_DEXED1, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_DEXED1, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_DEXED2, 0.0); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_DEXED2, 0.0); |
|
|
|
|
#endif |
|
|
|
|
master_mixer_r.gain(CH_REVERB, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(CH_REVERB, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_REVERB, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_REVERB, VOL_MAX_FLOAT); |
|
|
|
|
#if NUM_DRUMS > 0 |
|
|
|
|
master_mixer_r.gain(CH_DRUMS, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(CH_DRUMS, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_DRUMS, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_DRUMS, VOL_MAX_FLOAT); |
|
|
|
|
seq.drums_volume = VOL_MAX_FLOAT; |
|
|
|
|
#else |
|
|
|
|
master_mixer_r.gain(CH_DRUMS, 0.0); |
|
|
|
|
master_mixer_l.gain(CH_DRUMS, 0.0); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_DRUMS, 0.0); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_DRUMS, 0.0); |
|
|
|
|
#endif |
|
|
|
|
#if defined(USE_EPIANO) |
|
|
|
|
master_mixer_r.gain(CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) && defined(SGTL5000_AUDIO_THRU) |
|
|
|
@ -761,8 +763,8 @@ void setup() |
|
|
|
|
|
|
|
|
|
void loop() |
|
|
|
|
{ |
|
|
|
|
master_mixer_r.gain(CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_EPIANO, VOL_MAX_FLOAT); |
|
|
|
|
// MIDI input handling
|
|
|
|
|
check_midi_devices(); |
|
|
|
|
|
|
|
|
@ -2015,8 +2017,8 @@ void init_MIDI_send_CC(void) |
|
|
|
|
|
|
|
|
|
void set_drums_volume(float vol) |
|
|
|
|
{ |
|
|
|
|
master_mixer_r.gain(CH_DRUMS, vol); |
|
|
|
|
master_mixer_l.gain(CH_DRUMS, vol); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_DRUMS, vol); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_DRUMS, vol); |
|
|
|
|
} |
|
|
|
|
void set_volume(uint8_t v, uint8_t m) |
|
|
|
|
{ |
|
|
|
@ -2564,8 +2566,8 @@ void set_fx_params(void) |
|
|
|
|
ep_chorus_inverter.gain(-1.0); |
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
master_mixer_r.gain(CH_REVERB, volume_transform(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, VOL_MAX_FLOAT))); |
|
|
|
|
master_mixer_l.gain(CH_REVERB, volume_transform(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, VOL_MAX_FLOAT))); |
|
|
|
|
master_mixer_r.gain(MASTER_MIX_CH_REVERB, volume_transform(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, VOL_MAX_FLOAT))); |
|
|
|
|
master_mixer_l.gain(MASTER_MIX_CH_REVERB, volume_transform(mapfloat(configuration.fx.reverb_level, REVERB_LEVEL_MIN, REVERB_LEVEL_MAX, 0.0, VOL_MAX_FLOAT))); |
|
|
|
|
|
|
|
|
|
#endif |
|
|
|
|
#ifdef SGTL5000_AUDIO_ENHANCE |
|
|
|
|