I want to have chuck read a stereo input file. The only way I've been able to process stereo is to first separate each stereo file into two mono files, then manipulate these separately with two SndBuf instances. 1. Is there another way to do this? I've tried: SndBuf s; s.chan(1) => dac.right; s.chan(0) => dac.left; This compiles fine, but crashes with null pointer exception when it is run. 2. VIrtual Audio Cable for windows? THis is software that allows you to route output of any program to input of others. WHen I install it, winamp can find and apparently use one of these virtual cables as output, however how might one get chuck to use the input side of this cable? 3. I've heard of some sort of new file io class; would that help? Thanx much... -- Rich
1. You need to read a file into the buffer before chucking the
channels to the dac.
// BEGIN CODE
SndBuf s;
s.read("mystereosound.wav")
s.chan(1) => dac.right;
s.chan(0) => dac.left;
// END CODE
2. I haven't tried Virtual Audio Cable, but I've used Jack
(http://jackaudio.org/) to do this kind of thing. You might want to
give it a try.
3. I'm not sure what you mean by "that". I think the two questions
you've asked can be addressed without using the file io goodies.
andy
On Tue, Nov 9, 2010 at 5:18 PM, Rich Caloggero
I want to have chuck read a stereo input file. The only way I've been able to process stereo is to first separate each stereo file into two mono files, then manipulate these separately with two SndBuf instances.
1. Is there another way to do this? I've tried: SndBuf s; s.chan(1) => dac.right; s.chan(0) => dac.left;
This compiles fine, but crashes with null pointer exception when it is run.
2. VIrtual Audio Cable for windows? THis is software that allows you to route output of any program to input of others. WHen I install it, winamp can find and apparently use one of these virtual cables as output, however how might one get chuck to use the input side of this cable?
3. I've heard of some sort of new file io class; would that help?
Thanx much... -- Rich
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
Ah, I need to try this when I get home! If I can use SndBuf to actually read
stereo files, then no need for jack or VirtualAudioCable or any such thing.
I did download Jack, but it seemed like a mess. There were all kinds of
things you needed (pieces of mingnu or whatever), so I won't bother unless I
really need it.
-- Rich
----- Original Message -----
From: "Andrew Turley"
I want to have chuck read a stereo input file. The only way I've been able to process stereo is to first separate each stereo file into two mono files, then manipulate these separately with two SndBuf instances.
1. Is there another way to do this? I've tried: SndBuf s; s.chan(1) => dac.right; s.chan(0) => dac.left;
This compiles fine, but crashes with null pointer exception when it is run.
2. VIrtual Audio Cable for windows? THis is software that allows you to route output of any program to input of others. WHen I install it, winamp can find and apparently use one of these virtual cables as output, however how might one get chuck to use the input side of this cable?
3. I've heard of some sort of new file io class; would that help?
Thanx much... -- Rich
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
This fails. My sound card is most definately stereo, and the file I'm reading
from is definately stereo.
What am I doing wrong?
SndBuf s;
s.read ("music.wav");
// This crashes the vm
s.chan(1) => dac.right;
The following is ok
s.chan(0) => dac.left;
while (true) {
1::second => now;
} // main loop
----- Original Message -----
From: "Rich Caloggero"
Ah, I need to try this when I get home! If I can use SndBuf to actually read stereo files, then no need for jack or VirtualAudioCable or any such thing. I did download Jack, but it seemed like a mess. There were all kinds of things you needed (pieces of mingnu or whatever), so I won't bother unless I really need it.
-- Rich
----- Original Message ----- From: "Andrew Turley"
To: "ChucK Users Mailing List" Sent: Wednesday, November 10, 2010 12:57 AM Subject: Re: [chuck-users] Anyone have experience with VirtualAudioCableunder windows 1. You need to read a file into the buffer before chucking the channels to the dac.
// BEGIN CODE SndBuf s; s.read("mystereosound.wav") s.chan(1) => dac.right; s.chan(0) => dac.left; // END CODE
2. I haven't tried Virtual Audio Cable, but I've used Jack (http://jackaudio.org/) to do this kind of thing. You might want to give it a try.
3. I'm not sure what you mean by "that". I think the two questions you've asked can be addressed without using the file io goodies.
andy
On Tue, Nov 9, 2010 at 5:18 PM, Rich Caloggero
wrote: I want to have chuck read a stereo input file. The only way I've been able to process stereo is to first separate each stereo file into two mono files, then manipulate these separately with two SndBuf instances.
1. Is there another way to do this? I've tried: SndBuf s; s.chan(1) => dac.right; s.chan(0) => dac.left;
This compiles fine, but crashes with null pointer exception when it is run.
2. VIrtual Audio Cable for windows? THis is software that allows you to route output of any program to input of others. WHen I install it, winamp can find and apparently use one of these virtual cables as output, however how might one get chuck to use the input side of this cable?
3. I've heard of some sort of new file io class; would that help?
Thanx much... -- Rich
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
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; -- Atte http://atte.dk http://modlys.dk
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@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; -- Atte http://atte.dk http://modlys.dk _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (3)
-
Andrew Turley
-
Atte André Jensen
-
Rich Caloggero