< Back to IRCAM Forum

Reading mubu track

Hi!

I’ve a mubu container which is filled with data from a txt file. I need to read the data and to output it to an unpack object. I’m trying to figure out how, but can’t find a way to do it without opening the file and reading it with javascript, solution that I want to avoid.

Is there an easier/cleaner way to do it ?

Thanks,
Hippolyte.

Hi Hippolyte,

When you say you need to read the data and output it to an unpack object, do you mean you need to do this once the data is already loaded ?
Or is it in order to load your data in the MuBu ?
To play data when it’s already loaded, you can use mubu.play which is exactly what you need in this case.
To load the data, if that’s what you mean, depending on the formatting of the file you will have to use javascript, but if you have a look at how MuBu exports txt files (with the “writetrack <track_name>” message, giving a .txt extension in the dialog box), it’s really simple : N space separated values as N-dimensional samples, separated by newlines. MuBu will load such a file with the “read” message.

Best regards,
Joseph