var myOsc = new maximJs.maxiOsc(); var myAutoPanner = new maximJs.maxiOsc(); var myStereoOutput = GetArrayAsVectorDbl([0,0]); var myOutputs = new maximJs.maxiMix();//this is the stereo mixer channel. function setup(){ // change output to an array // setNumOutputChannels(2); OutputIsArray(true, 2); } maximJs.maxiAudio.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). output[0]=myStereoOutput.get(0);//When working with mixing, you need to specify the outputs explicitly output[1]=myStereoOutput.get(1);// }