[chuck-users] SndBuf Error.

maria p cruz maria.indigo7325987 at gmail.com
Mon Dec 16 13:41:35 EST 2019


Hi Everyone!
Wath is wrong in this code?


// Using SndBuf to play a sound file
// by ChucK Programmer, December 2050
SndBuf mySound => dac;
// get file path
me.dir(C:\Program Files (x86)\ChucK\audio\123.wav) => string path;
// sound file we want to play
"/audio/123.wav" => string filename;
// + sign connects strings together!
path+filename => filename;
// tell SndBuf to read this file
filename => mySound.read;
// set gain
0.5 => mySound.gain;
// play sound from the beginning
0.1 => mySound.pos;
// advance time so we can hear it
second => now;
//
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cs.princeton.edu/pipermail/chuck-users/attachments/20191216/fd30e97b/attachment.html>


More information about the chuck-users mailing list