print/export jit.cellblock data?
I would like the user to be able to print out the data that was collected in the jit.cellblock or alternatively export it to a spreadsheet and print it from excel or some other program.
Is this possible? I found the detox, intox, toxine objects but can't quite work out how they should be used.
(Also, I have no working knowledge of excel, spreadsheets...)
Any pointers are greatly appreciated.
Hi javascript is a good solution. I already have it working - was looking for an excuse to learn javascript file I/O and feeling generous tonight.
Put all the included files on your Max path and check out the help file. It converts a cellblock to a CSV file (http://en.wikipedia.org/wiki/Comma-separated_values), which is a simple text format supported by spreadsheets. Tested with Excel and Open Office.
Hopefully you have Max 5. The javascript will work in 4 but the patch needs to be converted.
Dude, this is fantastic!
[ddg]
Darwin Grosse
On Jan 8, 2009, at 10:43 PM, Adam Murray wrote:
> Hi javascript is a good solution. I already have it working - was
> looking for an excuse to learn javascript file I/O and feeling
> generous tonight.
>
> Put all the included files on your Max path and check out the help
> file. It converts a cellblock to a CSV file (http://en.wikipedia.org/wiki/Comma-separated_values
> ), which is a simple text format supported by spreadsheets. Tested
> with Excel and Open Office.
>
> Hopefully you have Max 5. The javascript will work in 4 but the
> patch needs to be converted.
> --
> Adam Murray
> compusition.com
This is soooooo extremely cool!!!!!!!! Thank you so much!!!!!!!!
:) You're welcome.
Great, a very much needed function.
Thanks for sharing.
J-F.
> It converts a cellblock to a CSV file
> --
> Adam Murray
> compusition.com
dopethatwantscash@yahoo.com wrote on Sat, 03 October 2009 22:54Hi,
When I try to write a file (by sending the name of the intended written-to filename to the right inlet), it successfully writes the first ten rows. Nothing else is transferred.
Hmmm... I haven't used this in a while but I just tried and it's working for me on Max 5.0.8 & OS X 10.5.8.
Is your matrix very big? Maybe there's some sort of memory/performance issue when trying to use this on a lot of data. But I tried on a 20 column x 500 row matrix with a single number in each cell, and that worked.
Quote:
When I try to read a file, after selecting a CSV file from the resulting dialog, nothing happens, and the [bang] that I used to trigger the reading stays yellow, as if hanged. However, the rest of Max continues to work fine.
There is no 'read' feature. This object only converts jit.cellblocks to csv files (hence the name cellblock2csv). When you bang and select a file, you're choosing the file to write to, and it will overwrite whatever is in that file, so be careful!
Anyway, I also see this stuck yellow button behvaior. I think it's a weird bug in Max that happens when you connect a button to the opendialog object. It seems harmless, but it's easily fixed by putting a deferlow in front of the opendialog object. I attached an updated cellblock2csv.maxpat
Hi there,
I love when I come here trying to solve a problem and I find a thread like this!
I'm not exactly clear which inlets and outlets to connect to what in your patch - would someone be able to help me out with connecting this to a cellblock so that it works?
Cheers,
joel
joel@squarewave.ca wrote on Fri, 06 November 2009 12:07Hi there,
I'm not exactly clear which inlets and outlets to connect to what in your patch - would someone be able to help me out with connecting this to a cellblock so that it works?
In the zip file I attached near the top of this thread, there's a .maxhelp file that shows you how to hook it up.
Oh dear lord... shouldn't my brain be getting smarter with each moment spent working on these things...? Of course... the help file.
Thank you for this.
Greatly.
Cheers,
Joel
I got a request for a link to the cellblock2csv object, since the attachment on the forum seems to be lost. If anyone is looking for it, you can get it here: http://github.com/adamjmurray/max_csv_tools/zipball/0.5
That link is for the current version as of Jan 11, 2010. Check the main project page for the most recent version: http://github.com/adamjmurray/max_csv_tools
PS - Sorry about the weirdly named zip file, that's how github works. It's super easy for me to share patches this way so get used to it ;)
I'm looking for a way to do exactly this.
with max 6.0.8, os 10.8.2, everything is written in one single colunm.
I'm quite sure there is an easy solution but my knowledge of js and csv format is very limited.
Is there someone who can help ?
Thanks,
Yoann
Thanks for this Adam - this tool is extremely useful!
However - have there been any changes since Max 6.1? I'm using Max 6.1 for a project, and find that the csv2cellblock will work perfectly sometimes, and other times fails with a lot of "js: no function list" and "js: no function write" errors in the Max window. I can't find a reason for this as it can literally be working one day, and then fail when I open up the patch the next day - have tried moving objects around in case it has something to do with object order in Max but no luck. Any ideas would be very much appreciated!
I believe I may have solved this issue, there's a small bug in the javascript code on line 58:
if(colIdx > 0) line += ';'
In Max 6.1 on Mac OS X Mavericks, the inverted commas are special-character commas, which are breaking the script. Once I changed them to regular ASCII inverted commas the javascript works fine with no errors.
Old thread I know, but can anyone help me troubleshoot a problem with this? I'm trying to save a region of a spectrogram that's saved as a matrix and sent to a jit.cellblock. The desired dimensions are 24x256 pixels, but the saved csv file is coming up as 24x24 instead. Here's the project file: https://www.dropbox.com/sh/mlwc50c9occkrgg/AADD9_U69G1GqhHuuHLB85OHa?dl=0
Any help would be greatly appreciated!