|
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
-
-
-
-
- #include <Audio.h>
- #include <Wire.h>
- #include <SPI.h>
- #include <SD.h>
- #include <SerialFlash.h>
-
-
- #include "AudioSampleSnare.h"
- #include "AudioSampleTomtom.h"
- #include "AudioSampleHihat.h"
- #include "AudioSampleKick.h"
- #include "AudioSampleGong.h"
- #include "AudioSampleCashregister.h"
-
-
-
-
- AudioPlayMemory sound0;
- AudioPlayMemory sound1;
- AudioPlayMemory sound2;
- AudioPlayMemory sound3;
- AudioPlayMemory sound4;
- AudioPlayMemory sound5;
-
-
- AudioSynthWaveform sine1;
- AudioOutputADAT adat1;
- AudioConnection patchCord1(sine1, 0, adat1, 0);
- AudioConnection patchCord2(sine1, 0, adat1, 1);
- AudioConnection patchCord3(sound0, 0, adat1, 2);
- AudioConnection patchCord4(sound1, 0, adat1, 3);
- AudioConnection patchCord5(sound2, 0, adat1, 4);
- AudioConnection patchCord6(sound4, 0, adat1, 5);
- AudioConnection patchCord7(sound5, 0, adat1, 6);
-
-
- void setup() {
- AudioMemory(10);
- sine1.begin(WAVEFORM_SINE);
- sine1.frequency(2000);
-
- }
-
-
-
-
- void loop() {
- sine1.amplitude(1.0);
-
- sound0.play(AudioSampleKick);
-
- delay(250);
-
- sound1.play(AudioSampleHihat);
-
- delay(250);
-
- sound1.play(AudioSampleHihat);
- sound2.play(AudioSampleSnare);
-
- delay(250);
-
- sound1.play(AudioSampleHihat);
-
- delay(250);
-
- sound0.play(AudioSampleKick);
- sound3.play(AudioSampleGong);
-
-
- delay(1000);
- }
|