Jo;
So basically I would like to feed in floats (results from physics simulations, e.g. position of a particle at some point) which are stored in an array in chuck and then apply them to some parameter of a sound (e.g. pitch, gain). Using a wav file turned out to work well for me (writing the header and then the float data as 16bit integers in matlab and getting floats from -1. to 1. in chuck).
Yes, that makes perfect sense. I think I would considder increasing the bit-depth of the wave file in this case, depending on how much resolution you need. For gain 16 bit would likely do but when you are modulating pitch I think it might make sense to increase the resolution. 16 bit is a popular format and all soundcards will be able to play it but here we aren't all that interested in actually playing the file as audio so I don't think there is anything keeping you from using -say- a 32 bit wave file.
Actually, thinking about it now it would possibly be even easier to use OSC and send the data using python, but I'll also look at using SndBuf...
I'm not sure; Python would mean involving a third system (matlab, Python and ChucK). I think either the file-IO from CVS (I haven't actually looked at that myself though) or your wave file method combined with SndBuf would be faster and more efficient. Wave files do seem like a very natural way to store tables to me, especially for continuous data like particle locations. Interpolation might make sense for that type of data as well. You may also want to poke around multi-channel wav files to see whether those would be useful for you. Yours, Kas.