#include <Audio.h>
const int16_t tone1[256] = {
0,
628,
1256,
1883,
2509,
3133,
3756,
4376,
4994,
5608,
6220,
6827,
7431,
8030,
8624,
9213,
9796,
10374,
10945,
11510,
12067,
12618,
13160,
13696,
14222,
14740,
15249,
15750,
16240,
16721,
17192,
17652,
18102,
18540,
18968,
19384,
19789,
20181,
20562,
20930,
21285,
21628,
21957,
22274,
22577,
22866,
23142,
23403,
23651,
23884,
24103,
24307,
24497,
24672,
24832,
24977,
25108,
25223,
25322,
25407,
25476,
25530,
25569,
25592,
25600,
25592,
25569,
25530,
25476,
25407,
25322,
25223,
25108,
24977,
24832,
24672,
24497,
24307,
24103,
23884,
23651,
23403,
23142,
22866,
22577,
22274,
21957,
21628,
21285,
20930,
20562,
20181,
19789,
19384,
18968,
18540,
18102,
17652,
17192,
16721,
16240,
15750,
15249,
14740,
14222,
13696,
13160,
12618,
12067,
11510,
10945,
10374,
9796,
9213,
8624,
8030,
7431,
6827,
6220,
5608,
4994,
4376,
3756,
3133,
2509,
1883,
1256,
628,
0,
-629,
-1256,
-1884,
-2510,
-3134,
-3757,
-4377,
-4995,
-5609,
-6221,
-6828,
-7432,
-8031,
-8625,
-9214,
-9797,
-10375,
-10946,
-11511,
-12068,
-12619,
-13161,
-13696,
-14223,
-14741,
-15250,
-15751,
-16241,
-16722,
-17192,
-17653,
-18103,
-18541,
-18969,
-19385,
-19790,
-20182,
-20563,
-20931,
-21286,
-21629,
-21958,
-22275,
-22578,
-22867,
-23143,
-23404,
-23652,
-23885,
-24104,
-24308,
-24498,
-24673,
-24833,
-24978,
-25109,
-25224,
-25323,
-25408,
-25477,
-25531,
-25570,
-25593,
-25600,
-25593,
-25570,
-25531,
-25477,
-25408,
-25323,
-25224,
-25109,
-24978,
-24833,
-24673,
-24498,
-24308,
-24104,
-23885,
-23652,
-23404,
-23143,
-22867,
-22578,
-22275,
-21958,
-21629,
-21286,
-20931,
-20563,
-20182,
-19790,
-19385,
-18969,
-18541,
-18103,
-17653,
-17192,
-16722,
-16241,
-15751,
-15250,
-14741,
-14223,
-13696,
-13161,
-12619,
-12068,
-11511,
-10946,
-10375,
-9797,
-9214,
-8625,
-8031,
-7432,
-6828,
-6221,
-5609,
-4995,
-4377,
-3757,
-3134,
-2510,
-1884,
-1256,
-629
};
// GUItool: begin automatically generated code
AudioSynthWaveform waveform1; //xy=285,868
AudioOutputAnalog dac1; //xy=739,914
AudioConnection patchCord1(waveform1, 0, dac1, 0);
// GUItool: end automatically generated code
void setup() {
// put your setup code here, to run once:
AudioMemory(15); //set memory allocation
// by default the Teensy 3.1 DAC uses 3.3Vp-p output
// if your 3.3V power has noise, switching to the
// internal 1.2V reference can give you a clean signal
dac1.analogReference(INTERNAL);
// dac1.analogReference(EXTERNAL);
delay(40);
waveform1.begin(1.0, 1000, WAVEFORM_ARBITRARY);
waveform1.arbitraryWaveform(tone1, 1200);
}
void loop() {
// put your main code here, to run repeatedly:
waveform1.frequency(400);
delay(1000);
waveform1.frequency(600);
delay(1000);
waveform1.frequency(800);
delay(1000);
waveform1.frequency(1000);
delay(1000);
waveform1.frequency(1200);
delay(1000);
}