[chuck-users] Stereo files and SndBuf

Rich Caloggero rjc at mit.edu
Thu Nov 11 12:53:14 EST 2010

Excellent, this did work!
Thank you so much!

-- Rich

-----Original Message----- 
From: Atte André Jensen
Sent: Thursday, November 11, 2010 3:42 AM
To: chuck-users at lists.cs.princeton.edu
Subject: Re: [chuck-users] Stereo files and SndBuf

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
chuck-users mailing list
chuck-users at lists.cs.princeton.edu

More information about the chuck-users mailing list