├── README.md ├── cellblock2csv.js ├── cellblock2csv.maxhelp ├── cellblock2csv.maxpat ├── csv2cellblock.js ├── csv2cellblock.maxhelp └── csv2cellblock.maxpat /README.md: -------------------------------------------------------------------------------- 1 | # Max CSV / TSV Tools 2 | Version 0.7 3 | 4 | by Adam Murray 5 | 6 | Latest version: https://github.com/adamjmurray/max_csv_tools/archive/master.zip 7 | 8 | 9 | ## INSTALLATION 10 | 11 | Put this folder somewhere on your Max search path (see Options -> File Preferences) 12 | 13 | Get started with the maxhelp file for cellblock2csv or csv2cellblock 14 | 15 | 16 | ## LIMITATIONS 17 | 18 | csv2cellblock only works with tsv (tab separated value) formatted files. 19 | It also doesn't handle tabs inside a spreadsheet cell. 20 | 21 | Most spreadsheets can export as tsv, so this should work for the majority of use 22 | cases. If you need to convert a csv to tsv, you can do that for free with Google Spreadsheets. 23 | 24 | 25 | ## ABOUT 26 | 27 | This is an add-on for [Cycling '74 Max](https://cycling74.com/max7/) 28 | 29 | CSV/TSV is a format supported by spreadsheet programs, so you can use this to edit data 30 | from Max in an application like Excel or OpenOffice. 31 | 32 | 33 | ------------------------ 34 | 35 | Copyright (c) 2009-2020 Adam Murray (adam [at] compusition . com) 36 | 37 | Permission is hereby granted, free of charge, to any person obtaining a copy 38 | of this software and associated documentation files (the "Software"), to deal 39 | in the Software without restriction, including without limitation the rights 40 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 41 | copies of the Software, and to permit persons to whom the Software is 42 | furnished to do so, subject to the following conditions: 43 | 44 | The above copyright notice and this permission notice shall be included in 45 | all copies or substantial portions of the Software. 46 | 47 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 48 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 49 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 50 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 51 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 52 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 53 | THE SOFTWARE. 54 | -------------------------------------------------------------------------------- /cellblock2csv.js: -------------------------------------------------------------------------------- 1 | /* 2 | Copyright (c) 2020 Adam Murray (adam@compusition.com) 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy 5 | of this software and associated documentation files (the "Software"), to deal 6 | in the Software without restriction, including without limitation the rights 7 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 8 | copies of the Software, and to permit persons to whom the Software is 9 | furnished to do so, subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in 12 | all copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 17 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 18 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 19 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 20 | THE SOFTWARE. 21 | */ 22 | 23 | inlets = 1 24 | outlets = 1 25 | 26 | var matrix 27 | var rows 28 | var cols 29 | 30 | function init() { 31 | matrix = new Array() 32 | rows = 0 33 | cols = 0 34 | } 35 | 36 | function list() { 37 | var args = arrayfromargs(arguments) 38 | var colIdx = args.shift() 39 | var rowIdx = args.shift() 40 | var value = args.join(' ') 41 | 42 | var row = matrix[rowIdx] 43 | if(!row) row = matrix[rowIdx] = new Array() 44 | row[colIdx] = value 45 | 46 | var rowCount = rowIdx+1 47 | var colCount = colIdx+1 48 | if(rowCount > rows) rows = rowCount 49 | if(colCount > cols) cols = colCount 50 | } 51 | 52 | function write(filepath) { 53 | var file = new File(filepath, 'write', '') 54 | for(var rowIdx=0; rowIdx 0) line += ',' 59 | line += escapeCsvValue(row[colIdx]) 60 | } 61 | file.writeline(line) 62 | } 63 | file.eof = file.position 64 | file.close() 65 | } 66 | 67 | escapeCsvValue.private = 1 68 | function escapeCsvValue(value) { 69 | if(!value) return '' 70 | return '"' + value.replace('"', '""', 'g') + '"' 71 | } -------------------------------------------------------------------------------- /cellblock2csv.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 7, 6 | "minor" : 2, 7 | "revision" : 0, 8 | "architecture" : "x64", 9 | "modernui" : 1 10 | } 11 | , 12 | "rect" : [ 34.0, 79.0, 305.0, 380.0 ], 13 | "bglocked" : 0, 14 | "openinpresentation" : 0, 15 | "default_fontsize" : 11.1, 16 | "default_fontface" : 0, 17 | "default_fontname" : "Verdana", 18 | "gridonopen" : 1, 19 | "gridsize" : [ 15.0, 15.0 ], 20 | "gridsnaponopen" : 1, 21 | "objectsnaponopen" : 1, 22 | "statusbarvisible" : 2, 23 | "toolbarvisible" : 1, 24 | "lefttoolbarpinned" : 0, 25 | "toptoolbarpinned" : 0, 26 | "righttoolbarpinned" : 0, 27 | "bottomtoolbarpinned" : 0, 28 | "toolbars_unpinned_last_save" : 0, 29 | "tallnewobj" : 0, 30 | "boxanimatetime" : 200, 31 | "enablehscroll" : 1, 32 | "enablevscroll" : 1, 33 | "devicewidth" : 0.0, 34 | "description" : "", 35 | "digest" : "", 36 | "tags" : "", 37 | "style" : "", 38 | "subpatcher_template" : "", 39 | "boxes" : [ { 40 | "box" : { 41 | "fontname" : "Verdana", 42 | "fontsize" : 11.1, 43 | "id" : "obj-18", 44 | "maxclass" : "comment", 45 | "numinlets" : 1, 46 | "numoutlets" : 0, 47 | "patching_rect" : [ 73.0, 158.0, 200.0, 20.0 ], 48 | "style" : "", 49 | "text" : "Connect to jit.cellblock like this" 50 | } 51 | 52 | } 53 | , { 54 | "box" : { 55 | "fontname" : "Verdana", 56 | "fontsize" : 11.1, 57 | "id" : "obj-17", 58 | "linecount" : 3, 59 | "maxclass" : "comment", 60 | "numinlets" : 1, 61 | "numoutlets" : 0, 62 | "patching_rect" : [ 90.0, 20.0, 156.0, 47.0 ], 63 | "style" : "", 64 | "text" : "Bang to select a file or send a path to a file. The file will be overwritten!" 65 | } 66 | 67 | } 68 | , { 69 | "box" : { 70 | "fontname" : "Verdana", 71 | "fontsize" : 11.1, 72 | "id" : "obj-14", 73 | "maxclass" : "message", 74 | "numinlets" : 2, 75 | "numoutlets" : 1, 76 | "outlettype" : [ "" ], 77 | "patching_rect" : [ 97.0, 83.0, 179.0, 22.0 ], 78 | "style" : "", 79 | "text" : "/Users/USERNAME/output.csv" 80 | } 81 | 82 | } 83 | , { 84 | "box" : { 85 | "fontname" : "Verdana", 86 | "fontsize" : 11.1, 87 | "id" : "obj-12", 88 | "linecount" : 3, 89 | "maxclass" : "comment", 90 | "numinlets" : 1, 91 | "numoutlets" : 0, 92 | "patching_rect" : [ 52.0, 309.0, 179.0, 47.0 ], 93 | "style" : "", 94 | "text" : "© 2009-2016 Adam Murray\nadam@compusition.com \nMIT License" 95 | } 96 | 97 | } 98 | , { 99 | "box" : { 100 | "id" : "obj-9", 101 | "maxclass" : "button", 102 | "numinlets" : 1, 103 | "numoutlets" : 1, 104 | "outlettype" : [ "bang" ], 105 | "patching_rect" : [ 55.0, 78.0, 31.0, 31.0 ], 106 | "style" : "" 107 | } 108 | 109 | } 110 | , { 111 | "box" : { 112 | "fontname" : "Verdana", 113 | "fontsize" : 11.1, 114 | "id" : "obj-8", 115 | "maxclass" : "newobj", 116 | "numinlets" : 1, 117 | "numoutlets" : 2, 118 | "outlettype" : [ "", "" ], 119 | "patching_rect" : [ 33.0, 158.0, 36.0, 22.0 ], 120 | "style" : "", 121 | "text" : "grab" 122 | } 123 | 124 | } 125 | , { 126 | "box" : { 127 | "fontname" : "Verdana", 128 | "fontsize" : 11.1, 129 | "id" : "obj-7", 130 | "maxclass" : "newobj", 131 | "numinlets" : 2, 132 | "numoutlets" : 1, 133 | "outlettype" : [ "dump" ], 134 | "patching_rect" : [ 33.0, 130.0, 83.0, 22.0 ], 135 | "style" : "", 136 | "text" : "cellblock2csv" 137 | } 138 | 139 | } 140 | , { 141 | "box" : { 142 | "cellmap" : [ [ 0, 0, 1 ], [ 0, 1, 4 ], [ 0, 2, "text" ], [ 0, 3, "a", "b", "c" ], [ 1, 0, 2 ], [ 1, 1, 5 ], [ 1, 2, "a" ], [ 1, 3, "d", "e", "f" ], [ 2, 0, 3 ], [ 2, 1, 6 ], [ 2, 2, "b" ], [ 2, 3, 1, "a", 2, "b" ] ], 143 | "cols" : 3, 144 | "fontface" : 0, 145 | "fontname" : "Verdana", 146 | "fontsize" : 11.1, 147 | "id" : "obj-1", 148 | "maxclass" : "jit.cellblock", 149 | "numinlets" : 2, 150 | "numoutlets" : 4, 151 | "outlettype" : [ "list", "", "", "" ], 152 | "patching_rect" : [ 50.0, 191.0, 202.0, 76.0 ], 153 | "rows" : 4, 154 | "savemode" : 1, 155 | "selmode" : 5 156 | } 157 | 158 | } 159 | ], 160 | "lines" : [ { 161 | "patchline" : { 162 | "destination" : [ "obj-7", 1 ], 163 | "disabled" : 0, 164 | "hidden" : 0, 165 | "source" : [ "obj-14", 0 ] 166 | } 167 | 168 | } 169 | , { 170 | "patchline" : { 171 | "destination" : [ "obj-8", 0 ], 172 | "disabled" : 0, 173 | "hidden" : 0, 174 | "source" : [ "obj-7", 0 ] 175 | } 176 | 177 | } 178 | , { 179 | "patchline" : { 180 | "destination" : [ "obj-1", 0 ], 181 | "disabled" : 0, 182 | "hidden" : 0, 183 | "source" : [ "obj-8", 1 ] 184 | } 185 | 186 | } 187 | , { 188 | "patchline" : { 189 | "destination" : [ "obj-7", 0 ], 190 | "disabled" : 0, 191 | "hidden" : 0, 192 | "midpoints" : [ 42.5, 183.0, 24.0, 183.0, 24.0, 125.0, 42.5, 125.0 ], 193 | "source" : [ "obj-8", 0 ] 194 | } 195 | 196 | } 197 | , { 198 | "patchline" : { 199 | "destination" : [ "obj-7", 1 ], 200 | "disabled" : 0, 201 | "hidden" : 0, 202 | "midpoints" : [ 64.5, 117.0, 106.5, 117.0 ], 203 | "source" : [ "obj-9", 0 ] 204 | } 205 | 206 | } 207 | ], 208 | "dependency_cache" : [ { 209 | "name" : "cellblock2csv.maxpat", 210 | "bootpath" : "~/workspace/max_stuff/max5_projects/max_csv_tools", 211 | "type" : "JSON", 212 | "implicit" : 1 213 | } 214 | , { 215 | "name" : "cellblock2csv.js", 216 | "bootpath" : "~/workspace/max_stuff/max5_projects/max_csv_tools", 217 | "type" : "TEXT", 218 | "implicit" : 1 219 | } 220 | ], 221 | "autosave" : 0 222 | } 223 | 224 | } 225 | -------------------------------------------------------------------------------- /cellblock2csv.maxpat: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 7, 6 | "minor" : 2, 7 | "revision" : 0, 8 | "architecture" : "x64", 9 | "modernui" : 1 10 | } 11 | , 12 | "rect" : [ 374.0, 79.0, 277.0, 290.0 ], 13 | "bglocked" : 0, 14 | "openinpresentation" : 0, 15 | "default_fontsize" : 11.1, 16 | "default_fontface" : 0, 17 | "default_fontname" : "Verdana", 18 | "gridonopen" : 1, 19 | "gridsize" : [ 15.0, 15.0 ], 20 | "gridsnaponopen" : 1, 21 | "objectsnaponopen" : 1, 22 | "statusbarvisible" : 2, 23 | "toolbarvisible" : 1, 24 | "lefttoolbarpinned" : 0, 25 | "toptoolbarpinned" : 0, 26 | "righttoolbarpinned" : 0, 27 | "bottomtoolbarpinned" : 0, 28 | "toolbars_unpinned_last_save" : 0, 29 | "tallnewobj" : 0, 30 | "boxanimatetime" : 200, 31 | "enablehscroll" : 1, 32 | "enablevscroll" : 1, 33 | "devicewidth" : 0.0, 34 | "description" : "", 35 | "digest" : "", 36 | "tags" : "", 37 | "style" : "", 38 | "subpatcher_template" : "", 39 | "boxes" : [ { 40 | "box" : { 41 | "fontname" : "Verdana", 42 | "fontsize" : 11.1, 43 | "id" : "obj-1", 44 | "maxclass" : "newobj", 45 | "numinlets" : 1, 46 | "numoutlets" : 1, 47 | "outlettype" : [ "" ], 48 | "patching_rect" : [ 74.0, 74.0, 58.0, 22.0 ], 49 | "style" : "", 50 | "text" : "deferlow" 51 | } 52 | 53 | } 54 | , { 55 | "box" : { 56 | "fontname" : "Verdana", 57 | "fontsize" : 11.1, 58 | "id" : "obj-19", 59 | "maxclass" : "newobj", 60 | "numinlets" : 1, 61 | "numoutlets" : 1, 62 | "outlettype" : [ "" ], 63 | "patching_rect" : [ 74.0, 202.0, 88.0, 22.0 ], 64 | "style" : "", 65 | "text" : "prepend write" 66 | } 67 | 68 | } 69 | , { 70 | "box" : { 71 | "fontname" : "Verdana", 72 | "fontsize" : 11.1, 73 | "id" : "obj-7", 74 | "maxclass" : "newobj", 75 | "numinlets" : 1, 76 | "numoutlets" : 2, 77 | "outlettype" : [ "", "bang" ], 78 | "patching_rect" : [ 74.0, 100.0, 71.0, 22.0 ], 79 | "style" : "", 80 | "text" : "opendialog" 81 | } 82 | 83 | } 84 | , { 85 | "box" : { 86 | "fontname" : "Verdana", 87 | "fontsize" : 11.1, 88 | "id" : "obj-6", 89 | "maxclass" : "newobj", 90 | "numinlets" : 2, 91 | "numoutlets" : 2, 92 | "outlettype" : [ "", "" ], 93 | "patching_rect" : [ 74.0, 47.0, 100.0, 22.0 ], 94 | "style" : "", 95 | "text" : "route bang" 96 | } 97 | 98 | } 99 | , { 100 | "box" : { 101 | "fontname" : "Verdana", 102 | "fontsize" : 11.1, 103 | "id" : "obj-16", 104 | "maxclass" : "newobj", 105 | "numinlets" : 1, 106 | "numoutlets" : 1, 107 | "outlettype" : [ "" ], 108 | "patching_rect" : [ 74.0, 174.0, 58.0, 22.0 ], 109 | "style" : "", 110 | "text" : "deferlow" 111 | } 112 | 113 | } 114 | , { 115 | "box" : { 116 | "fontname" : "Verdana", 117 | "fontsize" : 11.1, 118 | "id" : "obj-15", 119 | "maxclass" : "newobj", 120 | "numinlets" : 1, 121 | "numoutlets" : 1, 122 | "outlettype" : [ "" ], 123 | "patching_rect" : [ 33.0, 246.0, 97.0, 22.0 ], 124 | "saved_object_attributes" : { 125 | "filename" : "cellblock2csv", 126 | "parameter_enable" : 0 127 | } 128 | , 129 | "style" : "", 130 | "text" : "js cellblock2csv" 131 | } 132 | 133 | } 134 | , { 135 | "box" : { 136 | "fontname" : "Verdana", 137 | "fontsize" : 11.1, 138 | "id" : "obj-14", 139 | "maxclass" : "newobj", 140 | "numinlets" : 1, 141 | "numoutlets" : 3, 142 | "outlettype" : [ "", "dump", "init" ], 143 | "patching_rect" : [ 74.0, 140.0, 156.0, 22.0 ], 144 | "style" : "", 145 | "text" : "t s dump init" 146 | } 147 | 148 | } 149 | , { 150 | "box" : { 151 | "comment" : "", 152 | "id" : "obj-13", 153 | "maxclass" : "inlet", 154 | "numinlets" : 0, 155 | "numoutlets" : 1, 156 | "outlettype" : [ "" ], 157 | "patching_rect" : [ 74.0, 13.0, 25.0, 25.0 ], 158 | "style" : "" 159 | } 160 | 161 | } 162 | , { 163 | "box" : { 164 | "comment" : "", 165 | "id" : "obj-11", 166 | "maxclass" : "inlet", 167 | "numinlets" : 0, 168 | "numoutlets" : 1, 169 | "outlettype" : [ "" ], 170 | "patching_rect" : [ 33.0, 13.0, 25.0, 25.0 ], 171 | "style" : "" 172 | } 173 | 174 | } 175 | , { 176 | "box" : { 177 | "annotation" : "", 178 | "comment" : "to the [grab] connected to [jit.cellblock]", 179 | "id" : "obj-4", 180 | "maxclass" : "outlet", 181 | "numinlets" : 1, 182 | "numoutlets" : 0, 183 | "patching_rect" : [ 143.0, 168.0, 25.0, 25.0 ], 184 | "style" : "" 185 | } 186 | 187 | } 188 | ], 189 | "lines" : [ { 190 | "patchline" : { 191 | "destination" : [ "obj-7", 0 ], 192 | "disabled" : 0, 193 | "hidden" : 0, 194 | "source" : [ "obj-1", 0 ] 195 | } 196 | 197 | } 198 | , { 199 | "patchline" : { 200 | "destination" : [ "obj-15", 0 ], 201 | "disabled" : 0, 202 | "hidden" : 0, 203 | "source" : [ "obj-11", 0 ] 204 | } 205 | 206 | } 207 | , { 208 | "patchline" : { 209 | "destination" : [ "obj-6", 0 ], 210 | "disabled" : 0, 211 | "hidden" : 0, 212 | "source" : [ "obj-13", 0 ] 213 | } 214 | 215 | } 216 | , { 217 | "patchline" : { 218 | "destination" : [ "obj-15", 0 ], 219 | "disabled" : 0, 220 | "hidden" : 0, 221 | "midpoints" : [ 220.5, 233.0, 42.5, 233.0 ], 222 | "source" : [ "obj-14", 2 ] 223 | } 224 | 225 | } 226 | , { 227 | "patchline" : { 228 | "destination" : [ "obj-16", 0 ], 229 | "disabled" : 0, 230 | "hidden" : 0, 231 | "source" : [ "obj-14", 0 ] 232 | } 233 | 234 | } 235 | , { 236 | "patchline" : { 237 | "destination" : [ "obj-4", 0 ], 238 | "disabled" : 0, 239 | "hidden" : 0, 240 | "source" : [ "obj-14", 1 ] 241 | } 242 | 243 | } 244 | , { 245 | "patchline" : { 246 | "destination" : [ "obj-19", 0 ], 247 | "disabled" : 0, 248 | "hidden" : 0, 249 | "source" : [ "obj-16", 0 ] 250 | } 251 | 252 | } 253 | , { 254 | "patchline" : { 255 | "destination" : [ "obj-15", 0 ], 256 | "disabled" : 0, 257 | "hidden" : 0, 258 | "midpoints" : [ 83.5, 233.0, 42.5, 233.0 ], 259 | "source" : [ "obj-19", 0 ] 260 | } 261 | 262 | } 263 | , { 264 | "patchline" : { 265 | "destination" : [ "obj-1", 0 ], 266 | "disabled" : 0, 267 | "hidden" : 0, 268 | "source" : [ "obj-6", 0 ] 269 | } 270 | 271 | } 272 | , { 273 | "patchline" : { 274 | "destination" : [ "obj-14", 0 ], 275 | "disabled" : 0, 276 | "hidden" : 0, 277 | "midpoints" : [ 164.5, 126.0, 83.5, 126.0 ], 278 | "source" : [ "obj-6", 1 ] 279 | } 280 | 281 | } 282 | , { 283 | "patchline" : { 284 | "destination" : [ "obj-14", 0 ], 285 | "disabled" : 0, 286 | "hidden" : 0, 287 | "source" : [ "obj-7", 0 ] 288 | } 289 | 290 | } 291 | ], 292 | "dependency_cache" : [ { 293 | "name" : "cellblock2csv.js", 294 | "bootpath" : "~/workspace/max_stuff/max5_projects/max_csv_tools", 295 | "type" : "TEXT", 296 | "implicit" : 1 297 | } 298 | ], 299 | "autosave" : 0 300 | } 301 | 302 | } 303 | -------------------------------------------------------------------------------- /csv2cellblock.js: -------------------------------------------------------------------------------- 1 | function read(filepath) { 2 | var file = new File(filepath, 'read', 'TEXT'); 3 | if (!file.isopen) { 4 | error('Could not open file: ' + filepath + '\n'); 5 | return; 6 | } 7 | var text = ''; 8 | var eof = file.eof; 9 | var i, j; 10 | for(i = 0; i < eof; i += 1024) { 11 | text += file.readchars(1024).join(''); 12 | } 13 | var lines = text.split('\n'); 14 | var cols = 0; 15 | outlet(0, 'rows', lines.length); 16 | for(i = 0; i < lines.length; i++) { 17 | // TODO: support CSV 18 | // TODO: handle escaped tabs 19 | var cells = lines[i].split('\t'); 20 | if (cells.length > cols) { 21 | cols = cells.length; 22 | outlet(0, 'cols', cols); 23 | } 24 | for(j = 0; j < cells.length; j++) { 25 | outlet(0, 'set', j, i, cells[j]); 26 | } 27 | } 28 | } -------------------------------------------------------------------------------- /csv2cellblock.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 7, 6 | "minor" : 2, 7 | "revision" : 0, 8 | "architecture" : "x64", 9 | "modernui" : 1 10 | } 11 | , 12 | "rect" : [ 277.0, 580.0, 708.0, 507.0 ], 13 | "bglocked" : 0, 14 | "openinpresentation" : 0, 15 | "default_fontsize" : 11.1, 16 | "default_fontface" : 0, 17 | "default_fontname" : "Verdana", 18 | "gridonopen" : 1, 19 | "gridsize" : [ 15.0, 15.0 ], 20 | "gridsnaponopen" : 1, 21 | "objectsnaponopen" : 1, 22 | "statusbarvisible" : 2, 23 | "toolbarvisible" : 1, 24 | "lefttoolbarpinned" : 0, 25 | "toptoolbarpinned" : 0, 26 | "righttoolbarpinned" : 0, 27 | "bottomtoolbarpinned" : 0, 28 | "toolbars_unpinned_last_save" : 0, 29 | "tallnewobj" : 0, 30 | "boxanimatetime" : 200, 31 | "enablehscroll" : 1, 32 | "enablevscroll" : 1, 33 | "devicewidth" : 0.0, 34 | "description" : "", 35 | "digest" : "", 36 | "tags" : "", 37 | "style" : "", 38 | "subpatcher_template" : "", 39 | "boxes" : [ { 40 | "box" : { 41 | "fontface" : 0, 42 | "fontname" : "Verdana", 43 | "fontsize" : 11.1, 44 | "id" : "obj-3", 45 | "maxclass" : "jit.cellblock", 46 | "numinlets" : 2, 47 | "numoutlets" : 4, 48 | "outlettype" : [ "list", "", "", "" ], 49 | "patching_rect" : [ 33.0, 170.0, 542.0, 188.0 ] 50 | } 51 | 52 | } 53 | , { 54 | "box" : { 55 | "fontname" : "Verdana", 56 | "fontsize" : 11.1, 57 | "id" : "obj-17", 58 | "linecount" : 2, 59 | "maxclass" : "comment", 60 | "numinlets" : 1, 61 | "numoutlets" : 0, 62 | "patching_rect" : [ 90.0, 20.0, 156.0, 33.0 ], 63 | "style" : "", 64 | "text" : "Bang to select a file or send a path to a file." 65 | } 66 | 67 | } 68 | , { 69 | "box" : { 70 | "fontname" : "Verdana", 71 | "fontsize" : 11.1, 72 | "id" : "obj-14", 73 | "maxclass" : "message", 74 | "numinlets" : 2, 75 | "numoutlets" : 1, 76 | "outlettype" : [ "" ], 77 | "patching_rect" : [ 90.0, 71.5, 170.0, 22.0 ], 78 | "style" : "", 79 | "text" : "/Users/USERNAME/input.csv" 80 | } 81 | 82 | } 83 | , { 84 | "box" : { 85 | "fontname" : "Verdana", 86 | "fontsize" : 11.1, 87 | "id" : "obj-12", 88 | "linecount" : 3, 89 | "maxclass" : "comment", 90 | "numinlets" : 1, 91 | "numoutlets" : 0, 92 | "patching_rect" : [ 37.0, 377.0, 179.0, 47.0 ], 93 | "style" : "", 94 | "text" : "© 2009-2016 Adam Murray\nadam@compusition.com \nMIT License" 95 | } 96 | 97 | } 98 | , { 99 | "box" : { 100 | "id" : "obj-9", 101 | "maxclass" : "button", 102 | "numinlets" : 1, 103 | "numoutlets" : 1, 104 | "outlettype" : [ "bang" ], 105 | "patching_rect" : [ 33.0, 71.5, 31.0, 31.0 ], 106 | "style" : "" 107 | } 108 | 109 | } 110 | , { 111 | "box" : { 112 | "fontname" : "Verdana", 113 | "fontsize" : 11.1, 114 | "id" : "obj-7", 115 | "maxclass" : "newobj", 116 | "numinlets" : 1, 117 | "numoutlets" : 1, 118 | "outlettype" : [ "" ], 119 | "patching_rect" : [ 33.0, 130.0, 83.0, 22.0 ], 120 | "style" : "", 121 | "text" : "csv2cellblock" 122 | } 123 | 124 | } 125 | ], 126 | "lines" : [ { 127 | "patchline" : { 128 | "destination" : [ "obj-7", 0 ], 129 | "disabled" : 0, 130 | "hidden" : 0, 131 | "source" : [ "obj-14", 0 ] 132 | } 133 | 134 | } 135 | , { 136 | "patchline" : { 137 | "destination" : [ "obj-3", 0 ], 138 | "disabled" : 0, 139 | "hidden" : 0, 140 | "source" : [ "obj-7", 0 ] 141 | } 142 | 143 | } 144 | , { 145 | "patchline" : { 146 | "destination" : [ "obj-7", 0 ], 147 | "disabled" : 0, 148 | "hidden" : 0, 149 | "source" : [ "obj-9", 0 ] 150 | } 151 | 152 | } 153 | ], 154 | "dependency_cache" : [ { 155 | "name" : "csv2cellblock.maxpat", 156 | "bootpath" : "~/workspace/max_stuff/max5_projects/max_csv_tools", 157 | "type" : "JSON", 158 | "implicit" : 1 159 | } 160 | , { 161 | "name" : "csv2cellblock.js", 162 | "bootpath" : "~/workspace/max_stuff/max5_projects/max_csv_tools", 163 | "type" : "TEXT", 164 | "implicit" : 1 165 | } 166 | ], 167 | "autosave" : 0 168 | } 169 | 170 | } 171 | -------------------------------------------------------------------------------- /csv2cellblock.maxpat: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 7, 6 | "minor" : 2, 7 | "revision" : 0, 8 | "architecture" : "x64", 9 | "modernui" : 1 10 | } 11 | , 12 | "rect" : [ 647.0, 723.0, 213.0, 312.0 ], 13 | "bglocked" : 0, 14 | "openinpresentation" : 0, 15 | "default_fontsize" : 11.1, 16 | "default_fontface" : 0, 17 | "default_fontname" : "Verdana", 18 | "gridonopen" : 1, 19 | "gridsize" : [ 15.0, 15.0 ], 20 | "gridsnaponopen" : 1, 21 | "objectsnaponopen" : 1, 22 | "statusbarvisible" : 2, 23 | "toolbarvisible" : 1, 24 | "lefttoolbarpinned" : 0, 25 | "toptoolbarpinned" : 0, 26 | "righttoolbarpinned" : 0, 27 | "bottomtoolbarpinned" : 0, 28 | "toolbars_unpinned_last_save" : 0, 29 | "tallnewobj" : 0, 30 | "boxanimatetime" : 200, 31 | "enablehscroll" : 1, 32 | "enablevscroll" : 1, 33 | "devicewidth" : 0.0, 34 | "description" : "", 35 | "digest" : "", 36 | "tags" : "", 37 | "style" : "", 38 | "subpatcher_template" : "", 39 | "boxes" : [ { 40 | "box" : { 41 | "comment" : "", 42 | "id" : "obj-1", 43 | "maxclass" : "outlet", 44 | "numinlets" : 1, 45 | "numoutlets" : 0, 46 | "patching_rect" : [ 33.0, 228.0, 30.0, 30.0 ], 47 | "style" : "" 48 | } 49 | 50 | } 51 | , { 52 | "box" : { 53 | "fontname" : "Verdana", 54 | "fontsize" : 11.1, 55 | "id" : "obj-19", 56 | "maxclass" : "newobj", 57 | "numinlets" : 1, 58 | "numoutlets" : 1, 59 | "outlettype" : [ "" ], 60 | "patching_rect" : [ 33.0, 145.0, 85.0, 22.0 ], 61 | "style" : "", 62 | "text" : "prepend read" 63 | } 64 | 65 | } 66 | , { 67 | "box" : { 68 | "fontname" : "Verdana", 69 | "fontsize" : 11.1, 70 | "id" : "obj-7", 71 | "maxclass" : "newobj", 72 | "numinlets" : 1, 73 | "numoutlets" : 2, 74 | "outlettype" : [ "", "bang" ], 75 | "patching_rect" : [ 33.0, 94.0, 71.0, 22.0 ], 76 | "style" : "", 77 | "text" : "opendialog" 78 | } 79 | 80 | } 81 | , { 82 | "box" : { 83 | "fontname" : "Verdana", 84 | "fontsize" : 11.1, 85 | "id" : "obj-6", 86 | "maxclass" : "newobj", 87 | "numinlets" : 2, 88 | "numoutlets" : 2, 89 | "outlettype" : [ "", "" ], 90 | "patching_rect" : [ 33.0, 52.0, 100.0, 22.0 ], 91 | "style" : "", 92 | "text" : "route bang" 93 | } 94 | 95 | } 96 | , { 97 | "box" : { 98 | "fontname" : "Verdana", 99 | "fontsize" : 11.1, 100 | "id" : "obj-15", 101 | "maxclass" : "newobj", 102 | "numinlets" : 1, 103 | "numoutlets" : 1, 104 | "outlettype" : [ "" ], 105 | "patching_rect" : [ 33.0, 187.0, 97.0, 22.0 ], 106 | "saved_object_attributes" : { 107 | "filename" : "csv2cellblock.js", 108 | "parameter_enable" : 0 109 | } 110 | , 111 | "style" : "", 112 | "text" : "js csv2cellblock" 113 | } 114 | 115 | } 116 | , { 117 | "box" : { 118 | "comment" : "", 119 | "id" : "obj-13", 120 | "maxclass" : "inlet", 121 | "numinlets" : 0, 122 | "numoutlets" : 1, 123 | "outlettype" : [ "" ], 124 | "patching_rect" : [ 33.0, 12.0, 25.0, 25.0 ], 125 | "style" : "" 126 | } 127 | 128 | } 129 | ], 130 | "lines" : [ { 131 | "patchline" : { 132 | "destination" : [ "obj-6", 0 ], 133 | "disabled" : 0, 134 | "hidden" : 0, 135 | "source" : [ "obj-13", 0 ] 136 | } 137 | 138 | } 139 | , { 140 | "patchline" : { 141 | "destination" : [ "obj-1", 0 ], 142 | "disabled" : 0, 143 | "hidden" : 0, 144 | "source" : [ "obj-15", 0 ] 145 | } 146 | 147 | } 148 | , { 149 | "patchline" : { 150 | "destination" : [ "obj-15", 0 ], 151 | "disabled" : 0, 152 | "hidden" : 0, 153 | "source" : [ "obj-19", 0 ] 154 | } 155 | 156 | } 157 | , { 158 | "patchline" : { 159 | "destination" : [ "obj-19", 0 ], 160 | "disabled" : 0, 161 | "hidden" : 0, 162 | "midpoints" : [ 123.5, 127.0, 42.5, 127.0 ], 163 | "source" : [ "obj-6", 1 ] 164 | } 165 | 166 | } 167 | , { 168 | "patchline" : { 169 | "destination" : [ "obj-7", 0 ], 170 | "disabled" : 0, 171 | "hidden" : 0, 172 | "source" : [ "obj-6", 0 ] 173 | } 174 | 175 | } 176 | , { 177 | "patchline" : { 178 | "destination" : [ "obj-19", 0 ], 179 | "disabled" : 0, 180 | "hidden" : 0, 181 | "source" : [ "obj-7", 0 ] 182 | } 183 | 184 | } 185 | ], 186 | "dependency_cache" : [ { 187 | "name" : "csv2cellblock.js", 188 | "bootpath" : "~/workspace/max_stuff/max5_projects/max_csv_tools", 189 | "type" : "TEXT", 190 | "implicit" : 1 191 | } 192 | ], 193 | "autosave" : 0 194 | } 195 | 196 | } 197 | --------------------------------------------------------------------------------