Skip to content

Commit 30ead9e

Browse files
committed
Maximilian Examples
1 parent 6b995ff commit 30ead9e

File tree

27 files changed

+129
-194
lines changed

27 files changed

+129
-194
lines changed

examples/examples-maximilian/00-Setup/Setup.ino

Lines changed: 0 additions & 68 deletions
This file was deleted.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ void setup() {//some inits
1818
maximilian.begin(cfg);
1919
}
2020

21-
void play(double *output) {
21+
void play(float *output) {
2222
output[0]=mySine.sinewave(440);
2323
output[1]=output[0];
2424
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void setup() {//some inits
2020
maximilian.begin(cfg);
2121
}
2222

23-
void play(double *output) {//this is where the magic happens. Very slow magic.
23+
void play(float *output) {//this is where the magic happens. Very slow magic.
2424
//output[0] is the left output. output[1] is the right output
2525
output[0]=mySine.sinewave(440)+myOtherSine.sinewave(441);//these two sines will beat together. They're now a bit too loud though..
2626
output[1]=output[0];

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void setup() {//some inits
2020
maximilian.begin(cfg);
2121
}
2222

23-
void play(double *output) {
23+
void play(float *output) {
2424

2525
// This form of amplitude modulation is straightforward multiplication of two waveforms.
2626
// Notice that the maths is different to when you add waves.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void setup() {//some inits
2323
maximilian.begin(cfg);
2424
}
2525

26-
void play(double *output) {
26+
void play(float *output) {
2727

2828
//Using the phasor we can create a ramp, and use this ramp to set the frequency of one of the waves.
2929
//When the frequency of the lower waveform passes over the threshold of 20hz, we start to hear two new waveforms.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void setup() {//some inits
2727
maximilian.begin(cfg);
2828
}
2929

30-
void play(double *output) {
30+
void play(float *output) {
3131

3232
// In this example, the 'myOtherSine.sinewave' is at an amplitude of 1, it's original amplitude.
3333
// This is pretty simple and not too useful.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void setup() {//some inits
2121
maximilian.begin(cfg);
2222
}
2323

24-
void play(double *output) {
24+
void play(float *output) {
2525
output[0]=mySine.sinewave(myOtherSine.sinewave(myLastSine.sinewave(0.1)*30)*440);//awesome bassline
2626
output[1]=output[0];
2727
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ void setup() {
2727
freq=20; // Here we initialise the variable
2828
}
2929

30-
void play(double *output) {
30+
void play(float *output) {
3131

3232
myClock.ticker(); // This makes the clock object count at the current samplerate
3333

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ void setup() {//some inits
2828
maximilian.begin(cfg);
2929
}
3030

31-
void play(double *output) {
31+
void play(float *output) {
3232

3333
// Here you can see that CurrentCount is an int. It's taking the continuous output of the phasor and convering it.
3434
// You don't need to explicityly 'cast' (i.e. change) the value from a float to an int.

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ void setup() {//some inits
2121
maximilian.begin(cfg);
2222
}
2323

24-
void play(double *output) {
24+
void play(float *output) {
2525

2626
CurrentCount=myCounter.phasorBetween(1, 1, 9);//phasor can take three arguments; frequency, start value and end value.
2727

0 commit comments

Comments
 (0)