aboutsummaryrefslogtreecommitdiffstats
path: root/maximilian_examples/12.SamplePlayer.cpp
diff options
context:
space:
mode:
authormick grierson <mickgrierson@gmail.com>2015-12-08 14:56:16 +0000
committermick grierson <mickgrierson@gmail.com>2015-12-08 14:56:16 +0000
commit39ea0d49f49ac6dbdfda8a5a7b40ac8ff3f738e2 (patch)
treeb4011c0d56336cbed20cc9f75a24e38cf5426fd4 /maximilian_examples/12.SamplePlayer.cpp
parentfba2ae1dd01c41319fc5c967b486e781447aa3ec (diff)
adding fft terminal example
Diffstat (limited to 'maximilian_examples/12.SamplePlayer.cpp')
-rwxr-xr-xmaximilian_examples/12.SamplePlayer.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/maximilian_examples/12.SamplePlayer.cpp b/maximilian_examples/12.SamplePlayer.cpp
index 2706f0b..df6b3d2 100755
--- a/maximilian_examples/12.SamplePlayer.cpp
+++ b/maximilian_examples/12.SamplePlayer.cpp
@@ -3,19 +3,19 @@
maxiSample beats; //We give our sample a name. It's called beats this time. We could have loads of them, but they have to have different names.
void setup() {//some inits
-
- beats.load("/Users/username/somewhere/Maximilian/beat2.wav");//load in your samples. Provide the full path to a wav file.
- printf("Summary:\n%s", beats.getSummary());//get info on samples if you like.
-
+
+ beats.load("/Users/michaelgrierson/Documents/workspace/Maximilian/beat2.wav");//load in your samples. Provide the full path to a wav file.
+ printf("Summary:\n%s", beats.getSummary());//get info on samples if you like.
+
}
void play(double *output) {//this is where the magic happens. Very slow magic.
-
- *output=beats.play();//just play the file. Looping is default for all play functions.
- // *output=beats.play(0.69);//play the file with a speed setting. 1. is normal speed.
- // *output=beats.play(0.5,0,44100);//linear interpolationplay with a frequency input, start point and end point. Useful for syncing.
- // *output=beats.play4(0.5,0,44100);//cubic interpolation play with a frequency input, start point and end point. Useful for syncing.
-
-
+
+ //output[0]=beats.play();//just play the file. Looping is default for all play functions.
+ output[0]=beats.play(0.68);//play the file with a speed setting. 1. is normal speed.
+ //output[0]=beats.play(0.5,0,44100);//linear interpolationplay with a frequency input, start point and end point. Useful for syncing.
+ //output[0]=beats.play4(0.5,0,44100);//cubic interpolation play with a frequency input, start point and end point. Useful for syncing.
+
+ output[1]=output[0];
}