Hey all, I was wondering if there is a way to make the output of my .ck file an mp3 or wav file. Thanks Ryan. -- "Le savant n’étudie pas la nature parce que cela est utile ; il l’étudie parce qu’il y prend plaisir et il y prend plaisir parce qu’elle est belle." - Henri Poincaré
Yes, http://chuck.cs.princeton.edu/doc/program/ugen_full.html#WvOut
If you want an mp3 file, you'll have to convert the .wav file in another
program.
2009/12/5 Ryan Wieghard
Hey all,
I was wondering if there is a way to make the output of my .ck file an mp3 or wav file.
Thanks
Ryan.
-- "Le savant n’étudie pas la nature parce que cela est utile ; il l’étudie parce qu’il y prend plaisir et il y prend plaisir parce qu’elle est belle." - Henri Poincaré
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- David M
Heh -- I just noticed a typo in the WvOut docutmentation:
Uncompressed data types are not supported.
The sense bit is flipped, and it should read "Compressed data types (e.g. mp3) are not supported." In fact, even better, it should read: "Compressed data types such as mp3 are not supported, but you can use WvOut to write a .wav file use a public-domain application such as Audacity or sox to convert it into a compressed format." Or something. - Rob On 5 Dec 2009, at 21:14, David M wrote:
Yes, http://chuck.cs.princeton.edu/doc/program/ugen_full.html#WvOut
If you want an mp3 file, you'll have to convert the .wav file in another program.
2009/12/5 Ryan Wieghard
Hey all, I was wondering if there is a way to make the output of my .ck file an mp3 or wav file.
Thanks
Ryan.
-- "Le savant n’étudie pas la nature parce que cela est utile ; il l’étudie parce qu’il y prend plaisir et il y prend plaisir parce qu’elle est belle." - Henri Poincaré
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- David M _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
--: Robert Poor e: robert.poor@nbt-ventures.com p: +1 617 818 5115 b: http://blog.nbt-ventures.com --: This message and the information it contains are the proprietary and confidential property of NBT Ventures and may be privileged. If you are not the intended recipient, please do not read, copy, disclose or distribute its contents to any party, and notify the sender immediately. --:
It reminds me of another topic, the user-editable manuals... :) Szilveszter (Hillaby) Robert Poor escribió:
Heh -- I just noticed a typo in the WvOut docutmentation:
Uncompressed data types are not supported.
The sense bit is flipped, and it should read "Compressed data types (e.g. mp3) are not supported." In fact, even better, it should read: "Compressed data types such as mp3 are not supported, but you can use WvOut to write a .wav file use a public-domain application such as Audacity or sox to convert it into a compressed format." Or something.
- Rob
On 5 Dec 2009, at 21:14, David M wrote:
Yes, http://chuck.cs.princeton.edu/doc/program/ugen_full.html#WvOut
If you want an mp3 file, you'll have to convert the .wav file in another program.
2009/12/5 Ryan Wieghard
mailto:ryan.wieghard@gmail.com> Hey all,
I was wondering if there is a way to make the output of my .ck file an mp3 or wav file.
Thanks
Ryan.
-- "Le savant n’étudie pas la nature parce que cela est utile ; il l’étudie parce qu’il y prend plaisir et il y prend plaisir parce qu’elle est belle." - Henri Poincaré
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu mailto:chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
-- David M _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu mailto:chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
--: Robert Poor e: robert.poor@nbt-ventures.com mailto:robert.poor@nbt-ventures.com p: +1 617 818 5115 b: http://blog.nbt-ventures.com --: This message and the information it contains are the proprietary and confidential property of NBT Ventures and may be privileged. If you are not the intended recipient, please do not read, copy, disclose or distribute its contents to any party, and notify the sender immediately. --:
------------------------------------------------------------------------
_______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
If you want stereo, you might need two separate wav files: ... dac.left => wv_left => blackhole; (n + "_left.wav") => wv_left.wavFilename; dac.right => wv_right => blackhole; (n + "_right.wav") => wv_right.wavFilename; ... Szilveszter (Hillaby) Joel Matthys escribió:
I put the recording function in a simple class so I can reuse it easily:
// BEGIN EXAMPLE
Recorder rec; rec.open("my_filename");
// YOUR AUDIO HERE
// Don't forget to close the wave file rec.close();
class Recorder { WvOut wv;
fun void open(string n) { dac => wv => blackhole; n => wv.wavFilename; }
fun void close() { dac =< wv =< blackhole; } } // END EXAMPLE
Ryan Wieghard wrote:
Hey all,
I was wondering if there is a way to make the output of my .ck file an mp3 or wav file.
Thanks
Ryan.
-- "Le savant n’étudie pas la nature parce que cela est utile ; il l’étudie parce qu’il y prend plaisir et il y prend plaisir parce qu’elle est belle." - Henri Poincaré
------------------------------------------------------------------------
_______________________________________________ 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
2009/12/5 Ryan Wieghard
I was wondering if there is a way to make the output of my .ck file an mp3 or wav file.
If you do this a lot ... dacrec: #!/bin/sh chuck /Users/tom/bin/dacrec.ck:$* dacrec.ck: dac => Gain g => WvOut w => blackhole; (me.args() > 0 ? me.arg(0) : "foo.wav") => w.wavFilename; <<<"writing to file: ", w.filename()>>>; .9 => g.gain; while( true ) 1::second => now; use: dacrec foo.wav file1.ck file2.ck Modifications for stereo elsewhere in the thread. -- Tom Lieber http://AllTom.com/
participants (6)
-
David M
-
Joel Matthys
-
Robert Poor
-
Ryan Wieghard
-
Szilveszter Tóth
-
Tom Lieber