|
|
@ -109,9 +109,66 @@ AudioMixer8 drum_reverb_send_mixer_l; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
//AudioConnection patchCord[] = {
|
|
|
|
AudioConnection patchCord[] = { |
|
|
|
// {wavetable[0], 0, mixer[0], 0}, {wavetable[1], 0, mixer[0], 1}, {wavetable[2], 0, mixer[0], 2}, {wavetable[3], 0, mixer[0], 3}, {mixer[0], 0, mixer[TOTAL_MIXERS - 2], 0},
|
|
|
|
// Audio chain tail
|
|
|
|
|
|
|
|
#if defined(USE_FX) |
|
|
|
|
|
|
|
#ifdef USE_PLATEREVERB |
|
|
|
|
|
|
|
{reverb_mixer_r, 0, reverb, 0}, |
|
|
|
|
|
|
|
{reverb_mixer_l, 0, reverb, 1}, |
|
|
|
|
|
|
|
{reverb, 0, master_mixer_r, 3}, |
|
|
|
|
|
|
|
{reverb, 1, master_mixer_l, 3}, |
|
|
|
|
|
|
|
#else |
|
|
|
|
|
|
|
{reverb_mixer_r, 0, freeverb, 0}, |
|
|
|
|
|
|
|
{reverb_mixer_l, 0, freeverb, 1}, |
|
|
|
|
|
|
|
{freeverb, 0, master_mixer_r, 3}, |
|
|
|
|
|
|
|
{freeverb, 1, master_mixer_l, 3}, |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
{master_mixer_r,0, volume_r,0}, |
|
|
|
|
|
|
|
{master_mixer_l,0, volume_l,0}, |
|
|
|
|
|
|
|
{volume_r, 0, stereo2mono, 0}, |
|
|
|
|
|
|
|
{volume_l, 0, stereo2mono, 1}, |
|
|
|
|
|
|
|
{stereo2mono, 0, master_peak_r, 0}, |
|
|
|
|
|
|
|
{stereo2mono, 0, master_peak_l, 0}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Outputs
|
|
|
|
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
|
|
|
|
#ifndef SGTL5000_AUDIO_THRU |
|
|
|
|
|
|
|
{stereo2mono, 0, i2s1, 0}, |
|
|
|
|
|
|
|
{stereo2mono, 1, i2s1, 1}, |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#elif defined (I2S_AUDIO_ONLY) |
|
|
|
|
|
|
|
AudioOutputI2S i2s1; |
|
|
|
|
|
|
|
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1); |
|
|
|
|
|
|
|
#elif defined(TGA_AUDIO_BOARD) |
|
|
|
|
|
|
|
AudioOutputI2S i2s1; |
|
|
|
|
|
|
|
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1); |
|
|
|
|
|
|
|
AudioControlWM8731master wm8731_1; |
|
|
|
|
|
|
|
#elif defined(PT8211_AUDIO) |
|
|
|
|
|
|
|
AudioOutputPT8211 pt8211_1; |
|
|
|
|
|
|
|
AudioConnection patchCord10(stereo2mono, 0, pt8211_1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord11(stereo2mono, 1, pt8211_1, 1); |
|
|
|
|
|
|
|
#elif defined(TEENSY_DAC_SYMMETRIC) |
|
|
|
|
|
|
|
AudioOutputAnalogStereo dacOut; |
|
|
|
|
|
|
|
AudioMixer4 invMixer; |
|
|
|
|
|
|
|
AudioConnection patchCord10(stereo2mono, 0, dacOut , 0); |
|
|
|
|
|
|
|
AudioConnection patchCord11(stereo2mono, 1, invMixer, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord12(invMixer, 0, dacOut , 1); |
|
|
|
|
|
|
|
#elif defined(TEENSY_DAC) |
|
|
|
|
|
|
|
AudioOutputAnalogStereo dacOut; |
|
|
|
|
|
|
|
AudioConnection patchCord10(stereo2mono, 0, dacOut, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord11(stereo2mono, 1, dacOut, 1); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
#ifdef AUDIO_DEVICE_USB |
|
|
|
|
|
|
|
AudioOutputUSB usb1; |
|
|
|
|
|
|
|
AudioConnection patchCord13(stereo2mono, 0, usb1, 0); |
|
|
|
|
|
|
|
AudioConnection patchCord14(stereo2mono, 1, usb1, 1); |
|
|
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
// Audio chain tail
|
|
|
|
// Audio chain tail
|
|
|
|
#if defined(USE_FX) |
|
|
|
#if defined(USE_FX) |
|
|
@ -137,11 +194,11 @@ AudioConnection patchCord9(stereo2mono, 0, master_peak_l, 0); |
|
|
|
// Outputs
|
|
|
|
// Outputs
|
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
#if defined(TEENSY_AUDIO_BOARD) |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
|
|
|
|
AudioControlSGTL5000 sgtl5000_1; |
|
|
|
#ifndef SGTL5000_AUDIO_THRU |
|
|
|
#ifndef SGTL5000_AUDIO_THRU |
|
|
|
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); |
|
|
|
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); |
|
|
|
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1); |
|
|
|
AudioConnection patchCord11(stereo2mono, 1, i2s1, 1); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
AudioControlSGTL5000 sgtl5000_1; |
|
|
|
|
|
|
|
#elif defined (I2S_AUDIO_ONLY) |
|
|
|
#elif defined (I2S_AUDIO_ONLY) |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioOutputI2S i2s1; |
|
|
|
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); |
|
|
|
AudioConnection patchCord10(stereo2mono, 0, i2s1, 0); |
|
|
@ -777,7 +834,7 @@ void handleNoteOn(byte inChannel, byte inNumber, byte inVelocity) |
|
|
|
drum_reverb_send_mixer_r.gain(slot, (1.0 - fsin) * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
drum_reverb_send_mixer_r.gain(slot, (1.0 - fsin) * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
drum_reverb_send_mixer_l.gain(slot, fsin * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
drum_reverb_send_mixer_l.gain(slot, fsin * pseudo_log_curve(drum_config[d].reverb_send)); |
|
|
|
|
|
|
|
|
|
|
|
char f[DRUM_CFG_GILENAME_LEN]; |
|
|
|
char f[DRUM_CFG_FILENAME_LEN]; |
|
|
|
strcpy(f, drum_config[d].filename); |
|
|
|
strcpy(f, drum_config[d].filename); |
|
|
|
strcat(f, ".wav"); |
|
|
|
strcat(f, ".wav"); |
|
|
|
|
|
|
|
|
|
|
|