[chuck-users] Stereo files and SndBuf

Atte André Jensen atte at email.dk
Thu Nov 11 03:42:54 EST 2010

On 2010-11-11 06:23, Rich Caloggero wrote:
> This fails. My sound card is most definately stereo, and the file I'm
> reading from is definately stereo.
> What am I doing wrong?

I think SndBuf is always outputting in mono, but can read a stereo 
sample. Try the following:

SndBuf s_left, s_right;
"/home/atte/music/samples/seq/beats/bar_matched/dnb1.wav" => s_left.read;
"/home/atte/music/samples/seq/beats/bar_matched/dnb1.wav" => s_right.read;
0 => s_left.channel; // not needed
1 => s_right.channel;
s_left => dac.left;
s_right => dac.right;
s_left.length() => now;


http://atte.dk   http://modlys.dk

More information about the chuck-users mailing list