|
-
-
-
-
-
-
-
-
-
-
-
- #include <Audio.h>
- #include <Wire.h>
- #include <SPI.h>
- #include <SD.h>
- #include <SerialFlash.h>
-
-
- AudioSynthWaveformSine sine1;
- AudioEffectEnvelope envelope1;
- AudioEffectDelay delay1;
- AudioMixer4 mixer1;
- AudioOutputI2S i2s1;
- AudioConnection patchCord1(sine1, envelope1);
- AudioConnection patchCord2(envelope1, delay1);
- AudioConnection patchCord3(envelope1, 0, i2s1, 0);
- AudioConnection patchCord4(delay1, 0, mixer1, 0);
- AudioConnection patchCord5(delay1, 1, mixer1, 1);
- AudioConnection patchCord6(delay1, 2, mixer1, 2);
- AudioConnection patchCord7(delay1, 3, mixer1, 3);
- AudioConnection patchCord8(mixer1, 0, i2s1, 1);
- AudioControlSGTL5000 sgtl5000_1;
-
-
- void setup() {
-
- AudioMemory(120);
-
-
- sgtl5000_1.enable();
- sgtl5000_1.volume(0.5);
-
-
-
-
- sine1.frequency(1000);
- sine1.amplitude(0.5);
-
-
-
- delay1.delay(0, 110);
- delay1.delay(1, 220);
- delay1.delay(2, 330);
- }
-
- void loop() {
- envelope1.noteOn();
- delay(36);
- envelope1.noteOff();
- delay(4000);
- }
|