From 06a73f45dcb6830777239ae86aacf019898e7a77 Mon Sep 17 00:00:00 2001 From: Mick Grierson Date: Wed, 19 Oct 2011 14:51:49 +0100 Subject: Added Compressor Example --- main.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'main.cpp') diff --git a/main.cpp b/main.cpp index be9831f..54b0063 100755 --- a/main.cpp +++ b/main.cpp @@ -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; -- cgit v1.3