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