Compressor

compressing a file in real-time

		var beats = new maximJs.maxiSample(); //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.
		var compressor = new maximJs.maxiDyn(); //this is a compressor
		var out = 0;

		function setup(){
		OutputIsArray(true, 2);

		compressor.setAttack(100);
		compressor.setRelease(300);
		compressor.setThreshold(0.25);
		compressor.setRatio(5);

		loadSample('./beat2.wav', beats);
	}

	maximJs.maxiAudio.play = function(){
	if(beats.isReady()){
	//here, we're just compressing the file in real-time
	//arguments are input,ratio,threshold,attack,release
	out=compressor.compress(beats.play());
	// out=compressor.compress(beats.play(0.66));

}

this.output[0]=out;	
this.output[1]=out;	
}