Forums > MaxMSP

.CSV to Jit.Matrix

July 21, 2010 | 9:30 pm

Hi,

I am doing a project where I want to make a projection by importing .CSV data to the jitter matrix.
Are there any patches which are helpful doing this?

Rob


July 21, 2010 | 10:05 pm

Adam Murray posted a cellblock to CSV converter patch a while back. It might be just what you’re looking for.

lh


July 22, 2010 | 4:17 am

You may find jit.fprint or the JavaScript file object useful.


July 22, 2010 | 6:51 pm

If you used tab-separated values, it could be as simple as loading the file into [text], then accessing each line, out comes a list, go through [listfunnel] and populate your jit.cellblock cells. Not sure what happens when there are commas though, will have to try it out. Also, if your values have spaces in each cell, that could be tricky to deal with.

Would be great if jit.cellblock could read and write CSV/TSV files, but I imagine this would be a gigantic pain, especially for all the error possibilities or extreme cases with the data coming in. That’s a hugely complicated object already…


July 23, 2010 | 2:54 pm

I’ve found the cellblock to csv from Adam Murray a while ago. That one is indeed useful for exporting matrix values to .CSV files.

However, rewrote my .java file that generates the .CSV matrices to the ASCII symbols. With jit.Textfile it was fairly easy to read in this matrix. However, it has limitations in regards to dimension (only able to read the visible ASCII code, leaves accuracy to: max 33 – 255 values) and jit.op has limitations with data handling (Can’t multiply).

Jit.fprint works better then jit.textfile. Gives more possibilities to operate afterwards, while importing its limit is set to 0-255 integers. Minor detail, i couldn’t get the csv working, although all other symbols used as dividers worked great.


March 23, 2012 | 10:27 am

I see this thread is a little old, but I need to do the exact same thing, and I don’t really understand the solutions that were suggested here. Are there any new options?


Viewing 6 posts - 1 through 6 (of 6 total)