On 30 September 2010 18:05, Daniel Trueman <dtrueman@princeton.edu> wrote:
hey, thanks. i'm actually looking for non-realtime file writing; want to write the contents of LiSa buffers to disc, but i don't want to hack that into LiSa itself, for many reasons including lack of time and laziness...


So, you are looking for non-realtime writing from a VM that itself runs in realtime and outputs audio that may be different from the contents of the buffer that you are trying to save?

I'm not sure about the non-realtime writing, but you could copy the contents of your LiSa to a separate LiSa used for this purpose, then have that play into a WvOut (and a blackhole) while the original LiSa is free to go on to do new things?

I don't think you can do exactly what you proposed, but I'm fairly sure there will be workarounds depending on what you want to accomplish. I also think we might be able to use a file output in a function that takes a LiSa as a argument and creates a audio file. This would, however, require implementing the file format of whatever type of file we pick in ChucK. It's also a rather theoretical approach as I never heard of anyone doing this. In my experience that means trying will unearth bugs (not a bad thing, as such).

Does that help? Do we need to go over the details of your needs?

Yours,
Kas.