|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
-
-
- #include <arm_math.h>
- #include <Audio.h>
- #include <Wire.h>
-
- #include <SD.h>
- #include <SPI.h>
- #include <Bounce.h>
-
- AudioSynthToneSweep myEffect;
- AudioOutputI2S audioOutput;
-
-
- AudioConnection c1(myEffect, 0, audioOutput, 0);
- AudioConnection c2(myEffect, 0, audioOutput, 1);
-
- AudioControlSGTL5000 audioShield;
-
-
- int t_ampx = 20000;
- int t_lox = 10;
- int t_hix = 22000;
-
- float t_timex = 10;
-
- void setup(void)
- {
-
- Serial.begin(9600);
- while (!Serial) ;
- delay(3000);
-
- AudioMemory(2);
-
- audioShield.enable();
- audioShield.volume(50);
-
- audioShield.unmuteLineout();
-
-
- Serial.println("setup done");
-
- if(!myEffect.begin(t_ampx,t_lox,t_hix,t_timex)) {
- Serial.println("AudioSynthToneSweep - begin failed");
- while(1);
- }
-
- while(myEffect.busy());
-
-
- if(!myEffect.begin(t_ampx,t_hix,t_lox,t_timex)) {
- Serial.println("AudioSynthToneSweep - begin failed");
- while(1);
- }
-
- while(myEffect.busy());
- Serial.println("Done");
- }
-
- void loop(void)
- {
- }
-
-
-
|