propa
Well-known member
I'm trying to put a couple of pieces of code together, one mode outputs a synth sound, one mode outputs the mic in.
I've read you can only use 1 I2S object, and can't use a mixer to send multiple signals to it. The code attached is a work around after finding the quad i2s object.
I'm aware it's been made to use with multiple audio boards; however can it be used to with 1 audio board if you're not simultaneously processing two streams?
There's a great deal of ambiguity in the statement:
"Normally, this object is used with two Audio Shields, which are controlled separately by a pair of "sgtl5000" objects"
Is there any wiggle room with normality? Can the quad I2S object be used like this with only one shield?
I've read you can only use 1 I2S object, and can't use a mixer to send multiple signals to it. The code attached is a work around after finding the quad i2s object.
I'm aware it's been made to use with multiple audio boards; however can it be used to with 1 audio board if you're not simultaneously processing two streams?
There's a great deal of ambiguity in the statement:
"Normally, this object is used with two Audio Shields, which are controlled separately by a pair of "sgtl5000" objects"
Is there any wiggle room with normality? Can the quad I2S object be used like this with only one shield?
Code:
#include <Audio.h>
#include <Wire.h>
#include <SPI.h>
#include <SD.h>
#include <SerialFlash.h>
// GUItool: begin automatically generated code
AudioSynthWaveformSine sine1; //xy=63,154
AudioSynthWaveformSineModulated sine_fm1; //xy=190,252
AudioInputI2S i2s2; //xy=226,65
AudioEffectEnvelope envelope1; //xy=340,257
AudioMixer4 mixer2; //xy=403,79
AudioEffectDelay delay1; //xy=501,339
AudioEffectGranular granular1; //xy=556,71
AudioMixer4 mixer1; //xy=681,270
AudioOutputI2SQuad i2s_quad1; //xy=784,109
AudioConnection patchCord1(sine1, sine_fm1);
AudioConnection patchCord2(sine_fm1, envelope1);
AudioConnection patchCord3(i2s2, 0, mixer2, 0);
AudioConnection patchCord4(i2s2, 1, mixer2, 1);
AudioConnection patchCord5(envelope1, delay1);
AudioConnection patchCord6(envelope1, 0, i2s_quad1, 2);
AudioConnection patchCord7(mixer2, granular1);
AudioConnection patchCord8(delay1, 0, mixer1, 0);
AudioConnection patchCord9(delay1, 1, mixer1, 1);
AudioConnection patchCord10(delay1, 2, mixer1, 2);
AudioConnection patchCord11(delay1, 3, mixer1, 3);
AudioConnection patchCord12(granular1, 0, i2s_quad1, 0);
AudioConnection patchCord13(granular1, 0, i2s_quad1, 1);
AudioConnection patchCord14(mixer1, 0, i2s_quad1, 3);
AudioControlSGTL5000 sgtl5000_1; //xy=303,373
// GUItool: end automatically generated code