// @title example-DBAP4.ck // @author Hongchan Choi (hongchan@ccrma), edited on 10/21 by Madeline Huberth // @desc A simple examplary usage of DBAP4, DBAP4e class // @version chuck-1.3.1.3 / ma-0.2.2c // @revision 1 // for DBAP4 SndBuf snd; "/user/j/jaguirre/Desktop/toleftengage.wav" => snd.read; snd => DBAP4 p; // for DBAP4e: note that Binaural4 class is required 0.0 => float t; //while our position in the sound file is less than the number of samples in that file... while(snd.pos() < snd.samples()) { 0.02 +=> t; // the two values represent the x and y coordinates to which we pan p.setPosition(Math.sin(t), 0); 10::ms => now; }