diff options
| author | Mick Grierson <mickgrierson@gmail.com> | 2011-10-19 14:51:49 +0100 |
|---|---|---|
| committer | Mick Grierson <mickgrierson@gmail.com> | 2011-10-19 14:51:49 +0100 |
| commit | 06a73f45dcb6830777239ae86aacf019898e7a77 (patch) | |
| tree | ec3e3566a8e9fda1bcad7ac93cd9c1ebf7dfe2a8 /main.cpp | |
| parent | c5882eaefa9b748f1364dbddde0cbc5994795bf1 (diff) | |
Added Compressor Example
Diffstat (limited to 'main.cpp')
| -rwxr-xr-x | main.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -1,7 +1,7 @@ #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. -maxiDyn compressor; +maxiDyn compressor; //this is a compressor double out; void setup() {//some inits @@ -13,7 +13,10 @@ void setup() {//some inits void play(double *output) {//this is where the magic happens. Very slow magic. - out=compressor.compressor(beats.play(),50,0.5,0.0005,0.995);//just play the file. Looping is default for all play functions. + + //here, we're just compressing the file in real-time + //arguments are input,ratio,threshold,attack,release. a long attack is something like 0.0001 and a long release is like 0.9999. + out=compressor.compressor(beats.play(),20,0.25,0.0005,0.9999); output[0]=out; output[1]=out; |
