[chuck-users] 1.3.1.2 on Windows 32-bit - sndbuf doesn't get stereodata

Rich Caloggero rjc at mit.edu
Mon Sep 17 20:37:24 EDT 2012


OOPS, found an old post that fixes the problem.  sndbuf only outputs mono 
data, even though sndbuf.channels has value 2. Very strange, but the 
following does work.

Now if sndbuf could read .mp3 files, that would be cool!  In the ugen 
reference it says that sndbuf can support multiple formats, but no mention 
of exactly what it supports. No info on the wiki either.  Does anyone know 
where to find more documentation / info?

Thanx again.

-- Rich
// sound file
string filename;
"music.wav" => filename;
if( me.args() ) me.arg(0) => filename;

// the patch
SndBuf left, right;
// load the file
filename => left.read;
filename => right.read;

0 => left.channel;
1 => right.channel;

left => dac.left;
right => dac.right;

// time loop
while( true ) {
    100::ms => now;
}



More information about the chuck-users mailing list