Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Audio.h>
- #include <Wire.h>
- #include <SPI.h>
- #include <SD.h>
- #include <SerialFlash.h>
- // GUItool: begin automatically generated code
- AudioSynthWaveformSine sine1; //xy=229,639
- AudioInputTDM tdm1; //xy=377,427
- AudioMixer4 mixer1; //xy=577,337
- AudioMixer4 mixer2; //xy=577,403
- AudioMixer4 mixer3; //xy=579,475
- AudioMixer4 mixer4; //xy=579,546
- AudioMixer4 mixer5; //xy=785,426
- AudioOutputTDM tdm2; //xy=838,741
- AudioOutputUSB usb1; //xy=938,441
- AudioConnection patchCord1(sine1, 0, tdm2, 0);
- AudioConnection patchCord2(sine1, 0, tdm2, 1);
- AudioConnection patchCord3(sine1, 0, tdm2, 2);
- AudioConnection patchCord4(sine1, 0, tdm2, 3);
- AudioConnection patchCord5(sine1, 0, tdm2, 4);
- AudioConnection patchCord6(sine1, 0, tdm2, 5);
- AudioConnection patchCord7(sine1, 0, tdm2, 6);
- AudioConnection patchCord8(sine1, 0, tdm2, 7);
- AudioConnection patchCord9(sine1, 0, tdm2, 8);
- AudioConnection patchCord10(sine1, 0, tdm2, 9);
- AudioConnection patchCord11(sine1, 0, tdm2, 10);
- AudioConnection patchCord12(sine1, 0, tdm2, 11);
- AudioConnection patchCord13(sine1, 0, tdm2, 12);
- AudioConnection patchCord14(sine1, 0, tdm2, 13);
- AudioConnection patchCord15(sine1, 0, tdm2, 14);
- AudioConnection patchCord16(sine1, 0, tdm2, 15);
- AudioConnection patchCord17(tdm1, 0, mixer1, 0);
- AudioConnection patchCord18(tdm1, 1, mixer1, 1);
- AudioConnection patchCord19(tdm1, 2, mixer1, 2);
- AudioConnection patchCord20(tdm1, 3, mixer1, 3);
- AudioConnection patchCord21(tdm1, 4, mixer2, 0);
- AudioConnection patchCord22(tdm1, 5, mixer2, 1);
- AudioConnection patchCord23(tdm1, 6, mixer2, 2);
- AudioConnection patchCord24(tdm1, 7, mixer2, 3);
- AudioConnection patchCord25(tdm1, 8, mixer3, 0);
- AudioConnection patchCord26(tdm1, 9, mixer3, 1);
- AudioConnection patchCord27(tdm1, 10, mixer3, 2);
- AudioConnection patchCord28(tdm1, 11, mixer3, 3);
- AudioConnection patchCord29(tdm1, 12, mixer4, 0);
- AudioConnection patchCord30(tdm1, 13, mixer4, 1);
- AudioConnection patchCord31(tdm1, 14, mixer4, 2);
- AudioConnection patchCord32(tdm1, 15, mixer4, 3);
- AudioConnection patchCord33(mixer1, 0, mixer5, 0);
- AudioConnection patchCord34(mixer2, 0, mixer5, 1);
- AudioConnection patchCord35(mixer3, 0, mixer5, 2);
- AudioConnection patchCord36(mixer4, 0, mixer5, 3);
- AudioConnection patchCord37(mixer5, 0, usb1, 0);
- AudioControlCS42448 cs42448_1; //xy=438,681
- // GUItool: end automatically generated code
- bool onoff=false;
- int led = 13;
- void setup() {
- Serial.begin(9600);
- // put your setup code here, to run once:
- pinMode(led, OUTPUT);
- digitalWrite(led, HIGH);
- delay(1000);
- digitalWrite(led, LOW);
- delay(1000);
- digitalWrite(led, HIGH);
- delay(1000);
- digitalWrite(led, LOW);
- delay(1000);
- digitalWrite(led, HIGH);
- Serial.println("start");
- AudioMemory(64);
- onoff= cs42448_1.enable();
- if(onoff)digitalWrite(led, LOW);
- cs42448_1.volume(1);
- cs42448_1.inputLevel(15.85);
- mixer1.gain(0, 1);
- mixer1.gain(1, 1);
- mixer1.gain(2, 1);
- mixer1.gain(3, 1);
- mixer2.gain(0, 1);
- mixer2.gain(1, 1);
- mixer2.gain(2, 1);
- mixer2.gain(3, 1);
- mixer3.gain(0, 1);
- mixer3.gain(1, 1);
- mixer3.gain(2, 1);
- mixer3.gain(3, 1);
- mixer4.gain(0, 1);
- mixer4.gain(1, 1);
- mixer4.gain(2, 1);
- mixer4.gain(3, 1);
- mixer5.gain(0, 1);
- mixer5.gain(1, 1);
- mixer5.gain(2, 1);
- mixer5.gain(3, 1);
- sine1.amplitude(1);
- sine1.frequency(500);
- }
- void loop() {
- // put your main code here, to run repeatedly:
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement