Skip to content

Commit 67c0a28

Browse files
committed
Maximilian DSP
1 parent e7c2980 commit 67c0a28

File tree

19 files changed

+70
-53
lines changed

19 files changed

+70
-53
lines changed

examples/examples-maximilian/01-TestTone/01-testTone.ino

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ void setup() {//some inits
1515
// setup Aduio output
1616
auto cfg = out.defaultConfig(TX_MODE);
1717
out.begin(cfg);
18-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
18+
maximilian.begin(cfg);
1919
}
2020

2121
void play(double *output) {
@@ -25,5 +25,5 @@ void play(double *output) {
2525

2626
// Arduino loop
2727
void loop() {
28-
maximilian.loop();
28+
maximilian.copy();
2929
}

examples/examples-maximilian/02-TwoTones/02-TwoTones.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//This examples shows another fundamental building block of digital audio - adding two sine waves together. When you add waves together they create a new wave whose amplitude at any time is computed by adding the current amplitudes of each wave together. So, if one wave has an amplitude of 1, and the other has an amplitude of 1, the new wave will be equal to 2 at that point in time. Whereas, later, if one wave has an amplitude of -1, and the other has an amplitude of 1, the new wave - the one you hear - will equal 0. This can create some interesting effects, including 'beating', when the waves interact to create a single wave that fades up and down based on the frequencies of the two interacting waves. The frequency of the 'beating' i.e. the fading in and out, is equal to the difference in frequency between the two waves.
22

3-
#include "MaximilianDSP.h"
3+
#include "AudioTools.h"
4+
#include "AudioLibs/MaximilianDSP.h"
45

56
// Define output
67
I2SStream out;
@@ -16,7 +17,7 @@ void setup() {//some inits
1617
// setup Aduio output
1718
auto cfg = out.defaultConfig(TX_MODE);
1819
out.begin(cfg);
19-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
20+
maximilian.begin(cfg);
2021
}
2122

2223
void play(double *output) {//this is where the magic happens. Very slow magic.
@@ -28,5 +29,5 @@ void play(double *output) {//this is where the magic happens. Very slow magic.
2829

2930
// Arduino loop
3031
void loop() {
31-
maximilian.loop();
32+
maximilian.copy();
3233
}

examples/examples-maximilian/03-AM1/03-AM1.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "MaximilianDSP.h"
1+
#include "AudioTools.h"
2+
#include "AudioLibs/MaximilianDSP.h"
23

34
// Define Arduino output
45
I2SStream out;
@@ -16,7 +17,7 @@ void setup() {//some inits
1617
// setup Aduio output
1718
auto cfg = out.defaultConfig(TX_MODE);
1819
out.begin(cfg);
19-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
20+
maximilian.begin(cfg);
2021
}
2122

2223
void play(double *output) {
@@ -33,5 +34,5 @@ void play(double *output) {
3334

3435
// Arduino loop
3536
void loop() {
36-
maximilian.loop();
37+
maximilian.copy();
3738
}

examples/examples-maximilian/04-AM2/04-AM2.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "MaximilianDSP.h"
1+
#include "AudioTools.h"
2+
#include "AudioLibs/MaximilianDSP.h"
23

34
// Define Arduino output
45
I2SStream out;
@@ -19,7 +20,7 @@ void setup() {//some inits
1920
// setup Aduio output
2021
auto cfg = out.defaultConfig(TX_MODE);
2122
out.begin(cfg);
22-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
23+
maximilian.begin(cfg);
2324
}
2425

2526
void play(double *output) {
@@ -37,5 +38,5 @@ void play(double *output) {
3738

3839
// Arduino loop
3940
void loop() {
40-
maximilian.loop();
41+
maximilian.copy();
4142
}

examples/examples-maximilian/05-FM1/05-FM1.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
// So at any given point in time, the frequency of the carrier can increase by an amount equal to the current amp of the modulator.
77
// This has some interesting effects.
88

9-
#include "MaximilianDSP.h"
9+
#include "AudioTools.h"
10+
#include "AudioLibs/MaximilianDSP.h"
1011

1112
// Define Arduino output
1213
I2SStream out;
@@ -23,7 +24,7 @@ void setup() {//some inits
2324
// setup Aduio output
2425
auto cfg = out.defaultConfig(TX_MODE);
2526
out.begin(cfg);
26-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
27+
maximilian.begin(cfg);
2728
}
2829

2930
void play(double *output) {
@@ -47,5 +48,5 @@ void play(double *output) {
4748

4849
// Arduino loop
4950
void loop() {
50-
maximilian.loop();
51+
maximilian.copy();
5152
}

examples/examples-maximilian/06-FM2/06-FM2.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Nothing much to say about this other than I like it.
22

3-
#include "MaximilianDSP.h"
3+
#include "AudioTools.h"
4+
#include "AudioLibs/MaximilianDSP.h"
45

56
// Define Arduino output
67
I2SStream out;
@@ -17,7 +18,7 @@ void setup() {//some inits
1718
// setup Aduio output
1819
auto cfg = out.defaultConfig(TX_MODE);
1920
out.begin(cfg);
20-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
21+
maximilian.begin(cfg);
2122
}
2223

2324
void play(double *output) {
@@ -27,5 +28,5 @@ void play(double *output) {
2728

2829
// Arduino loop
2930
void loop() {
30-
maximilian.loop();
31+
maximilian.copy();
3132
}

examples/examples-maximilian/07-Counting1/07-Counting1.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

2-
#include "MaximilianDSP.h"
2+
#include "AudioTools.h"
3+
#include "AudioLibs/MaximilianDSP.h"
34

45
// Define Arduino output
56
I2SStream out;
@@ -18,7 +19,7 @@ void setup() {
1819
// setup audio output
1920
auto cfg = out.defaultConfig(TX_MODE);
2021
out.begin(cfg);
21-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
22+
maximilian.begin(cfg);
2223

2324
// setup maximilian
2425
myClock.setTicksPerBeat(1);//This sets the number of ticks per beat
@@ -47,5 +48,5 @@ void play(double *output) {
4748

4849
// Arduino loop
4950
void loop() {
50-
maximilian.loop();
51+
maximilian.copy();
5152
}

examples/examples-maximilian/08-Counting2/08-Counting2.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
// If you write it into an integer, it will round it off for you.
66
// This creates a bunch of steps.
77

8-
#include "MaximilianDSP.h"
8+
#include "AudioTools.h"
9+
#include "AudioLibs/MaximilianDSP.h"
910

1011
// Define Arduino output
1112
I2SStream out;
@@ -24,7 +25,7 @@ void setup() {//some inits
2425
// setup audio output
2526
auto cfg = out.defaultConfig(TX_MODE);
2627
out.begin(cfg);
27-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
28+
maximilian.begin(cfg);
2829
}
2930

3031
void play(double *output) {
@@ -48,5 +49,5 @@ void play(double *output) {
4849

4950
// Arduino loop
5051
void loop() {
51-
maximilian.loop();
52+
maximilian.copy();
5253
}

examples/examples-maximilian/08-Counting3/08-Counting3.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "MaximilianDSP.h"
1+
#include "AudioTools.h"
2+
#include "AudioLibs/MaximilianDSP.h"
23

34
// Define Arduino output
45
I2SStream out;
@@ -17,7 +18,7 @@ void setup() {//some inits
1718
// setup audio output
1819
auto cfg = out.defaultConfig(TX_MODE);
1920
out.begin(cfg);
20-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
21+
maximilian.begin(cfg);
2122
}
2223

2324
void play(double *output) {
@@ -41,5 +42,5 @@ void play(double *output) {
4142

4243
// Arduino loop
4344
void loop() {
44-
maximilian.loop();
45+
maximilian.copy();
4546
}

examples/examples-maximilian/08-Counting4/08-Counting4.ino

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
#include "MaximilianDSP.h"
1+
#include "AudioTools.h"
2+
#include "AudioLibs/MaximilianDSP.h"
23

34
// Define Arduino output
45
I2SStream out;
@@ -18,7 +19,7 @@ void setup() {//some inits
1819
// setup audio output
1920
auto cfg = out.defaultConfig(TX_MODE);
2021
out.begin(cfg);
21-
maxiSettings::setup(cfg.sample_rate, cfg.channels, 512);
22+
maximilian.begin(cfg);
2223
}
2324

2425
void play(double *output) {
@@ -41,5 +42,5 @@ void play(double *output) {
4142

4243
// Arduino loop
4344
void loop() {
44-
maximilian.loop();
45+
maximilian.copy();
4546
}

0 commit comments

Comments
 (0)