var sample = "data:audio/x-wav;base64,..."; var samplePlayer = new maximJs.maxiSample(); var mySine = new maximJs.maxiOsc(); function setup(){ loadSample(sample, samplePlayer); } maximJs.maxiAudio.play = function(){ // this is necessary as file loading may not complete in setup if(samplePlayer.isReady()){ output = samplePlayer.play();//just play the file. Looping is default for all play functions. // output=samplePlayer.play(0.69) ;//play the file with a speed setting. 1. is normal speed. // output=samplePlayer.play(0.5,0,44100);//linear interpolationplay with a frequency input, start point and end point. Useful for syncing. // output=samplePlayer.play4(0.5,0,44100);//cubic interpolation play with a frequency input, start point and end point. Useful for syncing. } }