Mixing Example

var audio = new maximJs.maxiAudio();
audio.init();
  // change output to an array
audio.outputIsArray(true, 2);

var myOsc = new maximJs.maxiOsc();
var myAutoPanner = new maximJs.maxiOsc();
var myStereoOutput = maximJs.maxiTools.getArrayAsVectorDbl([0,0]);
var myOutputs = new maximJs.maxiMix();//this is the stereo mixer channel.



audio.play = function(){
    myOutputs.stereo(myOsc.noise(),myStereoOutput,(myAutoPanner.sinewave(1)+1)/2);//Stereo, Quad or 8 Channel. Specify the input to be mixed, the output[numberofchannels], and the pan (0-1,equal power).
    this.output[0]=myStereoOutput.get(0);//When working with mixing, you need to specify the outputs explicitly
    this.output[1]=myStereoOutput.get(1);//
  }