[chuck-users] snd file writing
dtrueman at princeton.edu
Thu Sep 30 16:20:54 EDT 2010
i just want the opposite of SndBuf.read(); want to be able to open a file and write to it all at once, even if it causes hiccups in the VM. but as far as i can tell it's not possible. i'm pretty sure i can cram samples into SndBuf using valueAt, doing the opposite of what we do now to load samples into LiSa, but i haven't tried that either... so maybe it's all a big mess.
On Sep 30, 2010, at 9:10 PM, Kassen wrote:
> On 30 September 2010 18:05, Daniel Trueman <dtrueman at 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?
> chuck-users mailing list
> chuck-users at lists.cs.princeton.edu
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the chuck-users