diff options
| author | mick grierson <mickgrierson@gmail.com> | 2016-12-14 02:30:34 +0000 |
|---|---|---|
| committer | mick grierson <mickgrierson@gmail.com> | 2016-12-14 02:30:34 +0000 |
| commit | d60b86693af086e820f2488a4f8db6fe96ed7ece (patch) | |
| tree | 6b9b50a70744706271fc5c417a431137196bc199 /main.cpp | |
| parent | df18758a04f36e74f0fa74a65ee11572015a9aff (diff) | |
refined old envelopes
Diffstat (limited to 'main.cpp')
| -rwxr-xr-x | main.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -1,21 +1,21 @@ #include "maximilian.h" -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. +maxiOsc myOsc; +maxiEnvelope myEnv; +int counter; +double tv[8] = {1,1,0,1,1,2,0,4}; void setup() {//some inits - 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. - cout << beats.getLength(); - } void play(double *output) {//this is where the magic happens. Very slow magic. - //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. + + + double out = myEnv.ramps(tv); + + output[0]=myOsc.sinewave(440)*out; output[1]=output[0]; } |
