├── README.md ├── clickedlist ├── ol.clickedlist.js └── ol.clicklist.maxhelp ├── datadisplay ├── ol.datadisplay.js └── ol.datadisplay.maxhelp ├── kslider ├── bkh.png ├── ol.kslider.bp.maxhelp ├── ol.kslider.bp.maxpat ├── onekey.bp.maxpat ├── oneoctave.bp.maxpat └── wkh.png ├── pngknob ├── knob1-60.png ├── knob2-100.png ├── knob3-63.png ├── knob4-100.png ├── ol.pngknob.js └── ol.pngknob.maxhelp └── trajectory ├── ol.trajectory.js ├── ol.trajectory.json └── ol.trajectory.maxhelp /README.md: -------------------------------------------------------------------------------- 1 | # olControls 2 | A collection of UI controls for Cycling 74's Max6+ 3 | 4 | This is a set of javascript scripts for the JSUI object that use the mgraphics to draw several 2D interfaces 5 | 6 | Licence: MIT 7 | 8 | Oli Larkin 9 | -------------------------------------------------------------------------------- /clickedlist/ol.clickedlist.js: -------------------------------------------------------------------------------- 1 | // Initialisation ---------------------------- 2 | //------------------------------------------- 3 | inlets = 1; 4 | outlets = 3; 5 | 6 | //outlet 1 = in mode 1 + 2 item number clicked, name, value 7 | //outlet 2 = in mode 1 + 2 same when shift clicked 8 | //outlet 3 = in mode 0 dump selected items to coll on getselected() 9 | 10 | setinletassist(0, "messages"); 11 | setoutletassist(0, "item clicked, name, value"); 12 | setoutletassist(1, "item clicked, name, value (shift)"); 13 | setoutletassist(2, "to coll"); 14 | 15 | var mode = 0; // 0 = select multiple items, 1 = single items can select none, 2 = single items allways one selected 16 | 17 | autowatch = 1; 18 | 19 | function elementobject(name, value, selected, parent) 20 | { 21 | this.name = name; 22 | this.value = value; 23 | this.selected = selected; 24 | this.open = true; 25 | this.parent = parent; //reference to the parent object? 26 | this.ch = new Array(); //children 27 | } 28 | 29 | var root; // the root element 30 | var cpar; // reference to the current parent object 31 | 32 | initobjects(); 33 | 34 | // Constants ---------------------------- 35 | //------------------------------------------- 36 | const OS = max.os; 37 | const HYMIN = 2; 38 | 39 | // Drawing Variables ---------------------------- 40 | //------------------------------------------- 41 | 42 | var width, height, maxitems, hpos, offset, hymax; 43 | var textsize = 9; 44 | var vrowsize = 11; 45 | initdrawing(); 46 | 47 | var vdrawlines = true; 48 | var dragging = false; 49 | var prevclick = -1; 50 | var autodraw = true; 51 | var border = true; 52 | var sbwidth = 10; 53 | var showindex = 1; 54 | var zerobased = 1; 55 | var woffs = 1; // offset the text 56 | var tfont = "Arial"; 57 | var bgoffset = 1; 58 | 59 | var collcompat = false; 60 | var autooutput = false; 61 | 62 | // Colours ---------------------------- 63 | //------------------------------------------- 64 | var brgb = [0.8,0.8,0.8,1]; // background 65 | var bdrgb = [0.64705882,0.64705882,0.64705882,1]; // frame 66 | var nrgb = [1,0,0,1]; // item number 67 | var lrgb = [0.75,0.75,0.75,1]; // lines 68 | var trgb = [0,0,0,1]; // text 69 | var srgb = [0,0,0,1]; // scroll bar handle 70 | var sbrgb = [0.70980392,0.70980392,0.70980392,1]; // scroll bar bg 71 | var sirgb = [0.7,0.7,0.7,1.]; // selected item 72 | 73 | if (OS == "windows") 74 | { 75 | tfont = "Tahoma"; 76 | trgb = [0.4,0.4,0.4,1,]; 77 | bgoffset = 2; 78 | } 79 | 80 | declareattribute("brgb",null,"setbrgb",1); 81 | declareattribute("bdrgb",null,"setbdrgb",1); 82 | declareattribute("nrgb",null,null,1); 83 | declareattribute("lrgb",null,null,1); 84 | declareattribute("trgb",null,null,1); 85 | declareattribute("srgb",null,null,1); 86 | declareattribute("sbrgb",null,null,1); 87 | declareattribute("sirgb",null,null,1); 88 | declareattribute("sbwidth",null,"setsbwidth",1); 89 | declareattribute("textsize",null,"settextsize",1); 90 | declareattribute("mode",null,"setmode",1); 91 | declareattribute("showindex",null,"setshowindex",1); 92 | declareattribute("zerobased",null,"setzerobased",1); 93 | declareattribute("autodraw",null,null,1); 94 | declareattribute("tfont",null,null,1); 95 | 96 | function setbrgb(r,g,b,a) 97 | { 98 | brgb = [r,g,b,a]; 99 | mgraphics.redraw(); 100 | } 101 | 102 | function setbdrgb(r,g,b,a) 103 | { 104 | bdrgb = [r,g,b,a]; 105 | mgraphics.redraw(); 106 | } 107 | 108 | 109 | declareattribute("collcompat",null,null,1); 110 | declareattribute("autooutput",null,null,1); 111 | 112 | mgraphics.redraw(); 113 | 114 | // Init functions ---------------------------- 115 | //------------------------------------------- 116 | 117 | mgraphics.init(); 118 | mgraphics.relative_coords = 0; 119 | mgraphics.autofill = 0; 120 | 121 | 122 | function initobjects() 123 | { 124 | root = new elementobject("root", "undefined", false, "undefined"); 125 | cpar = root; 126 | } 127 | 128 | function initdrawing() 129 | { 130 | width = box.rect[2]-box.rect[0]; 131 | if (OS == "windows") width += 1; 132 | height = box.rect[3]-box.rect[1]; 133 | maxitems = Math.floor(height / vrowsize); //the max number of elements to display at once. 134 | hpos = 2; // the position of the scrollbar 135 | offset = 0; // the offset of items if scrolled down 136 | hymax = (height-textsize)-2; 137 | } 138 | 139 | // Main functions ---------------------------- 140 | //------------------------------------------- 141 | 142 | function clear() 143 | { 144 | initobjects(); 145 | prevclick = -1; 146 | mgraphics.redraw(); 147 | } 148 | 149 | // not working 150 | function addparent(name) 151 | { 152 | cpar.ch[cpar.ch.length] = new elementobject(name, "undefined", false, cpar); 153 | cpar = cpar.ch[cpar.ch.length-1]; 154 | 155 | if(autodraw) mgraphics.redraw(); 156 | } 157 | // not working 158 | function closeparent() 159 | { 160 | if(cpar != root) cpar = cpar.parent; 161 | else post("can't close the root element\n"); 162 | } 163 | 164 | function addelement(name, value, selected) 165 | { 166 | if(selected === undefined) selected = false; 167 | cpar.ch[cpar.ch.length] = new elementobject(name, value, selected, cpar); 168 | 169 | if(autodraw) mgraphics.redraw(); 170 | // notifyclients(); 171 | prevclick = -1; 172 | } 173 | addelement.immediate = 1; 174 | 175 | function checkall() 176 | { 177 | for(i = 0; i < root.ch.length; i++) 178 | { 179 | root.ch[i].selected = 1; 180 | } 181 | 182 | prevclick = -1; 183 | mgraphics.redraw(); 184 | notifyclients(); 185 | if(autooutput) getselected(); 186 | } 187 | 188 | function switchone(v) 189 | { 190 | var a = root.ch[v] 191 | var state = a.selected; 192 | checknone(); 193 | a.selected = !state; 194 | if(a.selected) outlet(0, v, root.ch[v].name,root.ch[v].value); 195 | else outlet(0,0) 196 | if(autooutput) getselected(); 197 | } 198 | 199 | function checknone() 200 | { 201 | for(i = 0; i < root.ch.length; i++) 202 | { 203 | root.ch[i].selected = 0; 204 | } 205 | 206 | prevclick = -1; 207 | mgraphics.redraw(); 208 | notifyclients(); 209 | if(autooutput) getselected(); 210 | } 211 | 212 | function searchandcheck(name) // finds named item and sets it to selected 213 | { 214 | for(i = 0; i < root.ch.length; i++) 215 | { 216 | if(root.ch[i].name == name) 217 | { 218 | root.ch[i].selected = true; 219 | } 220 | } 221 | if(autooutput) getselected(); 222 | } 223 | searchandcheck.immediate = 1; 224 | 225 | function getselected() // returns selected items out 3rd outlet, coll compatible 226 | { 227 | if(collcompat) 228 | { 229 | var a = 0; 230 | outlet(2,"clear"); 231 | 232 | for(i = 0; i < root.ch.length; i++) 233 | { 234 | if(root.ch[i].selected) 235 | { 236 | if(mode == 0) 237 | { 238 | outlet(2,a++,root.ch[i].name,root.ch[i].value); 239 | } 240 | else outlet(2,i,root.ch[i].name,root.ch[i].value); 241 | } 242 | } 243 | } 244 | else 245 | { 246 | var selecteditems = ""; 247 | 248 | for(i = 0; i < root.ch.length; i++) 249 | { 250 | if(root.ch[i].selected) 251 | { 252 | selecteditems += i; 253 | selecteditems += " "; 254 | } 255 | } 256 | outlet(2,selecteditems); 257 | } 258 | } 259 | getselected.immediate = 1; 260 | 261 | function setselected() 262 | { 263 | for(i=0;i maxitems) len = maxitems; 340 | else len = ary.ch.length; 341 | 342 | for(i=0;i < len;i++) 343 | { 344 | var texty = i*vrowsize + vrowsize - 2; 345 | var textx = 3;//should change when multi level 346 | var j = i + offset; 347 | 348 | if (ary.ch[j].selected) 349 | { 350 | mgraphics.set_source_rgba(sirgb); 351 | y1 = (texty + bgoffset - vrowsize + 2); 352 | mgraphics.rectangle(0, y1, width, vrowsize-1); 353 | mgraphics.fill(); 354 | } 355 | 356 | with (mgraphics) 357 | { 358 | select_font_face(tfont); 359 | set_font_size(textsize); 360 | move_to(textx, texty + woffs); 361 | set_source_rgba(nrgb); 362 | 363 | if(showindex) 364 | { 365 | var ind = j 366 | var t; 367 | 368 | if(ary.ch.length > 100) 369 | { 370 | if(!zerobased) 371 | { 372 | ind += 1; 373 | if(j < 9) t = "00"; 374 | else if(j < 99) t = "0"; 375 | else t = ""; 376 | } 377 | else 378 | { 379 | if(j < 10) t = "00"; 380 | else if(j < 100) t = "0"; 381 | else t = ""; 382 | } 383 | 384 | text_path(t + "" + ind); 385 | fill(); 386 | var offs = text_measure("002")[0] + 2; 387 | move_to(textx+offs, texty + woffs); 388 | } 389 | else 390 | { 391 | if(!zerobased) 392 | { 393 | ind += 1; 394 | if(j < 9) t = "0"; 395 | else t = ""; 396 | } 397 | else 398 | { 399 | if(j < 10) t = "0"; 400 | else t = ""; 401 | } 402 | 403 | text_path(t + "" + ind); 404 | fill(); 405 | var offs = text_measure("02")[0] + 2; 406 | move_to(textx+offs, texty + woffs); 407 | } 408 | } 409 | set_source_rgba(trgb); 410 | text_path(ary.ch[j].name); 411 | fill(); 412 | } 413 | } 414 | } 415 | 416 | // Mouse ---------------------------- 417 | //------------------------------------------- 418 | function onclick(x,y,but,mod1,shift,capslock,option,ctrl) 419 | { 420 | if (x > width-sbwidth) 421 | { 422 | dragging = true; 423 | ondrag(x, y); 424 | } 425 | else if(x < width-sbwidth && y > 0) 426 | { 427 | dragging = false; 428 | var whichclick = Math.floor(((y - 1) / vrowsize) + offset); 429 | 430 | //needs to be updated for multiple levels 431 | if (root.ch.length > 0 && whichclick < root.ch.length) 432 | { 433 | if(mode == 0) 434 | { 435 | if(shift && prevclick > -1) 436 | { 437 | if(prevclick < whichclick) 438 | { 439 | for(i=prevclick;i<=whichclick;i++) 440 | { 441 | root.ch[i].selected = 1; 442 | } 443 | } 444 | else if(whichclick < prevclick) 445 | { 446 | for(i=whichclick;i<=prevclick;i++) 447 | { 448 | root.ch[i].selected = 1; 449 | } 450 | } 451 | } 452 | else root.ch[whichclick].selected = !root.ch[whichclick].selected; 453 | 454 | prevclick = whichclick; 455 | } 456 | else 457 | { 458 | var a = root.ch[whichclick]; 459 | 460 | if(shift) 461 | { 462 | checknone(); 463 | a.selected = 1; 464 | outlet(1, whichclick, a.name,a.value) 465 | } 466 | else 467 | { 468 | var state = a.selected; 469 | checknone(); 470 | if(mode == 1) a.selected = !state; 471 | else a.selected = 1; 472 | 473 | if(a.selected) outlet(0, whichclick, a.name,a.value); 474 | else outlet(0,-1); 475 | } 476 | } 477 | } 478 | notifyclients(); 479 | if(autooutput) getselected(); 480 | } 481 | 482 | mgraphics.redraw(); 483 | } 484 | onclick.local = 1; 485 | 486 | function ondrag(x,y,button,cmd,shift,capslock,option,ctrl) 487 | { 488 | if (dragging) 489 | { 490 | if (y < HYMIN) hpos = HYMIN; 491 | if (y > hymax) hpos = hymax; 492 | else if (y >= HYMIN && y <= hymax) hpos = y; 493 | 494 | if (root.ch.length > maxitems) 495 | { 496 | offset = Math.round(((hpos-2) / hymax) * (root.ch.length - maxitems)); 497 | } 498 | 499 | } 500 | 501 | mgraphics.redraw(); 502 | } 503 | ondrag.local = 1; 504 | 505 | function scroll(v) 506 | { 507 | if(v) 508 | { 509 | if(offest < (root.ch.length - maxitems)) 510 | { 511 | offset += 1; 512 | } 513 | } 514 | else if (offset > 0); 515 | { 516 | offset -= 1; 517 | } 518 | mgraphics.redraw(); 519 | } 520 | 521 | 522 | 523 | // Getters and setters ---------------------------- 524 | //------------------------------------------- 525 | 526 | function settextsize(v) 527 | { 528 | textsize = Math.floor(Math.abs(v)); 529 | vrowsize = textsize + 2; 530 | initdrawing(); 531 | mgraphics.redraw(); 532 | } 533 | 534 | 535 | function setsbwidth(v) 536 | { 537 | sbwidth = v; 538 | mgraphics.redraw(); 539 | } 540 | 541 | function setmode(v) 542 | { 543 | mode = v; 544 | checknone(); 545 | mgraphics.redraw(); 546 | } 547 | 548 | function setshowindex(v) 549 | { 550 | if(v == 0 || v == 1) 551 | { 552 | showindex = v; 553 | mgraphics.redraw(); 554 | } 555 | } 556 | 557 | function setzerobased(v) 558 | { 559 | if(v == 0 || v == 1) 560 | { 561 | zerobased = v; 562 | mgraphics.redraw(); 563 | } 564 | } 565 | 566 | function onresize(w,h) 567 | { 568 | box.size(w, h); 569 | initdrawing(); 570 | mgraphics.redraw(); 571 | } 572 | onresize.local = 1; //private 573 | 574 | -------------------------------------------------------------------------------- /clickedlist/ol.clicklist.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 6, 6 | "minor" : 0, 7 | "revision" : 2 8 | } 9 | , 10 | "rect" : [ 399.0, 44.0, 729.0, 775.0 ], 11 | "bglocked" : 0, 12 | "openinpresentation" : 0, 13 | "default_fontsize" : 12.0, 14 | "default_fontface" : 0, 15 | "default_fontname" : "Arial", 16 | "gridonopen" : 0, 17 | "gridsize" : [ 10.0, 10.0 ], 18 | "gridsnaponopen" : 0, 19 | "statusbarvisible" : 2, 20 | "toolbarvisible" : 1, 21 | "boxanimatetime" : 200, 22 | "imprint" : 0, 23 | "enablehscroll" : 1, 24 | "enablevscroll" : 1, 25 | "devicewidth" : 0.0, 26 | "description" : "", 27 | "digest" : "", 28 | "tags" : "", 29 | "boxes" : [ { 30 | "box" : { 31 | "fontname" : "Arial", 32 | "fontsize" : 12.0, 33 | "id" : "obj-26", 34 | "maxclass" : "message", 35 | "numinlets" : 2, 36 | "numoutlets" : 1, 37 | "outlettype" : [ "" ], 38 | "patching_rect" : [ 23.0, 263.0, 101.0, 18.0 ], 39 | "text" : "brgb $1 $2 $3 $4" 40 | } 41 | 42 | } 43 | , { 44 | "box" : { 45 | "id" : "obj-23", 46 | "maxclass" : "swatch", 47 | "numinlets" : 3, 48 | "numoutlets" : 2, 49 | "outlettype" : [ "", "float" ], 50 | "parameter_enable" : 0, 51 | "patching_rect" : [ 23.0, 216.0, 128.0, 32.0 ] 52 | } 53 | 54 | } 55 | , { 56 | "box" : { 57 | "fontname" : "Arial", 58 | "fontsize" : 12.0, 59 | "id" : "obj-20", 60 | "maxclass" : "newobj", 61 | "numinlets" : 0, 62 | "numoutlets" : 0, 63 | "patcher" : { 64 | "fileversion" : 1, 65 | "appversion" : { 66 | "major" : 6, 67 | "minor" : 0, 68 | "revision" : 2 69 | } 70 | , 71 | "rect" : [ 50.0, 94.0, 758.0, 981.0 ], 72 | "bglocked" : 0, 73 | "openinpresentation" : 0, 74 | "default_fontsize" : 12.0, 75 | "default_fontface" : 0, 76 | "default_fontname" : "Arial", 77 | "gridonopen" : 0, 78 | "gridsize" : [ 10.0, 10.0 ], 79 | "gridsnaponopen" : 0, 80 | "statusbarvisible" : 2, 81 | "toolbarvisible" : 1, 82 | "boxanimatetime" : 200, 83 | "imprint" : 0, 84 | "enablehscroll" : 1, 85 | "enablevscroll" : 1, 86 | "devicewidth" : 0.0, 87 | "description" : "", 88 | "digest" : "", 89 | "tags" : "", 90 | "boxes" : [ { 91 | "box" : { 92 | "fontname" : "Arial", 93 | "fontsize" : 12.0, 94 | "id" : "obj-29", 95 | "maxclass" : "newobj", 96 | "numinlets" : 1, 97 | "numoutlets" : 1, 98 | "outlettype" : [ "" ], 99 | "patching_rect" : [ 430.0, 160.0, 72.0, 20.0 ], 100 | "text" : "loadmess 0" 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "fontname" : "Arial", 107 | "fontsize" : 12.0, 108 | "id" : "obj-27", 109 | "maxclass" : "newobj", 110 | "numinlets" : 1, 111 | "numoutlets" : 0, 112 | "patching_rect" : [ 160.0, 890.0, 34.0, 20.0 ], 113 | "text" : "print" 114 | } 115 | 116 | } 117 | , { 118 | "box" : { 119 | "fontname" : "Arial", 120 | "fontsize" : 12.0, 121 | "id" : "obj-26", 122 | "maxclass" : "newobj", 123 | "numinlets" : 1, 124 | "numoutlets" : 1, 125 | "outlettype" : [ "bang" ], 126 | "patching_rect" : [ 60.0, 290.0, 24.0, 20.0 ], 127 | "text" : "t b" 128 | } 129 | 130 | } 131 | , { 132 | "box" : { 133 | "fontname" : "Arial", 134 | "fontsize" : 12.0, 135 | "id" : "obj-22", 136 | "maxclass" : "newobj", 137 | "numinlets" : 3, 138 | "numoutlets" : 1, 139 | "outlettype" : [ "" ], 140 | "patching_rect" : [ 50.0, 330.0, 121.0, 20.0 ], 141 | "text" : "pack addelement s s" 142 | } 143 | 144 | } 145 | , { 146 | "box" : { 147 | "fontname" : "Arial", 148 | "fontsize" : 12.0, 149 | "id" : "obj-21", 150 | "maxclass" : "message", 151 | "numinlets" : 2, 152 | "numoutlets" : 1, 153 | "outlettype" : [ "" ], 154 | "patching_rect" : [ 520.0, 380.0, 37.0, 18.0 ], 155 | "text" : "clear" 156 | } 157 | 158 | } 159 | , { 160 | "box" : { 161 | "fontname" : "Arial", 162 | "fontsize" : 12.0, 163 | "id" : "obj-16", 164 | "maxclass" : "newobj", 165 | "numinlets" : 1, 166 | "numoutlets" : 1, 167 | "outlettype" : [ "" ], 168 | "patching_rect" : [ 520.0, 180.0, 72.0, 20.0 ], 169 | "text" : "loadmess 1" 170 | } 171 | 172 | } 173 | , { 174 | "box" : { 175 | "fontname" : "Arial", 176 | "fontsize" : 12.0, 177 | "id" : "obj-17", 178 | "items" : [ "Multiple", ",", "Single1", ",", "Single2" ], 179 | "maxclass" : "umenu", 180 | "numinlets" : 1, 181 | "numoutlets" : 3, 182 | "outlettype" : [ "int", "", "" ], 183 | "parameter_enable" : 0, 184 | "patching_rect" : [ 520.0, 210.0, 100.0, 20.0 ] 185 | } 186 | 187 | } 188 | , { 189 | "box" : { 190 | "fontname" : "Arial", 191 | "fontsize" : 12.0, 192 | "id" : "obj-14", 193 | "maxclass" : "message", 194 | "numinlets" : 2, 195 | "numoutlets" : 1, 196 | "outlettype" : [ "" ], 197 | "patching_rect" : [ 520.0, 240.0, 58.0, 18.0 ], 198 | "text" : "mode $1" 199 | } 200 | 201 | } 202 | , { 203 | "box" : { 204 | "id" : "obj-13", 205 | "maxclass" : "toggle", 206 | "numinlets" : 1, 207 | "numoutlets" : 1, 208 | "outlettype" : [ "int" ], 209 | "parameter_enable" : 0, 210 | "patching_rect" : [ 430.0, 200.0, 20.0, 20.0 ] 211 | } 212 | 213 | } 214 | , { 215 | "box" : { 216 | "fontname" : "Arial", 217 | "fontsize" : 12.0, 218 | "id" : "obj-10", 219 | "maxclass" : "message", 220 | "numinlets" : 2, 221 | "numoutlets" : 1, 222 | "outlettype" : [ "" ], 223 | "patching_rect" : [ 430.0, 240.0, 77.0, 18.0 ], 224 | "text" : "autodraw $1" 225 | } 226 | 227 | } 228 | , { 229 | "box" : { 230 | "fontname" : "Arial", 231 | "fontsize" : 12.0, 232 | "id" : "obj-1", 233 | "maxclass" : "newobj", 234 | "numinlets" : 1, 235 | "numoutlets" : 1, 236 | "outlettype" : [ "bang" ], 237 | "patching_rect" : [ 150.0, 100.0, 60.0, 20.0 ], 238 | "text" : "loadbang" 239 | } 240 | 241 | } 242 | , { 243 | "box" : { 244 | "fontname" : "Arial", 245 | "fontsize" : 12.0, 246 | "id" : "obj-5", 247 | "maxclass" : "flonum", 248 | "numinlets" : 1, 249 | "numoutlets" : 2, 250 | "outlettype" : [ "float", "bang" ], 251 | "parameter_enable" : 0, 252 | "patching_rect" : [ 540.0, 300.0, 54.0, 20.0 ] 253 | } 254 | 255 | } 256 | , { 257 | "box" : { 258 | "fontname" : "Arial", 259 | "fontsize" : 12.0, 260 | "id" : "obj-3", 261 | "maxclass" : "message", 262 | "numinlets" : 2, 263 | "numoutlets" : 1, 264 | "outlettype" : [ "" ], 265 | "patching_rect" : [ 540.0, 330.0, 69.0, 18.0 ], 266 | "text" : "textsize $1" 267 | } 268 | 269 | } 270 | , { 271 | "box" : { 272 | "id" : "obj-31", 273 | "maxclass" : "button", 274 | "numinlets" : 1, 275 | "numoutlets" : 1, 276 | "outlettype" : [ "bang" ], 277 | "patching_rect" : [ 70.0, 70.0, 20.0, 20.0 ] 278 | } 279 | 280 | } 281 | , { 282 | "box" : { 283 | "fontname" : "Arial", 284 | "fontsize" : 12.0, 285 | "id" : "obj-28", 286 | "maxclass" : "newobj", 287 | "numinlets" : 1, 288 | "numoutlets" : 2, 289 | "outlettype" : [ "draw", "bang" ], 290 | "patching_rect" : [ 70.0, 120.0, 54.0, 20.0 ], 291 | "text" : "t draw b" 292 | } 293 | 294 | } 295 | , { 296 | "box" : { 297 | "fontname" : "Arial", 298 | "fontsize" : 12.0, 299 | "id" : "obj-24", 300 | "maxclass" : "newobj", 301 | "numinlets" : 1, 302 | "numoutlets" : 1, 303 | "outlettype" : [ "" ], 304 | "patching_rect" : [ 110.0, 290.0, 257.0, 20.0 ], 305 | "text" : "sprintf symout /Library/Audio/Plug-Ins/VST/%s" 306 | } 307 | 308 | } 309 | , { 310 | "box" : { 311 | "fontname" : "Arial", 312 | "fontsize" : 12.0, 313 | "id" : "obj-23", 314 | "maxclass" : "newobj", 315 | "numinlets" : 2, 316 | "numoutlets" : 2, 317 | "outlettype" : [ "", "" ], 318 | "patching_rect" : [ 70.0, 240.0, 82.0, 20.0 ], 319 | "text" : "route append" 320 | } 321 | 322 | } 323 | , { 324 | "box" : { 325 | "fontname" : "Arial", 326 | "fontsize" : 12.0, 327 | "id" : "obj-19", 328 | "maxclass" : "message", 329 | "numinlets" : 2, 330 | "numoutlets" : 1, 331 | "outlettype" : [ "" ], 332 | "patching_rect" : [ 150.0, 130.0, 70.0, 18.0 ], 333 | "text" : "types aPcs" 334 | } 335 | 336 | } 337 | , { 338 | "box" : { 339 | "fontname" : "Arial", 340 | "fontsize" : 12.0, 341 | "id" : "obj-12", 342 | "maxclass" : "newobj", 343 | "numinlets" : 1, 344 | "numoutlets" : 2, 345 | "outlettype" : [ "", "int" ], 346 | "patching_rect" : [ 110.0, 170.0, 195.0, 20.0 ], 347 | "text" : "folder /Library/Audio/Plug-Ins/VST/" 348 | } 349 | 350 | } 351 | , { 352 | "box" : { 353 | "border" : 0, 354 | "embedstate" : [ [ "nrgb", 1, 0, 0, 1 ], [ "sirgb", 0.7, 0.7, 0.7, 1 ], [ "showindex", 1 ], [ "autooutput", 0 ], [ "lrgb", 0.75, 0.75, 0.75, 1 ], [ "textsize", 17 ], [ "trgb", 0, 0, 0, 1 ], [ "mode", 1 ], [ "sbwidth", 10 ], [ "zerobased", 1 ], [ "brgb", 0.8, 0.8, 0.8, 1 ], [ "srgb", 0, 0, 0, 1 ], [ "tfont", "Arial" ], [ "bdrgb", 0.647059, 0.647059, 0.647059, 1 ], [ "sbrgb", 0.709804, 0.709804, 0.709804, 1 ], [ "collcompat", 0 ], [ "autodraw", 0 ] ], 355 | "filename" : "ol.clickedlist.js", 356 | "frozen_box_attributes" : [ "jsarguments" ], 357 | "id" : "obj-25", 358 | "jsarguments" : [ "#1" ], 359 | "maxclass" : "jsui", 360 | "numinlets" : 1, 361 | "numoutlets" : 3, 362 | "outlettype" : [ "", "", "" ], 363 | "parameter_enable" : 0, 364 | "patching_rect" : [ 160.0, 420.0, 251.0, 454.0 ], 365 | "presentation" : 1, 366 | "presentation_rect" : [ 75.0, 96.0, 251.0, 454.0 ] 367 | } 368 | 369 | } 370 | ], 371 | "lines" : [ { 372 | "patchline" : { 373 | "destination" : [ "obj-19", 0 ], 374 | "disabled" : 0, 375 | "hidden" : 0, 376 | "source" : [ "obj-1", 0 ] 377 | } 378 | 379 | } 380 | , { 381 | "patchline" : { 382 | "destination" : [ "obj-25", 0 ], 383 | "disabled" : 0, 384 | "hidden" : 0, 385 | "source" : [ "obj-10", 0 ] 386 | } 387 | 388 | } 389 | , { 390 | "patchline" : { 391 | "destination" : [ "obj-23", 0 ], 392 | "disabled" : 0, 393 | "hidden" : 0, 394 | "source" : [ "obj-12", 0 ] 395 | } 396 | 397 | } 398 | , { 399 | "patchline" : { 400 | "destination" : [ "obj-10", 0 ], 401 | "disabled" : 0, 402 | "hidden" : 0, 403 | "source" : [ "obj-13", 0 ] 404 | } 405 | 406 | } 407 | , { 408 | "patchline" : { 409 | "destination" : [ "obj-25", 0 ], 410 | "disabled" : 0, 411 | "hidden" : 0, 412 | "source" : [ "obj-14", 0 ] 413 | } 414 | 415 | } 416 | , { 417 | "patchline" : { 418 | "destination" : [ "obj-17", 0 ], 419 | "disabled" : 0, 420 | "hidden" : 0, 421 | "source" : [ "obj-16", 0 ] 422 | } 423 | 424 | } 425 | , { 426 | "patchline" : { 427 | "destination" : [ "obj-14", 0 ], 428 | "disabled" : 0, 429 | "hidden" : 0, 430 | "source" : [ "obj-17", 0 ] 431 | } 432 | 433 | } 434 | , { 435 | "patchline" : { 436 | "destination" : [ "obj-12", 0 ], 437 | "disabled" : 0, 438 | "hidden" : 0, 439 | "source" : [ "obj-19", 0 ] 440 | } 441 | 442 | } 443 | , { 444 | "patchline" : { 445 | "destination" : [ "obj-25", 0 ], 446 | "disabled" : 0, 447 | "hidden" : 0, 448 | "source" : [ "obj-21", 0 ] 449 | } 450 | 451 | } 452 | , { 453 | "patchline" : { 454 | "destination" : [ "obj-25", 0 ], 455 | "disabled" : 0, 456 | "hidden" : 0, 457 | "source" : [ "obj-22", 0 ] 458 | } 459 | 460 | } 461 | , { 462 | "patchline" : { 463 | "destination" : [ "obj-22", 1 ], 464 | "disabled" : 0, 465 | "hidden" : 0, 466 | "source" : [ "obj-23", 0 ] 467 | } 468 | 469 | } 470 | , { 471 | "patchline" : { 472 | "destination" : [ "obj-24", 0 ], 473 | "disabled" : 0, 474 | "hidden" : 0, 475 | "source" : [ "obj-23", 0 ] 476 | } 477 | 478 | } 479 | , { 480 | "patchline" : { 481 | "destination" : [ "obj-25", 0 ], 482 | "disabled" : 0, 483 | "hidden" : 0, 484 | "source" : [ "obj-23", 1 ] 485 | } 486 | 487 | } 488 | , { 489 | "patchline" : { 490 | "destination" : [ "obj-26", 0 ], 491 | "disabled" : 0, 492 | "hidden" : 0, 493 | "source" : [ "obj-23", 0 ] 494 | } 495 | 496 | } 497 | , { 498 | "patchline" : { 499 | "destination" : [ "obj-22", 2 ], 500 | "disabled" : 0, 501 | "hidden" : 0, 502 | "source" : [ "obj-24", 0 ] 503 | } 504 | 505 | } 506 | , { 507 | "patchline" : { 508 | "destination" : [ "obj-27", 0 ], 509 | "disabled" : 0, 510 | "hidden" : 0, 511 | "source" : [ "obj-25", 0 ] 512 | } 513 | 514 | } 515 | , { 516 | "patchline" : { 517 | "destination" : [ "obj-22", 0 ], 518 | "disabled" : 0, 519 | "hidden" : 0, 520 | "source" : [ "obj-26", 0 ] 521 | } 522 | 523 | } 524 | , { 525 | "patchline" : { 526 | "destination" : [ "obj-12", 0 ], 527 | "disabled" : 0, 528 | "hidden" : 0, 529 | "source" : [ "obj-28", 1 ] 530 | } 531 | 532 | } 533 | , { 534 | "patchline" : { 535 | "destination" : [ "obj-25", 0 ], 536 | "disabled" : 0, 537 | "hidden" : 0, 538 | "source" : [ "obj-28", 0 ] 539 | } 540 | 541 | } 542 | , { 543 | "patchline" : { 544 | "destination" : [ "obj-13", 0 ], 545 | "disabled" : 0, 546 | "hidden" : 0, 547 | "source" : [ "obj-29", 0 ] 548 | } 549 | 550 | } 551 | , { 552 | "patchline" : { 553 | "destination" : [ "obj-25", 0 ], 554 | "disabled" : 0, 555 | "hidden" : 0, 556 | "source" : [ "obj-3", 0 ] 557 | } 558 | 559 | } 560 | , { 561 | "patchline" : { 562 | "destination" : [ "obj-28", 0 ], 563 | "disabled" : 0, 564 | "hidden" : 0, 565 | "source" : [ "obj-31", 0 ] 566 | } 567 | 568 | } 569 | , { 570 | "patchline" : { 571 | "destination" : [ "obj-3", 0 ], 572 | "disabled" : 0, 573 | "hidden" : 0, 574 | "source" : [ "obj-5", 0 ] 575 | } 576 | 577 | } 578 | ], 579 | "dependency_cache" : [ { 580 | "name" : "ol.clickedlist.js", 581 | "bootpath" : "/Users/oli/Dev/MyMaxStuff/MyControlsLibrary/clickedlist", 582 | "type" : "TEXT", 583 | "implicit" : 1 584 | } 585 | ] 586 | } 587 | , 588 | "patching_rect" : [ 535.0, 515.0, 66.0, 20.0 ], 589 | "saved_object_attributes" : { 590 | "description" : "", 591 | "fontface" : 0, 592 | "fontsize" : 12.0, 593 | "globalpatchername" : "", 594 | "default_fontface" : 0, 595 | "tags" : "", 596 | "digest" : "", 597 | "default_fontname" : "Arial", 598 | "fontname" : "Arial", 599 | "default_fontsize" : 12.0 600 | } 601 | , 602 | "text" : "p example" 603 | } 604 | 605 | } 606 | , { 607 | "box" : { 608 | "fontface" : 3, 609 | "fontname" : "Arial", 610 | "fontsize" : 20.871338, 611 | "id" : "obj-110", 612 | "maxclass" : "comment", 613 | "numinlets" : 1, 614 | "numoutlets" : 0, 615 | "patching_rect" : [ 9.0, 7.0, 705.0, 30.0 ], 616 | "text" : "ol.clickedlist.js", 617 | "varname" : "autohelp_top_title" 618 | } 619 | 620 | } 621 | , { 622 | "box" : { 623 | "fontname" : "Arial", 624 | "fontsize" : 12.754705, 625 | "id" : "obj-111", 626 | "maxclass" : "comment", 627 | "numinlets" : 1, 628 | "numoutlets" : 0, 629 | "patching_rect" : [ 9.0, 39.0, 705.0, 21.0 ], 630 | "text" : "scrollable, clickable list JSUI", 631 | "varname" : "autohelp_top_digest" 632 | } 633 | 634 | } 635 | , { 636 | "box" : { 637 | "id" : "obj-21", 638 | "maxclass" : "button", 639 | "numinlets" : 1, 640 | "numoutlets" : 1, 641 | "outlettype" : [ "bang" ], 642 | "patching_rect" : [ 185.0, 145.0, 20.0, 20.0 ] 643 | } 644 | 645 | } 646 | , { 647 | "box" : { 648 | "fontname" : "Arial", 649 | "fontsize" : 12.0, 650 | "id" : "obj-18", 651 | "maxclass" : "newobj", 652 | "numinlets" : 2, 653 | "numoutlets" : 3, 654 | "outlettype" : [ "bang", "bang", "int" ], 655 | "patching_rect" : [ 185.0, 185.0, 59.0, 20.0 ], 656 | "text" : "uzi 100" 657 | } 658 | 659 | } 660 | , { 661 | "box" : { 662 | "fontname" : "Arial", 663 | "fontsize" : 12.0, 664 | "id" : "obj-34", 665 | "maxclass" : "message", 666 | "numinlets" : 2, 667 | "numoutlets" : 1, 668 | "outlettype" : [ "" ], 669 | "patching_rect" : [ 255.0, 255.0, 37.0, 18.0 ], 670 | "text" : "clear" 671 | } 672 | 673 | } 674 | , { 675 | "box" : { 676 | "fontname" : "Arial", 677 | "fontsize" : 12.0, 678 | "id" : "obj-17", 679 | "items" : [ "Multiple", ",", "Single1", ",", "Single2" ], 680 | "maxclass" : "umenu", 681 | "numinlets" : 1, 682 | "numoutlets" : 3, 683 | "outlettype" : [ "int", "", "" ], 684 | "parameter_enable" : 0, 685 | "patching_rect" : [ 348.0, 332.0, 100.0, 20.0 ] 686 | } 687 | 688 | } 689 | , { 690 | "box" : { 691 | "fontname" : "Arial", 692 | "fontsize" : 12.0, 693 | "id" : "obj-16", 694 | "maxclass" : "newobj", 695 | "numinlets" : 1, 696 | "numoutlets" : 0, 697 | "patching_rect" : [ 247.0, 714.0, 45.0, 20.0 ], 698 | "text" : "print 3" 699 | } 700 | 701 | } 702 | , { 703 | "box" : { 704 | "fontname" : "Arial", 705 | "fontsize" : 12.0, 706 | "id" : "obj-1", 707 | "maxclass" : "newobj", 708 | "numinlets" : 1, 709 | "numoutlets" : 0, 710 | "patching_rect" : [ 135.0, 695.0, 45.0, 20.0 ], 711 | "text" : "print 1" 712 | } 713 | 714 | } 715 | , { 716 | "box" : { 717 | "id" : "obj-11", 718 | "maxclass" : "toggle", 719 | "numinlets" : 1, 720 | "numoutlets" : 1, 721 | "outlettype" : [ "int" ], 722 | "parameter_enable" : 0, 723 | "patching_rect" : [ 325.0, 534.0, 20.0, 20.0 ] 724 | } 725 | 726 | } 727 | , { 728 | "box" : { 729 | "fontname" : "Arial", 730 | "fontsize" : 12.0, 731 | "id" : "obj-14", 732 | "maxclass" : "message", 733 | "numinlets" : 2, 734 | "numoutlets" : 1, 735 | "outlettype" : [ "" ], 736 | "patching_rect" : [ 325.0, 564.0, 85.0, 18.0 ], 737 | "text" : "showindex $1" 738 | } 739 | 740 | } 741 | , { 742 | "box" : { 743 | "id" : "obj-4", 744 | "maxclass" : "toggle", 745 | "numinlets" : 1, 746 | "numoutlets" : 1, 747 | "outlettype" : [ "int" ], 748 | "parameter_enable" : 0, 749 | "patching_rect" : [ 325.0, 465.0, 20.0, 20.0 ] 750 | } 751 | 752 | } 753 | , { 754 | "box" : { 755 | "fontname" : "Arial", 756 | "fontsize" : 12.0, 757 | "id" : "obj-15", 758 | "maxclass" : "message", 759 | "numinlets" : 2, 760 | "numoutlets" : 1, 761 | "outlettype" : [ "" ], 762 | "patching_rect" : [ 475.0, 265.0, 73.0, 18.0 ], 763 | "text" : "getselected" 764 | } 765 | 766 | } 767 | , { 768 | "box" : { 769 | "fontname" : "Arial", 770 | "fontsize" : 12.0, 771 | "id" : "obj-13", 772 | "maxclass" : "newobj", 773 | "numinlets" : 1, 774 | "numoutlets" : 0, 775 | "patching_rect" : [ 194.0, 697.0, 45.0, 20.0 ], 776 | "text" : "print 2" 777 | } 778 | 779 | } 780 | , { 781 | "box" : { 782 | "fontname" : "Arial", 783 | "fontsize" : 12.0, 784 | "id" : "obj-9", 785 | "maxclass" : "flonum", 786 | "numinlets" : 1, 787 | "numoutlets" : 2, 788 | "outlettype" : [ "float", "bang" ], 789 | "parameter_enable" : 0, 790 | "patching_rect" : [ 358.0, 268.0, 54.0, 20.0 ] 791 | } 792 | 793 | } 794 | , { 795 | "box" : { 796 | "fontname" : "Arial", 797 | "fontsize" : 12.0, 798 | "id" : "obj-8", 799 | "maxclass" : "message", 800 | "numinlets" : 2, 801 | "numoutlets" : 1, 802 | "outlettype" : [ "" ], 803 | "patching_rect" : [ 185.0, 216.0, 142.0, 18.0 ], 804 | "text" : "addelement Name value" 805 | } 806 | 807 | } 808 | , { 809 | "box" : { 810 | "fontname" : "Arial", 811 | "fontsize" : 12.0, 812 | "id" : "obj-5", 813 | "maxclass" : "flonum", 814 | "numinlets" : 1, 815 | "numoutlets" : 2, 816 | "outlettype" : [ "float", "bang" ], 817 | "parameter_enable" : 0, 818 | "patching_rect" : [ 421.0, 367.0, 54.0, 20.0 ] 819 | } 820 | 821 | } 822 | , { 823 | "box" : { 824 | "fontname" : "Arial", 825 | "fontsize" : 12.0, 826 | "id" : "obj-3", 827 | "maxclass" : "message", 828 | "numinlets" : 2, 829 | "numoutlets" : 1, 830 | "outlettype" : [ "" ], 831 | "patching_rect" : [ 436.0, 412.0, 69.0, 18.0 ], 832 | "text" : "textsize $1" 833 | } 834 | 835 | } 836 | , { 837 | "box" : { 838 | "border" : 0, 839 | "embedstate" : [ [ "nrgb", 1, 0, 0, 1 ], [ "sirgb", 0.7, 0.7, 0.7, 1 ], [ "showindex", 1 ], [ "autooutput", 0 ], [ "lrgb", 0.75, 0.75, 0.75, 1 ], [ "textsize", 9 ], [ "trgb", 0, 0, 0, 1 ], [ "mode", 0 ], [ "sbwidth", 10 ], [ "zerobased", 1 ], [ "brgb", 0.8, 0.8, 0.8, 1 ], [ "srgb", 0, 0, 0, 1 ], [ "tfont", "Arial" ], [ "bdrgb", 0.647059, 0.647059, 0.647059, 1 ], [ "sbrgb", 0.709804, 0.709804, 0.709804, 1 ], [ "collcompat", 0 ], [ "autodraw", 1 ] ], 840 | "filename" : "ol.clickedlist.js", 841 | "frozen_box_attributes" : [ "jsarguments" ], 842 | "id" : "obj-25", 843 | "jsarguments" : [ "#1" ], 844 | "maxclass" : "jsui", 845 | "numinlets" : 1, 846 | "numoutlets" : 3, 847 | "outlettype" : [ "", "", "" ], 848 | "parameter_enable" : 0, 849 | "patching_rect" : [ 135.0, 361.0, 117.0, 285.0 ], 850 | "presentation" : 1, 851 | "presentation_rect" : [ 75.0, 96.0, 117.0, 285.0 ] 852 | } 853 | 854 | } 855 | , { 856 | "box" : { 857 | "fontname" : "Arial", 858 | "fontsize" : 12.0, 859 | "id" : "obj-6", 860 | "maxclass" : "message", 861 | "numinlets" : 2, 862 | "numoutlets" : 1, 863 | "outlettype" : [ "" ], 864 | "patching_rect" : [ 366.0, 223.0, 53.0, 18.0 ], 865 | "text" : "compile" 866 | } 867 | 868 | } 869 | , { 870 | "box" : { 871 | "fontname" : "Arial", 872 | "fontsize" : 12.0, 873 | "id" : "obj-7", 874 | "maxclass" : "message", 875 | "numinlets" : 2, 876 | "numoutlets" : 1, 877 | "outlettype" : [ "" ], 878 | "patching_rect" : [ 358.0, 298.0, 69.0, 18.0 ], 879 | "text" : "sbwidth $1" 880 | } 881 | 882 | } 883 | , { 884 | "box" : { 885 | "fontname" : "Arial", 886 | "fontsize" : 12.0, 887 | "id" : "obj-10", 888 | "maxclass" : "message", 889 | "numinlets" : 2, 890 | "numoutlets" : 1, 891 | "outlettype" : [ "" ], 892 | "patching_rect" : [ 339.0, 361.0, 58.0, 18.0 ], 893 | "text" : "mode $1" 894 | } 895 | 896 | } 897 | , { 898 | "box" : { 899 | "fontname" : "Arial", 900 | "fontsize" : 12.0, 901 | "id" : "obj-2", 902 | "maxclass" : "message", 903 | "numinlets" : 2, 904 | "numoutlets" : 1, 905 | "outlettype" : [ "" ], 906 | "patching_rect" : [ 325.0, 495.0, 84.0, 18.0 ], 907 | "text" : "zerobased $1" 908 | } 909 | 910 | } 911 | , { 912 | "box" : { 913 | "background" : 1, 914 | "bgcolor" : [ 1.0, 0.701961, 0.0, 1.0 ], 915 | "grad1" : [ 0.86, 0.86, 0.75, 1.0 ], 916 | "grad2" : [ 0.78, 0.84, 0.86, 0.7 ], 917 | "id" : "obj-114", 918 | "ignoreclick" : 1, 919 | "maxclass" : "panel", 920 | "numinlets" : 1, 921 | "numoutlets" : 0, 922 | "patching_rect" : [ 4.0, 4.0, 709.0, 60.0 ], 923 | "varname" : "autohelp_top_panel" 924 | } 925 | 926 | } 927 | ], 928 | "lines" : [ { 929 | "patchline" : { 930 | "destination" : [ "obj-25", 0 ], 931 | "disabled" : 0, 932 | "hidden" : 0, 933 | "source" : [ "obj-10", 0 ] 934 | } 935 | 936 | } 937 | , { 938 | "patchline" : { 939 | "destination" : [ "obj-14", 0 ], 940 | "disabled" : 0, 941 | "hidden" : 0, 942 | "source" : [ "obj-11", 0 ] 943 | } 944 | 945 | } 946 | , { 947 | "patchline" : { 948 | "destination" : [ "obj-25", 0 ], 949 | "disabled" : 0, 950 | "hidden" : 0, 951 | "source" : [ "obj-14", 0 ] 952 | } 953 | 954 | } 955 | , { 956 | "patchline" : { 957 | "destination" : [ "obj-25", 0 ], 958 | "disabled" : 0, 959 | "hidden" : 0, 960 | "source" : [ "obj-15", 0 ] 961 | } 962 | 963 | } 964 | , { 965 | "patchline" : { 966 | "destination" : [ "obj-10", 0 ], 967 | "disabled" : 0, 968 | "hidden" : 0, 969 | "source" : [ "obj-17", 0 ] 970 | } 971 | 972 | } 973 | , { 974 | "patchline" : { 975 | "destination" : [ "obj-8", 0 ], 976 | "disabled" : 0, 977 | "hidden" : 0, 978 | "source" : [ "obj-18", 0 ] 979 | } 980 | 981 | } 982 | , { 983 | "patchline" : { 984 | "destination" : [ "obj-25", 0 ], 985 | "disabled" : 0, 986 | "hidden" : 0, 987 | "source" : [ "obj-2", 0 ] 988 | } 989 | 990 | } 991 | , { 992 | "patchline" : { 993 | "destination" : [ "obj-18", 0 ], 994 | "disabled" : 0, 995 | "hidden" : 0, 996 | "source" : [ "obj-21", 0 ] 997 | } 998 | 999 | } 1000 | , { 1001 | "patchline" : { 1002 | "destination" : [ "obj-26", 0 ], 1003 | "disabled" : 0, 1004 | "hidden" : 0, 1005 | "source" : [ "obj-23", 0 ] 1006 | } 1007 | 1008 | } 1009 | , { 1010 | "patchline" : { 1011 | "destination" : [ "obj-1", 0 ], 1012 | "disabled" : 0, 1013 | "hidden" : 0, 1014 | "source" : [ "obj-25", 0 ] 1015 | } 1016 | 1017 | } 1018 | , { 1019 | "patchline" : { 1020 | "destination" : [ "obj-13", 0 ], 1021 | "disabled" : 0, 1022 | "hidden" : 0, 1023 | "source" : [ "obj-25", 1 ] 1024 | } 1025 | 1026 | } 1027 | , { 1028 | "patchline" : { 1029 | "destination" : [ "obj-16", 0 ], 1030 | "disabled" : 0, 1031 | "hidden" : 0, 1032 | "source" : [ "obj-25", 2 ] 1033 | } 1034 | 1035 | } 1036 | , { 1037 | "patchline" : { 1038 | "destination" : [ "obj-25", 0 ], 1039 | "disabled" : 0, 1040 | "hidden" : 0, 1041 | "source" : [ "obj-26", 0 ] 1042 | } 1043 | 1044 | } 1045 | , { 1046 | "patchline" : { 1047 | "destination" : [ "obj-25", 0 ], 1048 | "disabled" : 0, 1049 | "hidden" : 0, 1050 | "source" : [ "obj-3", 0 ] 1051 | } 1052 | 1053 | } 1054 | , { 1055 | "patchline" : { 1056 | "destination" : [ "obj-25", 0 ], 1057 | "disabled" : 0, 1058 | "hidden" : 0, 1059 | "source" : [ "obj-34", 0 ] 1060 | } 1061 | 1062 | } 1063 | , { 1064 | "patchline" : { 1065 | "destination" : [ "obj-2", 0 ], 1066 | "disabled" : 0, 1067 | "hidden" : 0, 1068 | "source" : [ "obj-4", 0 ] 1069 | } 1070 | 1071 | } 1072 | , { 1073 | "patchline" : { 1074 | "destination" : [ "obj-3", 0 ], 1075 | "disabled" : 0, 1076 | "hidden" : 0, 1077 | "source" : [ "obj-5", 0 ] 1078 | } 1079 | 1080 | } 1081 | , { 1082 | "patchline" : { 1083 | "destination" : [ "obj-25", 0 ], 1084 | "disabled" : 0, 1085 | "hidden" : 0, 1086 | "source" : [ "obj-6", 0 ] 1087 | } 1088 | 1089 | } 1090 | , { 1091 | "patchline" : { 1092 | "destination" : [ "obj-25", 0 ], 1093 | "disabled" : 0, 1094 | "hidden" : 0, 1095 | "source" : [ "obj-7", 0 ] 1096 | } 1097 | 1098 | } 1099 | , { 1100 | "patchline" : { 1101 | "destination" : [ "obj-25", 0 ], 1102 | "disabled" : 0, 1103 | "hidden" : 0, 1104 | "source" : [ "obj-8", 0 ] 1105 | } 1106 | 1107 | } 1108 | , { 1109 | "patchline" : { 1110 | "destination" : [ "obj-7", 0 ], 1111 | "disabled" : 0, 1112 | "hidden" : 0, 1113 | "source" : [ "obj-9", 0 ] 1114 | } 1115 | 1116 | } 1117 | ], 1118 | "dependency_cache" : [ { 1119 | "name" : "ol.clickedlist.js", 1120 | "bootpath" : "/Users/oli/Dev/MyMaxStuff/MyControlsLibrary/clickedlist", 1121 | "patcherrelativepath" : "", 1122 | "type" : "TEXT", 1123 | "implicit" : 1 1124 | } 1125 | ] 1126 | } 1127 | 1128 | } 1129 | -------------------------------------------------------------------------------- /datadisplay/ol.datadisplay.js: -------------------------------------------------------------------------------- 1 | inlets = 2; 2 | outlets = 1; 3 | 4 | autowatch = 1; 5 | 6 | mgraphics.init(); 7 | mgraphics.relative_coords = 0; 8 | mgraphics.autofill = 0; 9 | 10 | mgraphics.redraw(); 11 | 12 | var gate = 0; 13 | 14 | var frgb = [1, 0., 0., 1.]; 15 | declareattribute("frgb", null, null, 1); 16 | 17 | var grgb = [0., 0., 0., 0.2]; 18 | declareattribute("grgb", null, null, 1); 19 | 20 | var linewidth = 1; 21 | declareattribute("linewidth", null, null, 1); 22 | 23 | var orientation = 0; // 0 = left to right / 1 = right to left / 2 = top to bottom / 3 = bottom to top 24 | declareattribute("orientation", null, null, 1); 25 | 26 | var stepcount = jsarguments[1]; 27 | //declareattribute("stepcount", null, null, 1); 28 | 29 | var lowrange = 0.; 30 | declareattribute("lowrange", null, null, 1); 31 | 32 | var highrange = 1.; 33 | declareattribute("highrange", null, null, 1); 34 | 35 | var n_horiz_segments = 0; 36 | declareattribute("n_horiz_segments", null, null, 1); 37 | 38 | var n_vert_segments = 0; 39 | declareattribute("n_vert_segments", null, null, 1); 40 | 41 | var gated = 0; 42 | declareattribute("gated", null, null, 1); 43 | 44 | var data = new Array(stepcount); 45 | var gatearray = new Array(stepcount); 46 | 47 | for(i = 0; i< stepcount;i++) 48 | { 49 | data[i] = 0.; 50 | gatearray[i] = 0; 51 | } 52 | 53 | function linearMap(input, inputMin, inputMax, outputMin, outputMax) 54 | { 55 | var inputSpan = inputMax - inputMin; 56 | var outputSpan = outputMax - outputMin; 57 | 58 | var inputScaled = input - (inputMin / inputSpan); 59 | 60 | return outputMin + (inputScaled * outputSpan); 61 | } 62 | 63 | function msg_float(v) 64 | { 65 | data.unshift((v - lowrange) /(highrange - lowrange)); 66 | data.pop(); 67 | 68 | if(gated) 69 | { 70 | gatearray.unshift(gate); 71 | gatearray.pop(); 72 | } 73 | 74 | mgraphics.redraw(); 75 | } 76 | 77 | function msg_int(v) 78 | { 79 | if(inlet == 1) 80 | { 81 | if(v) gate = 1; 82 | else gate = 0; 83 | } 84 | } 85 | 86 | function draw_grid() 87 | { 88 | var width = this.box.rect[2] - this.box.rect[0]; 89 | var height = this.box.rect[3] - this.box.rect[1]; 90 | 91 | with (mgraphics) 92 | { 93 | set_line_width(1); 94 | set_source_rgba(grgb); 95 | 96 | if(n_horiz_segments) 97 | { 98 | var xstep = width / n_horiz_segments; 99 | 100 | for(i = 1; i < n_horiz_segments; i++) 101 | { 102 | move_to(i * xstep, 0); 103 | line_to(i * xstep, height); 104 | } 105 | 106 | stroke(); 107 | } 108 | 109 | if(n_vert_segments) 110 | { 111 | var ystep = height / n_vert_segments; 112 | 113 | for(i = 1; i < n_vert_segments; i++) 114 | { 115 | move_to(0, i * ystep); 116 | line_to(width, i * ystep); 117 | } 118 | 119 | stroke(); 120 | } 121 | } 122 | } 123 | 124 | function paint() 125 | { 126 | var width = this.box.rect[2] - this.box.rect[0]; 127 | var height = this.box.rect[3] - this.box.rect[1]; 128 | 129 | draw_grid(); 130 | 131 | with (mgraphics) 132 | { 133 | set_line_width(linewidth); 134 | set_source_rgba(frgb); 135 | 136 | if(orientation == 0) // left to right 137 | { 138 | var xstep = width / (stepcount-1); 139 | var x = 0; 140 | var y = height - (height * data[0]); 141 | 142 | for(i = 1; i < stepcount; i++) 143 | { 144 | var newx = i * xstep; 145 | var newy = height - (height * data[i]); 146 | 147 | if(gated) 148 | { 149 | set_source_rgba(frgb[0], frgb[1], frgb[2], frgb[3] * gatearray[i] ); 150 | } 151 | 152 | move_to(x, y); 153 | line_to(newx, newy); 154 | stroke(); 155 | 156 | x = newx; 157 | y = newy; 158 | } 159 | } 160 | else if (orientation == 1) // right to left 161 | { 162 | var xstep = width / (stepcount-1); 163 | var x = width; 164 | var y = height - (height * data[0]); 165 | 166 | for(i = 1; i < stepcount; i++) 167 | { 168 | var newx = width - (i * xstep); 169 | var newy = height - (height * data[i]); 170 | 171 | if(gated) 172 | { 173 | set_source_rgba(frgb[0], frgb[1], frgb[2], frgb[3] * gatearray[i] ); 174 | } 175 | 176 | move_to(x, y); 177 | line_to(newx, newy); 178 | stroke(); 179 | 180 | x = newx; 181 | y = newy; 182 | } 183 | } 184 | else if (orientation == 2) // top to bottom 185 | { 186 | var ystep = height / (stepcount-1); 187 | var x = width * data[0]; 188 | var y = 0; 189 | 190 | for(i = 1; i < stepcount; i++) 191 | { 192 | var newx = width * data[i]; 193 | var newy = i * ystep; 194 | 195 | if(gated) 196 | { 197 | set_source_rgba(frgb[0], frgb[1], frgb[2], frgb[3] * gatearray[i] ); 198 | } 199 | 200 | move_to(x, y); 201 | line_to(newx, newy); 202 | stroke(); 203 | 204 | x = newx; 205 | y = newy; 206 | } 207 | } 208 | else if (orientation == 3) // bottom to top 209 | { 210 | var ystep = height / (stepcount-1); 211 | var x = width * data[0]; 212 | var y = height; 213 | 214 | for(i = 1; i < stepcount; i++) 215 | { 216 | var newx = width * data[i]; 217 | var newy = height - (i * ystep); 218 | 219 | if(gated) 220 | { 221 | set_source_rgba(frgb[0], frgb[1], frgb[2], frgb[3] * gatearray[i] ); 222 | } 223 | 224 | move_to(x, y); 225 | line_to(newx, newy); 226 | stroke(); 227 | 228 | x = newx; 229 | y = newy; 230 | } 231 | } 232 | 233 | //stroke(); 234 | } 235 | } -------------------------------------------------------------------------------- /datadisplay/ol.datadisplay.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 6, 6 | "minor" : 0, 7 | "revision" : 5 8 | } 9 | , 10 | "rect" : [ 259.0, 154.0, 769.0, 685.0 ], 11 | "bglocked" : 0, 12 | "openinpresentation" : 0, 13 | "default_fontsize" : 12.0, 14 | "default_fontface" : 0, 15 | "default_fontname" : "Arial", 16 | "gridonopen" : 0, 17 | "gridsize" : [ 15.0, 15.0 ], 18 | "gridsnaponopen" : 0, 19 | "statusbarvisible" : 2, 20 | "toolbarvisible" : 1, 21 | "boxanimatetime" : 200, 22 | "imprint" : 0, 23 | "enablehscroll" : 1, 24 | "enablevscroll" : 1, 25 | "devicewidth" : 0.0, 26 | "description" : "", 27 | "digest" : "", 28 | "tags" : "", 29 | "boxes" : [ { 30 | "box" : { 31 | "fontname" : "Arial", 32 | "fontsize" : 12.0, 33 | "id" : "obj-31", 34 | "maxclass" : "number", 35 | "numinlets" : 1, 36 | "numoutlets" : 2, 37 | "outlettype" : [ "int", "bang" ], 38 | "parameter_enable" : 0, 39 | "patching_rect" : [ 146.0, 387.0, 50.0, 20.0 ] 40 | } 41 | 42 | } 43 | , { 44 | "box" : { 45 | "fontname" : "Arial", 46 | "fontsize" : 12.0, 47 | "id" : "obj-27", 48 | "maxclass" : "number", 49 | "numinlets" : 1, 50 | "numoutlets" : 2, 51 | "outlettype" : [ "int", "bang" ], 52 | "parameter_enable" : 0, 53 | "patching_rect" : [ 75.0, 331.0, 50.0, 20.0 ] 54 | } 55 | 56 | } 57 | , { 58 | "box" : { 59 | "fontname" : "Arial", 60 | "fontsize" : 12.0, 61 | "id" : "obj-24", 62 | "maxclass" : "message", 63 | "numinlets" : 2, 64 | "numoutlets" : 1, 65 | "outlettype" : [ "" ], 66 | "patching_rect" : [ 456.0, 477.0, 77.0, 18.0 ], 67 | "text" : "orientation 3" 68 | } 69 | 70 | } 71 | , { 72 | "box" : { 73 | "fontname" : "Arial", 74 | "fontsize" : 12.0, 75 | "id" : "obj-23", 76 | "maxclass" : "message", 77 | "numinlets" : 2, 78 | "numoutlets" : 1, 79 | "outlettype" : [ "" ], 80 | "patching_rect" : [ 463.0, 389.5, 77.0, 18.0 ], 81 | "text" : "orientation 2" 82 | } 83 | 84 | } 85 | , { 86 | "box" : { 87 | "fontname" : "Arial", 88 | "fontsize" : 12.0, 89 | "id" : "obj-21", 90 | "maxclass" : "message", 91 | "numinlets" : 2, 92 | "numoutlets" : 1, 93 | "outlettype" : [ "" ], 94 | "patching_rect" : [ 463.0, 292.0, 77.0, 18.0 ], 95 | "text" : "orientation 1" 96 | } 97 | 98 | } 99 | , { 100 | "box" : { 101 | "fontname" : "Arial", 102 | "fontsize" : 12.0, 103 | "id" : "obj-17", 104 | "maxclass" : "message", 105 | "numinlets" : 2, 106 | "numoutlets" : 1, 107 | "outlettype" : [ "" ], 108 | "patching_rect" : [ 444.0, 181.5, 77.0, 18.0 ], 109 | "text" : "orientation 0" 110 | } 111 | 112 | } 113 | , { 114 | "box" : { 115 | "fontface" : 3, 116 | "fontname" : "Arial", 117 | "fontsize" : 20.871338, 118 | "id" : "obj-110", 119 | "maxclass" : "comment", 120 | "numinlets" : 1, 121 | "numoutlets" : 0, 122 | "patching_rect" : [ 24.0, 22.0, 705.0, 30.0 ], 123 | "text" : "ol.datadisplay.js", 124 | "varname" : "autohelp_top_title" 125 | } 126 | 127 | } 128 | , { 129 | "box" : { 130 | "fontname" : "Arial", 131 | "fontsize" : 12.754705, 132 | "id" : "obj-111", 133 | "maxclass" : "comment", 134 | "numinlets" : 1, 135 | "numoutlets" : 0, 136 | "patching_rect" : [ 24.0, 54.0, 705.0, 21.0 ], 137 | "text" : "heart rate monitor", 138 | "varname" : "autohelp_top_digest" 139 | } 140 | 141 | } 142 | , { 143 | "box" : { 144 | "fontname" : "Arial", 145 | "fontsize" : 12.0, 146 | "id" : "obj-19", 147 | "linecount" : 2, 148 | "maxclass" : "comment", 149 | "numinlets" : 1, 150 | "numoutlets" : 0, 151 | "patching_rect" : [ 109.0, 222.0, 150.0, 34.0 ], 152 | "text" : "works best with overdrive on!" 153 | } 154 | 155 | } 156 | , { 157 | "box" : { 158 | "id" : "obj-22", 159 | "maxclass" : "toggle", 160 | "numinlets" : 1, 161 | "numoutlets" : 1, 162 | "outlettype" : [ "int" ], 163 | "parameter_enable" : 0, 164 | "patching_rect" : [ 3.0, 290.0, 20.0, 20.0 ] 165 | } 166 | 167 | } 168 | , { 169 | "box" : { 170 | "fontname" : "Arial", 171 | "fontsize" : 12.0, 172 | "id" : "obj-20", 173 | "maxclass" : "message", 174 | "numinlets" : 2, 175 | "numoutlets" : 1, 176 | "outlettype" : [ "" ], 177 | "patching_rect" : [ 18.0, 349.0, 57.0, 18.0 ], 178 | "text" : "gated $1" 179 | } 180 | 181 | } 182 | , { 183 | "box" : { 184 | "id" : "obj-18", 185 | "maxclass" : "toggle", 186 | "numinlets" : 1, 187 | "numoutlets" : 1, 188 | "outlettype" : [ "int" ], 189 | "parameter_enable" : 0, 190 | "patching_rect" : [ 289.0, 360.5, 20.0, 20.0 ] 191 | } 192 | 193 | } 194 | , { 195 | "box" : { 196 | "fontname" : "Arial", 197 | "fontsize" : 12.0, 198 | "id" : "obj-16", 199 | "maxclass" : "newobj", 200 | "numinlets" : 2, 201 | "numoutlets" : 1, 202 | "outlettype" : [ "bang" ], 203 | "patching_rect" : [ 289.0, 389.5, 65.0, 20.0 ], 204 | "text" : "metro 500" 205 | } 206 | 207 | } 208 | , { 209 | "box" : { 210 | "id" : "obj-15", 211 | "maxclass" : "toggle", 212 | "numinlets" : 1, 213 | "numoutlets" : 1, 214 | "outlettype" : [ "int" ], 215 | "parameter_enable" : 0, 216 | "patching_rect" : [ 330.0, 430.5, 20.0, 20.0 ] 217 | } 218 | 219 | } 220 | , { 221 | "box" : { 222 | "embedstate" : [ [ "gated", 1 ], [ "grgb", 0, 0, 0, 0.2 ], [ "n_vert_segments", 20 ], [ "linewidth", 1 ], [ "n_horiz_segments", 45 ], [ "highrange", 1 ], [ "lowrange", 0 ], [ "orientation", 0 ], [ "frgb", 1, 0, 0, 1 ] ], 223 | "filename" : "ol.datadisplay.js", 224 | "id" : "obj-13", 225 | "jsarguments" : [ 128 ], 226 | "maxclass" : "jsui", 227 | "numinlets" : 2, 228 | "numoutlets" : 1, 229 | "outlettype" : [ "" ], 230 | "parameter_enable" : 0, 231 | "patching_rect" : [ 81.0, 460.0, 273.0, 190.0 ] 232 | } 233 | 234 | } 235 | , { 236 | "box" : { 237 | "id" : "obj-10", 238 | "maxclass" : "ezdac~", 239 | "numinlets" : 2, 240 | "numoutlets" : 0, 241 | "patching_rect" : [ 701.0, 168.0, 45.0, 45.0 ] 242 | } 243 | 244 | } 245 | , { 246 | "box" : { 247 | "fontname" : "Arial", 248 | "fontsize" : 12.0, 249 | "id" : "obj-9", 250 | "maxclass" : "newobj", 251 | "numinlets" : 2, 252 | "numoutlets" : 1, 253 | "outlettype" : [ "float" ], 254 | "patching_rect" : [ 327.0, 222.0, 83.0, 20.0 ], 255 | "text" : "snapshot~ 20" 256 | } 257 | 258 | } 259 | , { 260 | "box" : { 261 | "fontname" : "Arial", 262 | "fontsize" : 12.0, 263 | "id" : "obj-8", 264 | "maxclass" : "newobj", 265 | "numinlets" : 6, 266 | "numoutlets" : 1, 267 | "outlettype" : [ "signal" ], 268 | "patching_rect" : [ 299.0, 154.0, 103.0, 20.0 ], 269 | "text" : "scale~ -1. 1. 0. 1." 270 | } 271 | 272 | } 273 | , { 274 | "box" : { 275 | "fontname" : "Arial", 276 | "fontsize" : 12.0, 277 | "id" : "obj-7", 278 | "maxclass" : "newobj", 279 | "numinlets" : 2, 280 | "numoutlets" : 1, 281 | "outlettype" : [ "signal" ], 282 | "patching_rect" : [ 299.0, 119.0, 55.0, 20.0 ], 283 | "text" : "cycle~ 1" 284 | } 285 | 286 | } 287 | , { 288 | "box" : { 289 | "embedstate" : [ [ "gated", 0 ], [ "grgb", 0, 0, 0, 0.2 ], [ "n_vert_segments", 0 ], [ "linewidth", 1 ], [ "n_horiz_segments", 0 ], [ "highrange", 1 ], [ "lowrange", 0 ], [ "orientation", 3 ], [ "frgb", 1, 0, 0, 1 ] ], 290 | "filename" : "ol.datadisplay.js", 291 | "id" : "obj-6", 292 | "jsarguments" : [ 128 ], 293 | "maxclass" : "jsui", 294 | "numinlets" : 2, 295 | "numoutlets" : 1, 296 | "outlettype" : [ "" ], 297 | "parameter_enable" : 0, 298 | "patching_rect" : [ 444.0, 513.0, 223.0, 49.0 ] 299 | } 300 | 301 | } 302 | , { 303 | "box" : { 304 | "embedstate" : [ [ "gated", 0 ], [ "grgb", 0, 0, 0, 0.2 ], [ "n_vert_segments", 0 ], [ "linewidth", 1 ], [ "n_horiz_segments", 0 ], [ "highrange", 1 ], [ "lowrange", 0 ], [ "orientation", 2 ], [ "frgb", 1, 0, 0, 1 ] ], 305 | "filename" : "ol.datadisplay.js", 306 | "id" : "obj-4", 307 | "jsarguments" : [ 128 ], 308 | "maxclass" : "jsui", 309 | "numinlets" : 2, 310 | "numoutlets" : 1, 311 | "outlettype" : [ "" ], 312 | "parameter_enable" : 0, 313 | "patching_rect" : [ 444.0, 415.0, 223.0, 49.0 ] 314 | } 315 | 316 | } 317 | , { 318 | "box" : { 319 | "embedstate" : [ [ "gated", 0 ], [ "grgb", 0, 0, 0, 0.2 ], [ "n_vert_segments", 0 ], [ "linewidth", 1 ], [ "n_horiz_segments", 0 ], [ "highrange", 1 ], [ "lowrange", 0 ], [ "orientation", 1 ], [ "frgb", 0, 1, 0, 1 ] ], 320 | "filename" : "ol.datadisplay.js", 321 | "id" : "obj-3", 322 | "jsarguments" : [ 128 ], 323 | "maxclass" : "jsui", 324 | "numinlets" : 2, 325 | "numoutlets" : 1, 326 | "outlettype" : [ "" ], 327 | "parameter_enable" : 0, 328 | "patching_rect" : [ 444.0, 331.0, 223.0, 49.0 ] 329 | } 330 | 331 | } 332 | , { 333 | "box" : { 334 | "fontname" : "Arial", 335 | "fontsize" : 12.0, 336 | "id" : "obj-2", 337 | "maxclass" : "flonum", 338 | "numinlets" : 1, 339 | "numoutlets" : 2, 340 | "outlettype" : [ "float", "bang" ], 341 | "parameter_enable" : 0, 342 | "patching_rect" : [ 327.0, 270.0, 50.0, 20.0 ] 343 | } 344 | 345 | } 346 | , { 347 | "box" : { 348 | "embedstate" : [ [ "gated", 0 ], [ "grgb", 0, 0, 0, 0.2 ], [ "n_vert_segments", 0 ], [ "linewidth", 1 ], [ "n_horiz_segments", 0 ], [ "highrange", 1 ], [ "lowrange", 0 ], [ "orientation", 0 ], [ "frgb", 1, 0, 0, 1 ] ], 349 | "filename" : "ol.datadisplay.js", 350 | "id" : "obj-1", 351 | "jsarguments" : [ 128 ], 352 | "maxclass" : "jsui", 353 | "numinlets" : 2, 354 | "numoutlets" : 1, 355 | "outlettype" : [ "" ], 356 | "parameter_enable" : 0, 357 | "patching_rect" : [ 444.0, 231.5, 223.0, 49.0 ] 358 | } 359 | 360 | } 361 | , { 362 | "box" : { 363 | "background" : 1, 364 | "bgcolor" : [ 1.0, 0.701961, 0.0, 1.0 ], 365 | "grad1" : [ 0.86, 0.86, 0.75, 1.0 ], 366 | "grad2" : [ 0.78, 0.84, 0.86, 0.7 ], 367 | "id" : "obj-114", 368 | "ignoreclick" : 1, 369 | "maxclass" : "panel", 370 | "numinlets" : 1, 371 | "numoutlets" : 0, 372 | "patching_rect" : [ 19.0, 19.0, 709.0, 60.0 ], 373 | "varname" : "autohelp_top_panel" 374 | } 375 | 376 | } 377 | , { 378 | "box" : { 379 | "attr" : "n_horiz_segments", 380 | "fontname" : "Arial", 381 | "fontsize" : 12.0, 382 | "id" : "obj-25", 383 | "maxclass" : "attrui", 384 | "numinlets" : 1, 385 | "numoutlets" : 1, 386 | "outlettype" : [ "" ], 387 | "patching_rect" : [ 81.0, 367.0, 150.0, 20.0 ] 388 | } 389 | 390 | } 391 | , { 392 | "box" : { 393 | "attr" : "n_vert_segments", 394 | "fontname" : "Arial", 395 | "fontsize" : 12.0, 396 | "id" : "obj-30", 397 | "maxclass" : "attrui", 398 | "numinlets" : 1, 399 | "numoutlets" : 1, 400 | "outlettype" : [ "" ], 401 | "patching_rect" : [ 113.0, 429.0, 150.0, 20.0 ] 402 | } 403 | 404 | } 405 | ], 406 | "lines" : [ { 407 | "patchline" : { 408 | "destination" : [ "obj-13", 1 ], 409 | "disabled" : 0, 410 | "hidden" : 0, 411 | "source" : [ "obj-15", 0 ] 412 | } 413 | 414 | } 415 | , { 416 | "patchline" : { 417 | "destination" : [ "obj-15", 0 ], 418 | "disabled" : 0, 419 | "hidden" : 0, 420 | "source" : [ "obj-16", 0 ] 421 | } 422 | 423 | } 424 | , { 425 | "patchline" : { 426 | "destination" : [ "obj-1", 0 ], 427 | "disabled" : 0, 428 | "hidden" : 0, 429 | "source" : [ "obj-17", 0 ] 430 | } 431 | 432 | } 433 | , { 434 | "patchline" : { 435 | "destination" : [ "obj-16", 0 ], 436 | "disabled" : 0, 437 | "hidden" : 0, 438 | "source" : [ "obj-18", 0 ] 439 | } 440 | 441 | } 442 | , { 443 | "patchline" : { 444 | "destination" : [ "obj-1", 0 ], 445 | "disabled" : 0, 446 | "hidden" : 0, 447 | "source" : [ "obj-2", 0 ] 448 | } 449 | 450 | } 451 | , { 452 | "patchline" : { 453 | "destination" : [ "obj-13", 0 ], 454 | "disabled" : 0, 455 | "hidden" : 0, 456 | "source" : [ "obj-2", 0 ] 457 | } 458 | 459 | } 460 | , { 461 | "patchline" : { 462 | "destination" : [ "obj-3", 0 ], 463 | "disabled" : 0, 464 | "hidden" : 0, 465 | "source" : [ "obj-2", 0 ] 466 | } 467 | 468 | } 469 | , { 470 | "patchline" : { 471 | "destination" : [ "obj-4", 0 ], 472 | "disabled" : 0, 473 | "hidden" : 0, 474 | "source" : [ "obj-2", 0 ] 475 | } 476 | 477 | } 478 | , { 479 | "patchline" : { 480 | "destination" : [ "obj-6", 0 ], 481 | "disabled" : 0, 482 | "hidden" : 0, 483 | "source" : [ "obj-2", 0 ] 484 | } 485 | 486 | } 487 | , { 488 | "patchline" : { 489 | "destination" : [ "obj-13", 0 ], 490 | "disabled" : 0, 491 | "hidden" : 0, 492 | "source" : [ "obj-20", 0 ] 493 | } 494 | 495 | } 496 | , { 497 | "patchline" : { 498 | "destination" : [ "obj-3", 0 ], 499 | "disabled" : 0, 500 | "hidden" : 0, 501 | "source" : [ "obj-21", 0 ] 502 | } 503 | 504 | } 505 | , { 506 | "patchline" : { 507 | "destination" : [ "obj-20", 0 ], 508 | "disabled" : 0, 509 | "hidden" : 0, 510 | "source" : [ "obj-22", 0 ] 511 | } 512 | 513 | } 514 | , { 515 | "patchline" : { 516 | "destination" : [ "obj-4", 0 ], 517 | "disabled" : 0, 518 | "hidden" : 0, 519 | "source" : [ "obj-23", 0 ] 520 | } 521 | 522 | } 523 | , { 524 | "patchline" : { 525 | "destination" : [ "obj-6", 0 ], 526 | "disabled" : 0, 527 | "hidden" : 0, 528 | "source" : [ "obj-24", 0 ] 529 | } 530 | 531 | } 532 | , { 533 | "patchline" : { 534 | "destination" : [ "obj-13", 0 ], 535 | "disabled" : 0, 536 | "hidden" : 0, 537 | "source" : [ "obj-25", 0 ] 538 | } 539 | 540 | } 541 | , { 542 | "patchline" : { 543 | "destination" : [ "obj-25", 0 ], 544 | "disabled" : 0, 545 | "hidden" : 0, 546 | "source" : [ "obj-27", 0 ] 547 | } 548 | 549 | } 550 | , { 551 | "patchline" : { 552 | "destination" : [ "obj-13", 0 ], 553 | "disabled" : 0, 554 | "hidden" : 0, 555 | "source" : [ "obj-30", 0 ] 556 | } 557 | 558 | } 559 | , { 560 | "patchline" : { 561 | "destination" : [ "obj-30", 0 ], 562 | "disabled" : 0, 563 | "hidden" : 0, 564 | "source" : [ "obj-31", 0 ] 565 | } 566 | 567 | } 568 | , { 569 | "patchline" : { 570 | "destination" : [ "obj-8", 0 ], 571 | "disabled" : 0, 572 | "hidden" : 0, 573 | "source" : [ "obj-7", 0 ] 574 | } 575 | 576 | } 577 | , { 578 | "patchline" : { 579 | "destination" : [ "obj-9", 0 ], 580 | "disabled" : 0, 581 | "hidden" : 0, 582 | "source" : [ "obj-8", 0 ] 583 | } 584 | 585 | } 586 | , { 587 | "patchline" : { 588 | "destination" : [ "obj-2", 0 ], 589 | "disabled" : 0, 590 | "hidden" : 0, 591 | "source" : [ "obj-9", 0 ] 592 | } 593 | 594 | } 595 | ], 596 | "dependency_cache" : [ { 597 | "name" : "ol.datadisplay.js", 598 | "bootpath" : "/Users/oli/Dev/MyMaxStuff/MyControlsLibrary/datadisplay", 599 | "patcherrelativepath" : "", 600 | "type" : "TEXT", 601 | "implicit" : 1 602 | } 603 | ] 604 | } 605 | 606 | } 607 | -------------------------------------------------------------------------------- /kslider/bkh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olilarkin/olControls/9049aefa7e4d4c41bffdc76bbab86992ec1839cc/kslider/bkh.png -------------------------------------------------------------------------------- /kslider/ol.kslider.bp.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 25.0, 69.0, 689.0, 392.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 25.0, 69.0, 689.0, 392.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 0, 9 | "default_fontsize" : 12.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Arial", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 10.0, 10.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "comment", 24 | "text" : "arguments :\n\n1 - number of octaves\n2 - starting note (midi value e.g. 60)\n\n", 25 | "linecount" : 5, 26 | "numinlets" : 1, 27 | "id" : "obj-10", 28 | "fontsize" : 12.0, 29 | "numoutlets" : 0, 30 | "fontname" : "Arial", 31 | "patching_rect" : [ 230.0, 110.0, 150.0, 75.0 ] 32 | } 33 | 34 | } 35 | , { 36 | "box" : { 37 | "maxclass" : "newobj", 38 | "text" : "seq", 39 | "numinlets" : 1, 40 | "id" : "obj-4", 41 | "fontsize" : 12.0, 42 | "numoutlets" : 2, 43 | "outlettype" : [ "int", "bang" ], 44 | "fontname" : "Arial", 45 | "patching_rect" : [ 100.0, 140.0, 32.5, 20.0 ] 46 | } 47 | 48 | } 49 | , { 50 | "box" : { 51 | "maxclass" : "newobj", 52 | "text" : "unpack i i", 53 | "numinlets" : 1, 54 | "id" : "obj-3", 55 | "fontsize" : 12.0, 56 | "numoutlets" : 2, 57 | "outlettype" : [ "int", "int" ], 58 | "fontname" : "Arial", 59 | "patching_rect" : [ 40.0, 300.0, 61.0, 20.0 ] 60 | } 61 | 62 | } 63 | , { 64 | "box" : { 65 | "maxclass" : "newobj", 66 | "text" : "noteout", 67 | "numinlets" : 3, 68 | "id" : "obj-2", 69 | "fontsize" : 12.0, 70 | "numoutlets" : 0, 71 | "fontname" : "Arial", 72 | "patching_rect" : [ 40.0, 350.0, 51.0, 20.0 ] 73 | } 74 | 75 | } 76 | , { 77 | "box" : { 78 | "maxclass" : "newobj", 79 | "text" : "midiin", 80 | "numinlets" : 1, 81 | "id" : "obj-5", 82 | "fontsize" : 12.0, 83 | "numoutlets" : 1, 84 | "outlettype" : [ "int" ], 85 | "fontname" : "Arial", 86 | "patching_rect" : [ 40.0, 130.0, 43.0, 20.0 ] 87 | } 88 | 89 | } 90 | , { 91 | "box" : { 92 | "maxclass" : "newobj", 93 | "text" : "midiparse", 94 | "numinlets" : 1, 95 | "id" : "obj-6", 96 | "fontsize" : 12.0, 97 | "numoutlets" : 7, 98 | "outlettype" : [ "", "", "", "int", "int", "int", "int" ], 99 | "fontname" : "Arial", 100 | "patching_rect" : [ 40.0, 170.0, 101.0, 20.0 ] 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "bpatcher", 107 | "numinlets" : 1, 108 | "id" : "obj-1", 109 | "name" : "ol.kslider.bp.maxpat", 110 | "numoutlets" : 1, 111 | "outlettype" : [ "" ], 112 | "args" : [ 6, 36 ], 113 | "patching_rect" : [ 40.0, 210.0, 620.0, 68.0 ] 114 | } 115 | 116 | } 117 | , { 118 | "box" : { 119 | "maxclass" : "comment", 120 | "varname" : "autohelp_top_title", 121 | "text" : "ol.kslider.bp", 122 | "numinlets" : 1, 123 | "id" : "obj-110", 124 | "fontface" : 3, 125 | "fontsize" : 20.871338, 126 | "numoutlets" : 0, 127 | "fontname" : "Arial", 128 | "patching_rect" : [ 10.0, 9.0, 668.0, 30.0 ] 129 | } 130 | 131 | } 132 | , { 133 | "box" : { 134 | "maxclass" : "comment", 135 | "varname" : "autohelp_top_digest", 136 | "text" : "a prettier kslider that is MIDI input friendly", 137 | "numinlets" : 1, 138 | "id" : "obj-111", 139 | "fontsize" : 12.754705, 140 | "numoutlets" : 0, 141 | "fontname" : "Arial", 142 | "patching_rect" : [ 10.0, 41.0, 668.0, 21.0 ] 143 | } 144 | 145 | } 146 | , { 147 | "box" : { 148 | "maxclass" : "panel", 149 | "varname" : "autohelp_top_panel", 150 | "grad1" : [ 0.86, 0.86, 0.75, 1.0 ], 151 | "numinlets" : 1, 152 | "id" : "obj-114", 153 | "bgcolor" : [ 1.0, 0.701961, 0.0, 1.0 ], 154 | "grad2" : [ 0.78, 0.84, 0.86, 0.7 ], 155 | "numoutlets" : 0, 156 | "background" : 1, 157 | "patching_rect" : [ 5.0, 6.0, 678.0, 58.0 ] 158 | } 159 | 160 | } 161 | , { 162 | "box" : { 163 | "maxclass" : "message", 164 | "text" : "read, bang", 165 | "numinlets" : 2, 166 | "id" : "obj-7", 167 | "fontsize" : 12.0, 168 | "numoutlets" : 1, 169 | "outlettype" : [ "" ], 170 | "fontname" : "Arial", 171 | "patching_rect" : [ 100.0, 110.0, 68.0, 18.0 ] 172 | } 173 | 174 | } 175 | ], 176 | "lines" : [ { 177 | "patchline" : { 178 | "source" : [ "obj-1", 0 ], 179 | "destination" : [ "obj-3", 0 ], 180 | "hidden" : 0, 181 | "midpoints" : [ ] 182 | } 183 | 184 | } 185 | , { 186 | "patchline" : { 187 | "source" : [ "obj-6", 0 ], 188 | "destination" : [ "obj-1", 0 ], 189 | "hidden" : 0, 190 | "midpoints" : [ ] 191 | } 192 | 193 | } 194 | , { 195 | "patchline" : { 196 | "source" : [ "obj-3", 1 ], 197 | "destination" : [ "obj-2", 1 ], 198 | "hidden" : 0, 199 | "midpoints" : [ 91.5, 334.5, 65.5, 334.5 ] 200 | } 201 | 202 | } 203 | , { 204 | "patchline" : { 205 | "source" : [ "obj-3", 0 ], 206 | "destination" : [ "obj-2", 0 ], 207 | "hidden" : 0, 208 | "midpoints" : [ ] 209 | } 210 | 211 | } 212 | , { 213 | "patchline" : { 214 | "source" : [ "obj-5", 0 ], 215 | "destination" : [ "obj-6", 0 ], 216 | "hidden" : 0, 217 | "midpoints" : [ ] 218 | } 219 | 220 | } 221 | , { 222 | "patchline" : { 223 | "source" : [ "obj-4", 0 ], 224 | "destination" : [ "obj-6", 0 ], 225 | "hidden" : 0, 226 | "midpoints" : [ 109.5, 164.5, 49.5, 164.5 ] 227 | } 228 | 229 | } 230 | , { 231 | "patchline" : { 232 | "source" : [ "obj-7", 0 ], 233 | "destination" : [ "obj-4", 0 ], 234 | "hidden" : 0, 235 | "midpoints" : [ ] 236 | } 237 | 238 | } 239 | ], 240 | "parameters" : { 241 | "obj-1::obj-3" : [ "live.slider", "velocity", 0 ] 242 | } 243 | 244 | } 245 | 246 | } 247 | -------------------------------------------------------------------------------- /kslider/ol.kslider.bp.maxpat: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 315.0, 200.0, 997.0, 672.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 315.0, 200.0, 997.0, 672.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 1, 9 | "default_fontsize" : 12.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Arial", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 10.0, 10.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "outlet", 24 | "varname" : "outlet[1]", 25 | "patching_rect" : [ 190.0, 310.0, 25.0, 25.0 ], 26 | "id" : "obj-1", 27 | "numinlets" : 1, 28 | "numoutlets" : 0, 29 | "presentation_rect" : [ 192.0, 305.0, 0.0, 0.0 ], 30 | "comment" : "" 31 | } 32 | 33 | } 34 | , { 35 | "box" : { 36 | "maxclass" : "message", 37 | "text" : "script sendbox clear presentation_rect $1 30. 33. 15.", 38 | "patching_rect" : [ 580.0, 620.0, 281.0, 18.0 ], 39 | "id" : "obj-96", 40 | "fontname" : "Arial", 41 | "numinlets" : 2, 42 | "numoutlets" : 1, 43 | "fontsize" : 11.595187, 44 | "outlettype" : [ "" ] 45 | } 46 | 47 | } 48 | , { 49 | "box" : { 50 | "maxclass" : "newobj", 51 | "text" : "+ 128", 52 | "patching_rect" : [ 680.0, 540.0, 41.0, 20.0 ], 53 | "id" : "obj-95", 54 | "fontname" : "Arial", 55 | "numinlets" : 2, 56 | "numoutlets" : 1, 57 | "fontsize" : 12.0, 58 | "outlettype" : [ "int" ] 59 | } 60 | 61 | } 62 | , { 63 | "box" : { 64 | "maxclass" : "message", 65 | "text" : "script sendbox hold presentation_rect $1 10. 33. 15.", 66 | "patching_rect" : [ 580.0, 600.0, 277.0, 18.0 ], 67 | "id" : "obj-94", 68 | "fontname" : "Arial", 69 | "numinlets" : 2, 70 | "numoutlets" : 1, 71 | "fontsize" : 11.595187, 72 | "outlettype" : [ "" ] 73 | } 74 | 75 | } 76 | , { 77 | "box" : { 78 | "maxclass" : "newobj", 79 | "text" : "+ 98", 80 | "patching_rect" : [ 660.0, 440.0, 34.0, 20.0 ], 81 | "id" : "obj-87", 82 | "fontname" : "Arial", 83 | "numinlets" : 2, 84 | "numoutlets" : 1, 85 | "fontsize" : 12.0, 86 | "outlettype" : [ "int" ] 87 | } 88 | 89 | } 90 | , { 91 | "box" : { 92 | "maxclass" : "message", 93 | "text" : "script sendbox vel presentation_rect $1 0. 18. 59.", 94 | "patching_rect" : [ 580.0, 560.0, 264.0, 18.0 ], 95 | "id" : "obj-17", 96 | "fontname" : "Arial", 97 | "numinlets" : 2, 98 | "numoutlets" : 1, 99 | "fontsize" : 11.595187, 100 | "outlettype" : [ "" ] 101 | } 102 | 103 | } 104 | , { 105 | "box" : { 106 | "maxclass" : "newobj", 107 | "text" : "i", 108 | "patching_rect" : [ 700.0, 410.0, 32.5, 20.0 ], 109 | "id" : "obj-74", 110 | "fontname" : "Arial", 111 | "numinlets" : 2, 112 | "numoutlets" : 1, 113 | "fontsize" : 12.0, 114 | "outlettype" : [ "int" ] 115 | } 116 | 117 | } 118 | , { 119 | "box" : { 120 | "maxclass" : "newobj", 121 | "text" : "+ #2", 122 | "patching_rect" : [ 710.0, 370.0, 34.0, 20.0 ], 123 | "id" : "obj-57", 124 | "fontname" : "Arial", 125 | "numinlets" : 2, 126 | "numoutlets" : 1, 127 | "fontsize" : 12.0, 128 | "outlettype" : [ "int" ] 129 | } 130 | 131 | } 132 | , { 133 | "box" : { 134 | "maxclass" : "newobj", 135 | "text" : "* 12", 136 | "patching_rect" : [ 700.0, 330.0, 32.5, 20.0 ], 137 | "id" : "obj-56", 138 | "fontname" : "Arial", 139 | "numinlets" : 2, 140 | "numoutlets" : 1, 141 | "fontsize" : 12.0, 142 | "outlettype" : [ "int" ] 143 | } 144 | 145 | } 146 | , { 147 | "box" : { 148 | "maxclass" : "newobj", 149 | "text" : "* 91", 150 | "patching_rect" : [ 650.0, 320.0, 32.5, 20.0 ], 151 | "id" : "obj-23", 152 | "fontname" : "Arial", 153 | "numinlets" : 2, 154 | "numoutlets" : 1, 155 | "fontsize" : 12.0, 156 | "outlettype" : [ "int" ] 157 | } 158 | 159 | } 160 | , { 161 | "box" : { 162 | "maxclass" : "newobj", 163 | "text" : "pack s i i", 164 | "patching_rect" : [ 620.0, 400.0, 57.0, 20.0 ], 165 | "id" : "obj-27", 166 | "fontname" : "Arial", 167 | "numinlets" : 3, 168 | "numoutlets" : 1, 169 | "fontsize" : 12.0, 170 | "outlettype" : [ "" ] 171 | } 172 | 173 | } 174 | , { 175 | "box" : { 176 | "maxclass" : "newobj", 177 | "text" : "loadbang", 178 | "patching_rect" : [ 620.0, 220.0, 60.0, 20.0 ], 179 | "id" : "obj-21", 180 | "fontname" : "Arial", 181 | "numinlets" : 1, 182 | "numoutlets" : 1, 183 | "fontsize" : 12.0, 184 | "outlettype" : [ "bang" ] 185 | } 186 | 187 | } 188 | , { 189 | "box" : { 190 | "maxclass" : "newobj", 191 | "text" : "uzi #1 0", 192 | "patching_rect" : [ 620.0, 280.0, 53.0, 20.0 ], 193 | "id" : "obj-22", 194 | "fontname" : "Arial", 195 | "numinlets" : 2, 196 | "numoutlets" : 3, 197 | "fontsize" : 12.0, 198 | "outlettype" : [ "bang", "bang", "int" ] 199 | } 200 | 201 | } 202 | , { 203 | "box" : { 204 | "maxclass" : "newobj", 205 | "text" : "sprintf oct%i", 206 | "patching_rect" : [ 570.0, 330.0, 76.0, 20.0 ], 207 | "id" : "obj-19", 208 | "fontname" : "Arial", 209 | "numinlets" : 1, 210 | "numoutlets" : 1, 211 | "fontsize" : 12.0, 212 | "outlettype" : [ "" ] 213 | } 214 | 215 | } 216 | , { 217 | "box" : { 218 | "maxclass" : "message", 219 | "text" : "script newobject bpatcher @args $3 @name oneoctave.bp.maxpat @varname $1 @presentation_rect $2 0. 92 63. @presentation 1 @patching_rect $2 200. 92 63., script connect inlet1 0 $1 0, script connect hold 0 $1 1, script connect clear 1 $1 2, script connect vel 0 $1 3, script connect $1 0 outlet 0", 220 | "linecount" : 3, 221 | "patching_rect" : [ 390.0, 470.0, 603.0, 46.0 ], 222 | "id" : "obj-11", 223 | "fontname" : "Arial", 224 | "numinlets" : 2, 225 | "numoutlets" : 1, 226 | "fontsize" : 12.0, 227 | "outlettype" : [ "" ] 228 | } 229 | 230 | } 231 | , { 232 | "box" : { 233 | "maxclass" : "newobj", 234 | "text" : "thispatcher", 235 | "patching_rect" : [ 380.0, 620.0, 69.0, 20.0 ], 236 | "id" : "obj-7", 237 | "fontname" : "Arial", 238 | "numinlets" : 1, 239 | "numoutlets" : 2, 240 | "fontsize" : 12.0, 241 | "outlettype" : [ "", "" ], 242 | "save" : [ "#N", "thispatcher", ";", "#Q", "end", ";" ] 243 | } 244 | 245 | } 246 | , { 247 | "box" : { 248 | "maxclass" : "newobj", 249 | "text" : "sel 0", 250 | "patching_rect" : [ 290.0, 30.0, 36.0, 20.0 ], 251 | "id" : "obj-15", 252 | "fontname" : "Arial", 253 | "numinlets" : 2, 254 | "numoutlets" : 2, 255 | "fontsize" : 12.0, 256 | "outlettype" : [ "bang", "" ] 257 | } 258 | 259 | } 260 | , { 261 | "box" : { 262 | "maxclass" : "textbutton", 263 | "varname" : "clear", 264 | "patching_rect" : [ 310.0, 80.0, 33.0, 15.0 ], 265 | "presentation" : 1, 266 | "id" : "obj-8", 267 | "fontname" : "Arial", 268 | "rounded" : 8.0, 269 | "border" : 0, 270 | "numinlets" : 1, 271 | "text" : "clear", 272 | "numoutlets" : 3, 273 | "fontsize" : 10.0, 274 | "outlettype" : [ "", "", "int" ], 275 | "presentation_rect" : [ 128.0, 30.0, 33.0, 15.0 ], 276 | "outputmode" : 0, 277 | "texton" : "clear" 278 | } 279 | 280 | } 281 | , { 282 | "box" : { 283 | "maxclass" : "textbutton", 284 | "varname" : "hold", 285 | "patching_rect" : [ 270.0, 80.0, 33.0, 15.0 ], 286 | "presentation" : 1, 287 | "id" : "obj-6", 288 | "fontname" : "Arial", 289 | "mode" : 1, 290 | "rounded" : 8.0, 291 | "border" : 0, 292 | "numinlets" : 1, 293 | "text" : "hold", 294 | "numoutlets" : 3, 295 | "fontsize" : 10.0, 296 | "outlettype" : [ "", "", "int" ], 297 | "presentation_rect" : [ 128.0, 10.0, 33.0, 15.0 ], 298 | "outputmode" : 0, 299 | "texton" : "hold" 300 | } 301 | 302 | } 303 | , { 304 | "box" : { 305 | "maxclass" : "live.slider", 306 | "varname" : "vel", 307 | "patching_rect" : [ 350.0, 100.0, 18.0, 59.0 ], 308 | "presentation" : 1, 309 | "id" : "obj-3", 310 | "parameter_enable" : 1, 311 | "numinlets" : 1, 312 | "showname" : 0, 313 | "numoutlets" : 2, 314 | "outlettype" : [ "", "float" ], 315 | "presentation_rect" : [ 98.0, 0.0, 18.0, 59.0 ], 316 | "saved_attribute_attributes" : { 317 | "valueof" : { 318 | "parameter_units" : "", 319 | "parameter_order" : 0, 320 | "parameter_defer" : 0, 321 | "parameter_speedlim" : 1.0, 322 | "parameter_steps" : 0, 323 | "parameter_invisible" : 0, 324 | "parameter_exponent" : 1.0, 325 | "parameter_annotation_name" : "", 326 | "parameter_unitstyle" : 0, 327 | "parameter_mmax" : 127.0, 328 | "parameter_mmin" : 0.0, 329 | "parameter_initial" : [ 127 ], 330 | "parameter_type" : 0, 331 | "parameter_initial_enable" : 1, 332 | "parameter_shortname" : "velocity", 333 | "parameter_modmax" : 127.0, 334 | "parameter_longname" : "live.slider", 335 | "parameter_modmin" : 0.0, 336 | "parameter_linknames" : 0, 337 | "parameter_modmode" : 0, 338 | "parameter_info" : "" 339 | } 340 | 341 | } 342 | 343 | } 344 | 345 | } 346 | , { 347 | "box" : { 348 | "maxclass" : "inlet", 349 | "varname" : "inlet1", 350 | "patching_rect" : [ 47.0, 36.0, 25.0, 25.0 ], 351 | "id" : "obj-9", 352 | "numinlets" : 0, 353 | "numoutlets" : 1, 354 | "outlettype" : [ "" ], 355 | "comment" : "" 356 | } 357 | 358 | } 359 | , { 360 | "box" : { 361 | "maxclass" : "outlet", 362 | "varname" : "outlet", 363 | "patching_rect" : [ 67.0, 304.0, 25.0, 25.0 ], 364 | "id" : "obj-5", 365 | "numinlets" : 1, 366 | "numoutlets" : 0, 367 | "comment" : "" 368 | } 369 | 370 | } 371 | ], 372 | "lines" : [ { 373 | "patchline" : { 374 | "source" : [ "obj-8", 0 ], 375 | "destination" : [ "obj-1", 0 ], 376 | "hidden" : 0, 377 | "midpoints" : [ ] 378 | } 379 | 380 | } 381 | , { 382 | "patchline" : { 383 | "source" : [ "obj-22", 1 ], 384 | "destination" : [ "obj-74", 0 ], 385 | "hidden" : 0, 386 | "midpoints" : [ ] 387 | } 388 | 389 | } 390 | , { 391 | "patchline" : { 392 | "source" : [ "obj-56", 0 ], 393 | "destination" : [ "obj-57", 0 ], 394 | "hidden" : 0, 395 | "midpoints" : [ ] 396 | } 397 | 398 | } 399 | , { 400 | "patchline" : { 401 | "source" : [ "obj-57", 0 ], 402 | "destination" : [ "obj-27", 2 ], 403 | "hidden" : 0, 404 | "midpoints" : [ ] 405 | } 406 | 407 | } 408 | , { 409 | "patchline" : { 410 | "source" : [ "obj-22", 2 ], 411 | "destination" : [ "obj-56", 0 ], 412 | "hidden" : 0, 413 | "midpoints" : [ ] 414 | } 415 | 416 | } 417 | , { 418 | "patchline" : { 419 | "source" : [ "obj-22", 2 ], 420 | "destination" : [ "obj-23", 0 ], 421 | "hidden" : 0, 422 | "midpoints" : [ ] 423 | } 424 | 425 | } 426 | , { 427 | "patchline" : { 428 | "source" : [ "obj-22", 2 ], 429 | "destination" : [ "obj-19", 0 ], 430 | "hidden" : 0, 431 | "midpoints" : [ ] 432 | } 433 | 434 | } 435 | , { 436 | "patchline" : { 437 | "source" : [ "obj-21", 0 ], 438 | "destination" : [ "obj-22", 0 ], 439 | "hidden" : 0, 440 | "midpoints" : [ ] 441 | } 442 | 443 | } 444 | , { 445 | "patchline" : { 446 | "source" : [ "obj-96", 0 ], 447 | "destination" : [ "obj-7", 0 ], 448 | "hidden" : 0, 449 | "midpoints" : [ ] 450 | } 451 | 452 | } 453 | , { 454 | "patchline" : { 455 | "source" : [ "obj-94", 0 ], 456 | "destination" : [ "obj-7", 0 ], 457 | "hidden" : 0, 458 | "midpoints" : [ ] 459 | } 460 | 461 | } 462 | , { 463 | "patchline" : { 464 | "source" : [ "obj-17", 0 ], 465 | "destination" : [ "obj-7", 0 ], 466 | "hidden" : 0, 467 | "midpoints" : [ ] 468 | } 469 | 470 | } 471 | , { 472 | "patchline" : { 473 | "source" : [ "obj-87", 0 ], 474 | "destination" : [ "obj-17", 0 ], 475 | "hidden" : 0, 476 | "midpoints" : [ ] 477 | } 478 | 479 | } 480 | , { 481 | "patchline" : { 482 | "source" : [ "obj-74", 0 ], 483 | "destination" : [ "obj-87", 0 ], 484 | "hidden" : 0, 485 | "midpoints" : [ ] 486 | } 487 | 488 | } 489 | , { 490 | "patchline" : { 491 | "source" : [ "obj-23", 0 ], 492 | "destination" : [ "obj-74", 1 ], 493 | "hidden" : 0, 494 | "midpoints" : [ ] 495 | } 496 | 497 | } 498 | , { 499 | "patchline" : { 500 | "source" : [ "obj-23", 0 ], 501 | "destination" : [ "obj-27", 1 ], 502 | "hidden" : 0, 503 | "midpoints" : [ ] 504 | } 505 | 506 | } 507 | , { 508 | "patchline" : { 509 | "source" : [ "obj-27", 0 ], 510 | "destination" : [ "obj-11", 0 ], 511 | "hidden" : 0, 512 | "midpoints" : [ ] 513 | } 514 | 515 | } 516 | , { 517 | "patchline" : { 518 | "source" : [ "obj-19", 0 ], 519 | "destination" : [ "obj-27", 0 ], 520 | "hidden" : 0, 521 | "midpoints" : [ ] 522 | } 523 | 524 | } 525 | , { 526 | "patchline" : { 527 | "source" : [ "obj-11", 0 ], 528 | "destination" : [ "obj-7", 0 ], 529 | "hidden" : 0, 530 | "midpoints" : [ ] 531 | } 532 | 533 | } 534 | , { 535 | "patchline" : { 536 | "source" : [ "obj-9", 0 ], 537 | "destination" : [ "obj-5", 0 ], 538 | "hidden" : 0, 539 | "midpoints" : [ 22.0, 198.0 ] 540 | } 541 | 542 | } 543 | , { 544 | "patchline" : { 545 | "source" : [ "obj-6", 0 ], 546 | "destination" : [ "obj-15", 0 ], 547 | "hidden" : 0, 548 | "midpoints" : [ ] 549 | } 550 | 551 | } 552 | , { 553 | "patchline" : { 554 | "source" : [ "obj-15", 0 ], 555 | "destination" : [ "obj-8", 0 ], 556 | "hidden" : 0, 557 | "midpoints" : [ ] 558 | } 559 | 560 | } 561 | , { 562 | "patchline" : { 563 | "source" : [ "obj-74", 0 ], 564 | "destination" : [ "obj-95", 0 ], 565 | "hidden" : 0, 566 | "midpoints" : [ ] 567 | } 568 | 569 | } 570 | , { 571 | "patchline" : { 572 | "source" : [ "obj-95", 0 ], 573 | "destination" : [ "obj-94", 0 ], 574 | "hidden" : 0, 575 | "midpoints" : [ ] 576 | } 577 | 578 | } 579 | , { 580 | "patchline" : { 581 | "source" : [ "obj-95", 0 ], 582 | "destination" : [ "obj-96", 0 ], 583 | "hidden" : 0, 584 | "midpoints" : [ ] 585 | } 586 | 587 | } 588 | ], 589 | "parameters" : { 590 | "obj-3" : [ "live.slider", "velocity", 0 ] 591 | } 592 | 593 | } 594 | 595 | } 596 | -------------------------------------------------------------------------------- /kslider/onekey.bp.maxpat: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 50.0, 94.0, 640.0, 480.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 50.0, 94.0, 640.0, 480.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 1, 9 | "default_fontsize" : 12.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Arial", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 10.0, 10.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "newobj", 24 | "text" : "t 0", 25 | "fontsize" : 12.0, 26 | "patching_rect" : [ 390.0, 110.0, 24.0, 20.0 ], 27 | "numinlets" : 1, 28 | "id" : "obj-11", 29 | "fontname" : "Arial", 30 | "numoutlets" : 1, 31 | "outlettype" : [ "int" ] 32 | } 33 | 34 | } 35 | , { 36 | "box" : { 37 | "maxclass" : "inlet", 38 | "patching_rect" : [ 390.0, 60.0, 25.0, 25.0 ], 39 | "numinlets" : 0, 40 | "id" : "obj-5", 41 | "numoutlets" : 1, 42 | "outlettype" : [ "" ], 43 | "comment" : "" 44 | } 45 | 46 | } 47 | , { 48 | "box" : { 49 | "maxclass" : "pictctrl", 50 | "presentation_rect" : [ 0.0, 0.0, 20.0, 20.0 ], 51 | "patching_rect" : [ 255.0, 165.0, 20.0, 20.0 ], 52 | "presentation" : 1, 53 | "numinlets" : 1, 54 | "clickedimage" : 1, 55 | "name" : "#2", 56 | "id" : "obj-3", 57 | "numoutlets" : 1, 58 | "snap" : 1, 59 | "outlettype" : [ "int" ] 60 | } 61 | 62 | } 63 | , { 64 | "box" : { 65 | "maxclass" : "pictctrl", 66 | "presentation_rect" : [ 395.0, 285.0, 0.0, 0.0 ], 67 | "patching_rect" : [ 395.0, 285.0, 0.0, 0.0 ], 68 | "presentation" : 1, 69 | "numinlets" : 1, 70 | "name" : "#2", 71 | "id" : "obj-2", 72 | "numoutlets" : 1, 73 | "snap" : 1, 74 | "outlettype" : [ "int" ] 75 | } 76 | 77 | } 78 | , { 79 | "box" : { 80 | "maxclass" : "inlet", 81 | "patching_rect" : [ 190.0, 70.0, 25.0, 25.0 ], 82 | "numinlets" : 0, 83 | "id" : "obj-1", 84 | "numoutlets" : 1, 85 | "outlettype" : [ "" ], 86 | "comment" : "" 87 | } 88 | 89 | } 90 | , { 91 | "box" : { 92 | "maxclass" : "inlet", 93 | "patching_rect" : [ 260.0, 60.0, 25.0, 25.0 ], 94 | "numinlets" : 0, 95 | "id" : "obj-8", 96 | "numoutlets" : 1, 97 | "outlettype" : [ "" ], 98 | "comment" : "" 99 | } 100 | 101 | } 102 | , { 103 | "box" : { 104 | "maxclass" : "outlet", 105 | "patching_rect" : [ 250.0, 320.0, 25.0, 25.0 ], 106 | "numinlets" : 1, 107 | "id" : "obj-23", 108 | "numoutlets" : 0, 109 | "comment" : "" 110 | } 111 | 112 | } 113 | , { 114 | "box" : { 115 | "maxclass" : "newobj", 116 | "text" : "pack #1 127", 117 | "fontsize" : 12.0, 118 | "patching_rect" : [ 250.0, 280.0, 76.0, 20.0 ], 119 | "numinlets" : 2, 120 | "id" : "obj-20", 121 | "fontname" : "Arial", 122 | "numoutlets" : 1, 123 | "outlettype" : [ "" ] 124 | } 125 | 126 | } 127 | , { 128 | "box" : { 129 | "maxclass" : "newobj", 130 | "text" : "t b i", 131 | "fontsize" : 12.0, 132 | "patching_rect" : [ 250.0, 230.0, 32.5, 20.0 ], 133 | "numinlets" : 1, 134 | "id" : "obj-19", 135 | "fontname" : "Arial", 136 | "numoutlets" : 2, 137 | "outlettype" : [ "bang", "int" ] 138 | } 139 | 140 | } 141 | , { 142 | "box" : { 143 | "maxclass" : "newobj", 144 | "text" : "* 127", 145 | "fontsize" : 12.0, 146 | "patching_rect" : [ 250.0, 200.0, 39.0, 20.0 ], 147 | "numinlets" : 2, 148 | "id" : "obj-13", 149 | "fontname" : "Arial", 150 | "numoutlets" : 1, 151 | "outlettype" : [ "int" ] 152 | } 153 | 154 | } 155 | , { 156 | "box" : { 157 | "maxclass" : "message", 158 | "text" : "mode $1, snap 1", 159 | "fontsize" : 12.0, 160 | "patching_rect" : [ 260.0, 90.0, 100.0, 18.0 ], 161 | "numinlets" : 2, 162 | "id" : "obj-6", 163 | "fontname" : "Arial", 164 | "numoutlets" : 1, 165 | "outlettype" : [ "" ] 166 | } 167 | 168 | } 169 | , { 170 | "box" : { 171 | "maxclass" : "message", 172 | "text" : "set $1", 173 | "fontsize" : 12.0, 174 | "patching_rect" : [ 190.0, 140.0, 50.0, 18.0 ], 175 | "numinlets" : 2, 176 | "id" : "obj-7", 177 | "fontname" : "Arial", 178 | "numoutlets" : 1, 179 | "outlettype" : [ "" ] 180 | } 181 | 182 | } 183 | ], 184 | "lines" : [ { 185 | "patchline" : { 186 | "source" : [ "obj-5", 0 ], 187 | "destination" : [ "obj-11", 0 ], 188 | "hidden" : 0, 189 | "midpoints" : [ ] 190 | } 191 | 192 | } 193 | , { 194 | "patchline" : { 195 | "source" : [ "obj-1", 0 ], 196 | "destination" : [ "obj-7", 0 ], 197 | "hidden" : 0, 198 | "midpoints" : [ ] 199 | } 200 | 201 | } 202 | , { 203 | "patchline" : { 204 | "source" : [ "obj-20", 0 ], 205 | "destination" : [ "obj-23", 0 ], 206 | "hidden" : 0, 207 | "midpoints" : [ ] 208 | } 209 | 210 | } 211 | , { 212 | "patchline" : { 213 | "source" : [ "obj-19", 1 ], 214 | "destination" : [ "obj-20", 1 ], 215 | "hidden" : 0, 216 | "midpoints" : [ ] 217 | } 218 | 219 | } 220 | , { 221 | "patchline" : { 222 | "source" : [ "obj-19", 0 ], 223 | "destination" : [ "obj-20", 0 ], 224 | "hidden" : 0, 225 | "midpoints" : [ ] 226 | } 227 | 228 | } 229 | , { 230 | "patchline" : { 231 | "source" : [ "obj-13", 0 ], 232 | "destination" : [ "obj-19", 0 ], 233 | "hidden" : 0, 234 | "midpoints" : [ ] 235 | } 236 | 237 | } 238 | , { 239 | "patchline" : { 240 | "source" : [ "obj-8", 0 ], 241 | "destination" : [ "obj-6", 0 ], 242 | "hidden" : 0, 243 | "midpoints" : [ ] 244 | } 245 | 246 | } 247 | , { 248 | "patchline" : { 249 | "source" : [ "obj-6", 0 ], 250 | "destination" : [ "obj-3", 0 ], 251 | "hidden" : 0, 252 | "midpoints" : [ ] 253 | } 254 | 255 | } 256 | , { 257 | "patchline" : { 258 | "source" : [ "obj-3", 0 ], 259 | "destination" : [ "obj-13", 0 ], 260 | "hidden" : 0, 261 | "midpoints" : [ ] 262 | } 263 | 264 | } 265 | , { 266 | "patchline" : { 267 | "source" : [ "obj-7", 0 ], 268 | "destination" : [ "obj-3", 0 ], 269 | "hidden" : 0, 270 | "midpoints" : [ ] 271 | } 272 | 273 | } 274 | , { 275 | "patchline" : { 276 | "source" : [ "obj-11", 0 ], 277 | "destination" : [ "obj-3", 0 ], 278 | "hidden" : 0, 279 | "midpoints" : [ ] 280 | } 281 | 282 | } 283 | ] 284 | } 285 | 286 | } 287 | -------------------------------------------------------------------------------- /kslider/oneoctave.bp.maxpat: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "rect" : [ 673.0, 489.0, 844.0, 694.0 ], 5 | "bglocked" : 0, 6 | "defrect" : [ 673.0, 489.0, 844.0, 694.0 ], 7 | "openrect" : [ 0.0, 0.0, 0.0, 0.0 ], 8 | "openinpresentation" : 1, 9 | "default_fontsize" : 12.0, 10 | "default_fontface" : 0, 11 | "default_fontname" : "Arial", 12 | "gridonopen" : 0, 13 | "gridsize" : [ 10.0, 10.0 ], 14 | "gridsnaponopen" : 0, 15 | "toolbarvisible" : 1, 16 | "boxanimatetime" : 200, 17 | "imprint" : 0, 18 | "enablehscroll" : 1, 19 | "enablevscroll" : 1, 20 | "devicewidth" : 0.0, 21 | "boxes" : [ { 22 | "box" : { 23 | "maxclass" : "newobj", 24 | "text" : "loadmess 127", 25 | "fontsize" : 12.0, 26 | "patching_rect" : [ 390.0, 420.0, 85.0, 20.0 ], 27 | "numinlets" : 1, 28 | "id" : "obj-17", 29 | "fontname" : "Arial", 30 | "numoutlets" : 1, 31 | "outlettype" : [ "" ] 32 | } 33 | 34 | } 35 | , { 36 | "box" : { 37 | "maxclass" : "inlet", 38 | "patching_rect" : [ 440.0, 260.0, 25.0, 25.0 ], 39 | "numinlets" : 0, 40 | "id" : "obj-16", 41 | "numoutlets" : 1, 42 | "outlettype" : [ "" ], 43 | "comment" : "" 44 | } 45 | 46 | } 47 | , { 48 | "box" : { 49 | "maxclass" : "newobj", 50 | "text" : "if $i1 == 127 then $i2 else $i1", 51 | "fontsize" : 12.0, 52 | "patching_rect" : [ 140.0, 490.0, 167.0, 20.0 ], 53 | "numinlets" : 2, 54 | "id" : "obj-15", 55 | "fontname" : "Arial", 56 | "numoutlets" : 1, 57 | "outlettype" : [ "" ] 58 | } 59 | 60 | } 61 | , { 62 | "box" : { 63 | "maxclass" : "inlet", 64 | "patching_rect" : [ 390.0, 260.0, 25.0, 25.0 ], 65 | "numinlets" : 0, 66 | "id" : "obj-14", 67 | "numoutlets" : 1, 68 | "outlettype" : [ "" ], 69 | "comment" : "" 70 | } 71 | 72 | } 73 | , { 74 | "box" : { 75 | "maxclass" : "newobj", 76 | "text" : "loadbang", 77 | "fontsize" : 12.0, 78 | "patching_rect" : [ 240.0, 60.0, 60.0, 20.0 ], 79 | "numinlets" : 1, 80 | "id" : "obj-6", 81 | "fontname" : "Arial", 82 | "numoutlets" : 1, 83 | "outlettype" : [ "bang" ] 84 | } 85 | 86 | } 87 | , { 88 | "box" : { 89 | "maxclass" : "newobj", 90 | "text" : "patcherargs 0", 91 | "fontsize" : 12.0, 92 | "patching_rect" : [ 240.0, 90.0, 84.0, 20.0 ], 93 | "numinlets" : 1, 94 | "id" : "obj-5", 95 | "fontname" : "Arial", 96 | "numoutlets" : 2, 97 | "outlettype" : [ "", "" ] 98 | } 99 | 100 | } 101 | , { 102 | "box" : { 103 | "maxclass" : "newobj", 104 | "text" : "if $i1 >= $i2 && $i1 < $i2 + 12 then $i1", 105 | "fontsize" : 12.0, 106 | "patching_rect" : [ 70.0, 140.0, 214.0, 20.0 ], 107 | "numinlets" : 2, 108 | "id" : "obj-1", 109 | "fontname" : "Arial", 110 | "numoutlets" : 1, 111 | "outlettype" : [ "" ] 112 | } 113 | 114 | } 115 | , { 116 | "box" : { 117 | "maxclass" : "newobj", 118 | "text" : "> 0", 119 | "fontsize" : 12.0, 120 | "patching_rect" : [ 110.0, 190.0, 32.5, 20.0 ], 121 | "numinlets" : 2, 122 | "id" : "obj-11", 123 | "fontname" : "Arial", 124 | "numoutlets" : 1, 125 | "outlettype" : [ "int" ] 126 | } 127 | 128 | } 129 | , { 130 | "box" : { 131 | "maxclass" : "newobj", 132 | "text" : "pack i i", 133 | "fontsize" : 12.0, 134 | "patching_rect" : [ 70.0, 220.0, 48.0, 20.0 ], 135 | "numinlets" : 2, 136 | "id" : "obj-10", 137 | "fontname" : "Arial", 138 | "numoutlets" : 1, 139 | "outlettype" : [ "" ] 140 | } 141 | 142 | } 143 | , { 144 | "box" : { 145 | "maxclass" : "newobj", 146 | "text" : "unpack i i", 147 | "fontsize" : 12.0, 148 | "patching_rect" : [ 70.0, 80.0, 61.0, 20.0 ], 149 | "numinlets" : 1, 150 | "id" : "obj-9", 151 | "fontname" : "Arial", 152 | "numoutlets" : 2, 153 | "outlettype" : [ "int", "int" ] 154 | } 155 | 156 | } 157 | , { 158 | "box" : { 159 | "maxclass" : "newobj", 160 | "text" : "- #1", 161 | "fontsize" : 12.0, 162 | "patching_rect" : [ 70.0, 190.0, 32.5, 20.0 ], 163 | "numinlets" : 2, 164 | "id" : "obj-8", 165 | "fontname" : "Arial", 166 | "numoutlets" : 1, 167 | "outlettype" : [ "int" ] 168 | } 169 | 170 | } 171 | , { 172 | "box" : { 173 | "maxclass" : "newobj", 174 | "text" : "route 0 1 2 3 4 5 6 7 8 9 10 11", 175 | "fontsize" : 12.0, 176 | "patching_rect" : [ 70.0, 250.0, 181.0, 20.0 ], 177 | "numinlets" : 1, 178 | "id" : "obj-4", 179 | "fontname" : "Arial", 180 | "numoutlets" : 13, 181 | "outlettype" : [ "", "", "", "", "", "", "", "", "", "", "", "", "" ] 182 | } 183 | 184 | } 185 | , { 186 | "box" : { 187 | "maxclass" : "inlet", 188 | "patching_rect" : [ 70.0, 40.0, 25.0, 25.0 ], 189 | "numinlets" : 0, 190 | "id" : "obj-3", 191 | "numoutlets" : 1, 192 | "outlettype" : [ "" ], 193 | "comment" : "" 194 | } 195 | 196 | } 197 | , { 198 | "box" : { 199 | "maxclass" : "inlet", 200 | "patching_rect" : [ 345.0, 260.0, 25.0, 25.0 ], 201 | "numinlets" : 0, 202 | "id" : "obj-2", 203 | "numoutlets" : 1, 204 | "outlettype" : [ "" ], 205 | "comment" : "" 206 | } 207 | 208 | } 209 | , { 210 | "box" : { 211 | "maxclass" : "outlet", 212 | "patching_rect" : [ 95.0, 570.0, 25.0, 25.0 ], 213 | "numinlets" : 1, 214 | "id" : "obj-41", 215 | "numoutlets" : 0, 216 | "comment" : "" 217 | } 218 | 219 | } 220 | , { 221 | "box" : { 222 | "maxclass" : "newobj", 223 | "text" : "pack i i", 224 | "fontsize" : 12.0, 225 | "patching_rect" : [ 95.0, 520.0, 48.0, 20.0 ], 226 | "numinlets" : 2, 227 | "id" : "obj-40", 228 | "fontname" : "Arial", 229 | "numoutlets" : 1, 230 | "outlettype" : [ "" ] 231 | } 232 | 233 | } 234 | , { 235 | "box" : { 236 | "maxclass" : "newobj", 237 | "text" : "unpack i i", 238 | "fontsize" : 12.0, 239 | "patching_rect" : [ 95.0, 460.0, 61.0, 20.0 ], 240 | "numinlets" : 1, 241 | "id" : "obj-38", 242 | "fontname" : "Arial", 243 | "numoutlets" : 2, 244 | "outlettype" : [ "int", "int" ] 245 | } 246 | 247 | } 248 | , { 249 | "box" : { 250 | "maxclass" : "bpatcher", 251 | "presentation_rect" : [ 73.0, -1.0, 13.0, 45.0 ], 252 | "args" : [ 10, "bkh.png" ], 253 | "patching_rect" : [ 258.0, 300.0, 13.0, 45.0 ], 254 | "presentation" : 1, 255 | "numinlets" : 3, 256 | "name" : "onekey.bp.maxpat", 257 | "id" : "obj-37", 258 | "numoutlets" : 1, 259 | "outlettype" : [ "" ] 260 | } 261 | 262 | } 263 | , { 264 | "box" : { 265 | "maxclass" : "bpatcher", 266 | "presentation_rect" : [ 60.0, -1.0, 13.0, 45.0 ], 267 | "args" : [ 8, "bkh.png" ], 268 | "patching_rect" : [ 245.0, 300.0, 13.0, 45.0 ], 269 | "presentation" : 1, 270 | "numinlets" : 3, 271 | "name" : "onekey.bp.maxpat", 272 | "id" : "obj-35", 273 | "numoutlets" : 1, 274 | "outlettype" : [ "" ] 275 | } 276 | 277 | } 278 | , { 279 | "box" : { 280 | "maxclass" : "bpatcher", 281 | "presentation_rect" : [ 46.0, -1.0, 13.0, 45.0 ], 282 | "args" : [ 6, "bkh.png" ], 283 | "patching_rect" : [ 231.0, 300.0, 13.0, 45.0 ], 284 | "presentation" : 1, 285 | "numinlets" : 3, 286 | "name" : "onekey.bp.maxpat", 287 | "id" : "obj-36", 288 | "numoutlets" : 1, 289 | "outlettype" : [ "" ] 290 | } 291 | 292 | } 293 | , { 294 | "box" : { 295 | "maxclass" : "bpatcher", 296 | "presentation_rect" : [ 22.0, -1.0, 13.0, 45.0 ], 297 | "args" : [ 3, "bkh.png" ], 298 | "patching_rect" : [ 207.0, 300.0, 13.0, 45.0 ], 299 | "presentation" : 1, 300 | "numinlets" : 3, 301 | "name" : "onekey.bp.maxpat", 302 | "id" : "obj-34", 303 | "numoutlets" : 1, 304 | "outlettype" : [ "" ] 305 | } 306 | 307 | } 308 | , { 309 | "box" : { 310 | "maxclass" : "bpatcher", 311 | "presentation_rect" : [ 7.0, -1.0, 13.0, 45.0 ], 312 | "args" : [ 1, "bkh.png" ], 313 | "patching_rect" : [ 192.0, 300.0, 13.0, 45.0 ], 314 | "presentation" : 1, 315 | "numinlets" : 3, 316 | "name" : "onekey.bp.maxpat", 317 | "id" : "obj-33", 318 | "numoutlets" : 1, 319 | "outlettype" : [ "" ] 320 | } 321 | 322 | } 323 | , { 324 | "box" : { 325 | "maxclass" : "bpatcher", 326 | "presentation_rect" : [ 78.0, 0.0, 14.0, 63.0 ], 327 | "args" : [ 11, "wkh.png" ], 328 | "patching_rect" : [ 260.0, 360.0, 14.0, 63.0 ], 329 | "presentation" : 1, 330 | "numinlets" : 3, 331 | "name" : "onekey.bp.maxpat", 332 | "id" : "obj-30", 333 | "numoutlets" : 1, 334 | "outlettype" : [ "" ] 335 | } 336 | 337 | } 338 | , { 339 | "box" : { 340 | "maxclass" : "bpatcher", 341 | "presentation_rect" : [ 65.0, 0.0, 14.0, 63.0 ], 342 | "args" : [ 9, "wkh.png" ], 343 | "patching_rect" : [ 247.0, 360.0, 14.0, 63.0 ], 344 | "presentation" : 1, 345 | "numinlets" : 3, 346 | "name" : "onekey.bp.maxpat", 347 | "id" : "obj-31", 348 | "numoutlets" : 1, 349 | "outlettype" : [ "" ] 350 | } 351 | 352 | } 353 | , { 354 | "box" : { 355 | "maxclass" : "bpatcher", 356 | "presentation_rect" : [ 52.0, 0.0, 14.0, 63.0 ], 357 | "args" : [ 7, "wkh.png" ], 358 | "patching_rect" : [ 234.0, 360.0, 14.0, 63.0 ], 359 | "presentation" : 1, 360 | "numinlets" : 3, 361 | "name" : "onekey.bp.maxpat", 362 | "id" : "obj-32", 363 | "numoutlets" : 1, 364 | "outlettype" : [ "" ] 365 | } 366 | 367 | } 368 | , { 369 | "box" : { 370 | "maxclass" : "bpatcher", 371 | "presentation_rect" : [ 39.0, 0.0, 14.0, 63.0 ], 372 | "args" : [ 5, "wkh.png" ], 373 | "patching_rect" : [ 221.0, 360.0, 14.0, 63.0 ], 374 | "presentation" : 1, 375 | "numinlets" : 3, 376 | "name" : "onekey.bp.maxpat", 377 | "id" : "obj-27", 378 | "numoutlets" : 1, 379 | "outlettype" : [ "" ] 380 | } 381 | 382 | } 383 | , { 384 | "box" : { 385 | "maxclass" : "bpatcher", 386 | "presentation_rect" : [ 26.0, 0.0, 14.0, 63.0 ], 387 | "args" : [ 4, "wkh.png" ], 388 | "patching_rect" : [ 208.0, 360.0, 14.0, 63.0 ], 389 | "presentation" : 1, 390 | "numinlets" : 3, 391 | "name" : "onekey.bp.maxpat", 392 | "id" : "obj-28", 393 | "numoutlets" : 1, 394 | "outlettype" : [ "" ] 395 | } 396 | 397 | } 398 | , { 399 | "box" : { 400 | "maxclass" : "bpatcher", 401 | "presentation_rect" : [ 13.0, 0.0, 14.0, 63.0 ], 402 | "args" : [ 2, "wkh.png" ], 403 | "patching_rect" : [ 195.0, 360.0, 14.0, 63.0 ], 404 | "presentation" : 1, 405 | "numinlets" : 3, 406 | "name" : "onekey.bp.maxpat", 407 | "id" : "obj-26", 408 | "numoutlets" : 1, 409 | "outlettype" : [ "" ] 410 | } 411 | 412 | } 413 | , { 414 | "box" : { 415 | "maxclass" : "bpatcher", 416 | "presentation_rect" : [ 0.0, 0.0, 14.0, 63.0 ], 417 | "args" : [ 0, "wkh.png" ], 418 | "patching_rect" : [ 182.0, 360.0, 14.0, 63.0 ], 419 | "presentation" : 1, 420 | "numinlets" : 3, 421 | "name" : "onekey.bp.maxpat", 422 | "id" : "obj-24", 423 | "numoutlets" : 1, 424 | "outlettype" : [ "" ] 425 | } 426 | 427 | } 428 | , { 429 | "box" : { 430 | "maxclass" : "newobj", 431 | "text" : "+ #1", 432 | "fontsize" : 12.0, 433 | "patching_rect" : [ 95.0, 490.0, 34.0, 20.0 ], 434 | "numinlets" : 2, 435 | "id" : "obj-12", 436 | "fontname" : "Arial", 437 | "numoutlets" : 1, 438 | "outlettype" : [ "int" ] 439 | } 440 | 441 | } 442 | ], 443 | "lines" : [ { 444 | "patchline" : { 445 | "source" : [ "obj-17", 0 ], 446 | "destination" : [ "obj-15", 1 ], 447 | "hidden" : 0, 448 | "midpoints" : [ ] 449 | } 450 | 451 | } 452 | , { 453 | "patchline" : { 454 | "source" : [ "obj-16", 0 ], 455 | "destination" : [ "obj-15", 1 ], 456 | "hidden" : 0, 457 | "midpoints" : [ ] 458 | } 459 | 460 | } 461 | , { 462 | "patchline" : { 463 | "source" : [ "obj-38", 1 ], 464 | "destination" : [ "obj-15", 0 ], 465 | "hidden" : 0, 466 | "midpoints" : [ ] 467 | } 468 | 469 | } 470 | , { 471 | "patchline" : { 472 | "source" : [ "obj-15", 0 ], 473 | "destination" : [ "obj-40", 1 ], 474 | "hidden" : 0, 475 | "midpoints" : [ ] 476 | } 477 | 478 | } 479 | , { 480 | "patchline" : { 481 | "source" : [ "obj-6", 0 ], 482 | "destination" : [ "obj-5", 0 ], 483 | "hidden" : 0, 484 | "midpoints" : [ ] 485 | } 486 | 487 | } 488 | , { 489 | "patchline" : { 490 | "source" : [ "obj-5", 0 ], 491 | "destination" : [ "obj-1", 1 ], 492 | "hidden" : 0, 493 | "midpoints" : [ ] 494 | } 495 | 496 | } 497 | , { 498 | "patchline" : { 499 | "source" : [ "obj-1", 0 ], 500 | "destination" : [ "obj-8", 0 ], 501 | "hidden" : 0, 502 | "midpoints" : [ ] 503 | } 504 | 505 | } 506 | , { 507 | "patchline" : { 508 | "source" : [ "obj-9", 0 ], 509 | "destination" : [ "obj-1", 0 ], 510 | "hidden" : 0, 511 | "midpoints" : [ ] 512 | } 513 | 514 | } 515 | , { 516 | "patchline" : { 517 | "source" : [ "obj-38", 0 ], 518 | "destination" : [ "obj-12", 0 ], 519 | "hidden" : 0, 520 | "midpoints" : [ ] 521 | } 522 | 523 | } 524 | , { 525 | "patchline" : { 526 | "source" : [ "obj-12", 0 ], 527 | "destination" : [ "obj-40", 0 ], 528 | "hidden" : 0, 529 | "midpoints" : [ ] 530 | } 531 | 532 | } 533 | , { 534 | "patchline" : { 535 | "source" : [ "obj-40", 0 ], 536 | "destination" : [ "obj-41", 0 ], 537 | "hidden" : 0, 538 | "midpoints" : [ ] 539 | } 540 | 541 | } 542 | , { 543 | "patchline" : { 544 | "source" : [ "obj-3", 0 ], 545 | "destination" : [ "obj-9", 0 ], 546 | "hidden" : 0, 547 | "midpoints" : [ ] 548 | } 549 | 550 | } 551 | , { 552 | "patchline" : { 553 | "source" : [ "obj-8", 0 ], 554 | "destination" : [ "obj-10", 0 ], 555 | "hidden" : 0, 556 | "midpoints" : [ ] 557 | } 558 | 559 | } 560 | , { 561 | "patchline" : { 562 | "source" : [ "obj-10", 0 ], 563 | "destination" : [ "obj-4", 0 ], 564 | "hidden" : 0, 565 | "midpoints" : [ ] 566 | } 567 | 568 | } 569 | , { 570 | "patchline" : { 571 | "source" : [ "obj-9", 1 ], 572 | "destination" : [ "obj-11", 0 ], 573 | "hidden" : 0, 574 | "midpoints" : [ ] 575 | } 576 | 577 | } 578 | , { 579 | "patchline" : { 580 | "source" : [ "obj-11", 0 ], 581 | "destination" : [ "obj-10", 1 ], 582 | "hidden" : 0, 583 | "midpoints" : [ ] 584 | } 585 | 586 | } 587 | , { 588 | "patchline" : { 589 | "source" : [ "obj-37", 0 ], 590 | "destination" : [ "obj-38", 0 ], 591 | "hidden" : 0, 592 | "midpoints" : [ ] 593 | } 594 | 595 | } 596 | , { 597 | "patchline" : { 598 | "source" : [ "obj-4", 10 ], 599 | "destination" : [ "obj-37", 0 ], 600 | "hidden" : 0, 601 | "midpoints" : [ ] 602 | } 603 | 604 | } 605 | , { 606 | "patchline" : { 607 | "source" : [ "obj-2", 0 ], 608 | "destination" : [ "obj-37", 1 ], 609 | "hidden" : 0, 610 | "midpoints" : [ ] 611 | } 612 | 613 | } 614 | , { 615 | "patchline" : { 616 | "source" : [ "obj-35", 0 ], 617 | "destination" : [ "obj-38", 0 ], 618 | "hidden" : 0, 619 | "midpoints" : [ ] 620 | } 621 | 622 | } 623 | , { 624 | "patchline" : { 625 | "source" : [ "obj-4", 8 ], 626 | "destination" : [ "obj-35", 0 ], 627 | "hidden" : 0, 628 | "midpoints" : [ ] 629 | } 630 | 631 | } 632 | , { 633 | "patchline" : { 634 | "source" : [ "obj-2", 0 ], 635 | "destination" : [ "obj-35", 1 ], 636 | "hidden" : 0, 637 | "midpoints" : [ ] 638 | } 639 | 640 | } 641 | , { 642 | "patchline" : { 643 | "source" : [ "obj-36", 0 ], 644 | "destination" : [ "obj-38", 0 ], 645 | "hidden" : 0, 646 | "midpoints" : [ ] 647 | } 648 | 649 | } 650 | , { 651 | "patchline" : { 652 | "source" : [ "obj-4", 6 ], 653 | "destination" : [ "obj-36", 0 ], 654 | "hidden" : 0, 655 | "midpoints" : [ ] 656 | } 657 | 658 | } 659 | , { 660 | "patchline" : { 661 | "source" : [ "obj-2", 0 ], 662 | "destination" : [ "obj-36", 1 ], 663 | "hidden" : 0, 664 | "midpoints" : [ ] 665 | } 666 | 667 | } 668 | , { 669 | "patchline" : { 670 | "source" : [ "obj-34", 0 ], 671 | "destination" : [ "obj-38", 0 ], 672 | "hidden" : 0, 673 | "midpoints" : [ ] 674 | } 675 | 676 | } 677 | , { 678 | "patchline" : { 679 | "source" : [ "obj-4", 3 ], 680 | "destination" : [ "obj-34", 0 ], 681 | "hidden" : 0, 682 | "midpoints" : [ ] 683 | } 684 | 685 | } 686 | , { 687 | "patchline" : { 688 | "source" : [ "obj-2", 0 ], 689 | "destination" : [ "obj-34", 1 ], 690 | "hidden" : 0, 691 | "midpoints" : [ ] 692 | } 693 | 694 | } 695 | , { 696 | "patchline" : { 697 | "source" : [ "obj-33", 0 ], 698 | "destination" : [ "obj-38", 0 ], 699 | "hidden" : 0, 700 | "midpoints" : [ ] 701 | } 702 | 703 | } 704 | , { 705 | "patchline" : { 706 | "source" : [ "obj-4", 1 ], 707 | "destination" : [ "obj-33", 0 ], 708 | "hidden" : 0, 709 | "midpoints" : [ ] 710 | } 711 | 712 | } 713 | , { 714 | "patchline" : { 715 | "source" : [ "obj-2", 0 ], 716 | "destination" : [ "obj-33", 1 ], 717 | "hidden" : 0, 718 | "midpoints" : [ ] 719 | } 720 | 721 | } 722 | , { 723 | "patchline" : { 724 | "source" : [ "obj-30", 0 ], 725 | "destination" : [ "obj-38", 0 ], 726 | "hidden" : 0, 727 | "midpoints" : [ ] 728 | } 729 | 730 | } 731 | , { 732 | "patchline" : { 733 | "source" : [ "obj-4", 11 ], 734 | "destination" : [ "obj-30", 0 ], 735 | "hidden" : 0, 736 | "midpoints" : [ ] 737 | } 738 | 739 | } 740 | , { 741 | "patchline" : { 742 | "source" : [ "obj-2", 0 ], 743 | "destination" : [ "obj-30", 1 ], 744 | "hidden" : 0, 745 | "midpoints" : [ ] 746 | } 747 | 748 | } 749 | , { 750 | "patchline" : { 751 | "source" : [ "obj-31", 0 ], 752 | "destination" : [ "obj-38", 0 ], 753 | "hidden" : 0, 754 | "midpoints" : [ ] 755 | } 756 | 757 | } 758 | , { 759 | "patchline" : { 760 | "source" : [ "obj-4", 9 ], 761 | "destination" : [ "obj-31", 0 ], 762 | "hidden" : 0, 763 | "midpoints" : [ ] 764 | } 765 | 766 | } 767 | , { 768 | "patchline" : { 769 | "source" : [ "obj-2", 0 ], 770 | "destination" : [ "obj-31", 1 ], 771 | "hidden" : 0, 772 | "midpoints" : [ ] 773 | } 774 | 775 | } 776 | , { 777 | "patchline" : { 778 | "source" : [ "obj-32", 0 ], 779 | "destination" : [ "obj-38", 0 ], 780 | "hidden" : 0, 781 | "midpoints" : [ ] 782 | } 783 | 784 | } 785 | , { 786 | "patchline" : { 787 | "source" : [ "obj-4", 7 ], 788 | "destination" : [ "obj-32", 0 ], 789 | "hidden" : 0, 790 | "midpoints" : [ ] 791 | } 792 | 793 | } 794 | , { 795 | "patchline" : { 796 | "source" : [ "obj-2", 0 ], 797 | "destination" : [ "obj-32", 1 ], 798 | "hidden" : 0, 799 | "midpoints" : [ ] 800 | } 801 | 802 | } 803 | , { 804 | "patchline" : { 805 | "source" : [ "obj-27", 0 ], 806 | "destination" : [ "obj-38", 0 ], 807 | "hidden" : 0, 808 | "midpoints" : [ ] 809 | } 810 | 811 | } 812 | , { 813 | "patchline" : { 814 | "source" : [ "obj-4", 5 ], 815 | "destination" : [ "obj-27", 0 ], 816 | "hidden" : 0, 817 | "midpoints" : [ ] 818 | } 819 | 820 | } 821 | , { 822 | "patchline" : { 823 | "source" : [ "obj-2", 0 ], 824 | "destination" : [ "obj-27", 1 ], 825 | "hidden" : 0, 826 | "midpoints" : [ ] 827 | } 828 | 829 | } 830 | , { 831 | "patchline" : { 832 | "source" : [ "obj-28", 0 ], 833 | "destination" : [ "obj-38", 0 ], 834 | "hidden" : 0, 835 | "midpoints" : [ ] 836 | } 837 | 838 | } 839 | , { 840 | "patchline" : { 841 | "source" : [ "obj-4", 4 ], 842 | "destination" : [ "obj-28", 0 ], 843 | "hidden" : 0, 844 | "midpoints" : [ ] 845 | } 846 | 847 | } 848 | , { 849 | "patchline" : { 850 | "source" : [ "obj-2", 0 ], 851 | "destination" : [ "obj-28", 1 ], 852 | "hidden" : 0, 853 | "midpoints" : [ ] 854 | } 855 | 856 | } 857 | , { 858 | "patchline" : { 859 | "source" : [ "obj-26", 0 ], 860 | "destination" : [ "obj-38", 0 ], 861 | "hidden" : 0, 862 | "midpoints" : [ ] 863 | } 864 | 865 | } 866 | , { 867 | "patchline" : { 868 | "source" : [ "obj-4", 2 ], 869 | "destination" : [ "obj-26", 0 ], 870 | "hidden" : 0, 871 | "midpoints" : [ ] 872 | } 873 | 874 | } 875 | , { 876 | "patchline" : { 877 | "source" : [ "obj-2", 0 ], 878 | "destination" : [ "obj-26", 1 ], 879 | "hidden" : 0, 880 | "midpoints" : [ ] 881 | } 882 | 883 | } 884 | , { 885 | "patchline" : { 886 | "source" : [ "obj-24", 0 ], 887 | "destination" : [ "obj-38", 0 ], 888 | "hidden" : 0, 889 | "midpoints" : [ ] 890 | } 891 | 892 | } 893 | , { 894 | "patchline" : { 895 | "source" : [ "obj-4", 0 ], 896 | "destination" : [ "obj-24", 0 ], 897 | "hidden" : 0, 898 | "midpoints" : [ ] 899 | } 900 | 901 | } 902 | , { 903 | "patchline" : { 904 | "source" : [ "obj-2", 0 ], 905 | "destination" : [ "obj-24", 1 ], 906 | "hidden" : 0, 907 | "midpoints" : [ ] 908 | } 909 | 910 | } 911 | , { 912 | "patchline" : { 913 | "source" : [ "obj-14", 0 ], 914 | "destination" : [ "obj-30", 2 ], 915 | "hidden" : 0, 916 | "midpoints" : [ ] 917 | } 918 | 919 | } 920 | , { 921 | "patchline" : { 922 | "source" : [ "obj-14", 0 ], 923 | "destination" : [ "obj-31", 2 ], 924 | "hidden" : 0, 925 | "midpoints" : [ ] 926 | } 927 | 928 | } 929 | , { 930 | "patchline" : { 931 | "source" : [ "obj-14", 0 ], 932 | "destination" : [ "obj-32", 2 ], 933 | "hidden" : 0, 934 | "midpoints" : [ ] 935 | } 936 | 937 | } 938 | , { 939 | "patchline" : { 940 | "source" : [ "obj-14", 0 ], 941 | "destination" : [ "obj-37", 2 ], 942 | "hidden" : 0, 943 | "midpoints" : [ ] 944 | } 945 | 946 | } 947 | , { 948 | "patchline" : { 949 | "source" : [ "obj-14", 0 ], 950 | "destination" : [ "obj-35", 2 ], 951 | "hidden" : 0, 952 | "midpoints" : [ ] 953 | } 954 | 955 | } 956 | , { 957 | "patchline" : { 958 | "source" : [ "obj-14", 0 ], 959 | "destination" : [ "obj-36", 2 ], 960 | "hidden" : 0, 961 | "midpoints" : [ ] 962 | } 963 | 964 | } 965 | , { 966 | "patchline" : { 967 | "source" : [ "obj-14", 0 ], 968 | "destination" : [ "obj-34", 2 ], 969 | "hidden" : 0, 970 | "midpoints" : [ ] 971 | } 972 | 973 | } 974 | , { 975 | "patchline" : { 976 | "source" : [ "obj-14", 0 ], 977 | "destination" : [ "obj-33", 2 ], 978 | "hidden" : 0, 979 | "midpoints" : [ ] 980 | } 981 | 982 | } 983 | , { 984 | "patchline" : { 985 | "source" : [ "obj-14", 0 ], 986 | "destination" : [ "obj-27", 2 ], 987 | "hidden" : 0, 988 | "midpoints" : [ ] 989 | } 990 | 991 | } 992 | , { 993 | "patchline" : { 994 | "source" : [ "obj-14", 0 ], 995 | "destination" : [ "obj-28", 2 ], 996 | "hidden" : 0, 997 | "midpoints" : [ ] 998 | } 999 | 1000 | } 1001 | , { 1002 | "patchline" : { 1003 | "source" : [ "obj-14", 0 ], 1004 | "destination" : [ "obj-26", 2 ], 1005 | "hidden" : 0, 1006 | "midpoints" : [ ] 1007 | } 1008 | 1009 | } 1010 | , { 1011 | "patchline" : { 1012 | "source" : [ "obj-14", 0 ], 1013 | "destination" : [ "obj-24", 2 ], 1014 | "hidden" : 0, 1015 | "midpoints" : [ ] 1016 | } 1017 | 1018 | } 1019 | ] 1020 | } 1021 | 1022 | } 1023 | -------------------------------------------------------------------------------- /kslider/wkh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olilarkin/olControls/9049aefa7e4d4c41bffdc76bbab86992ec1839cc/kslider/wkh.png -------------------------------------------------------------------------------- /pngknob/knob1-60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olilarkin/olControls/9049aefa7e4d4c41bffdc76bbab86992ec1839cc/pngknob/knob1-60.png -------------------------------------------------------------------------------- /pngknob/knob2-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olilarkin/olControls/9049aefa7e4d4c41bffdc76bbab86992ec1839cc/pngknob/knob2-100.png -------------------------------------------------------------------------------- /pngknob/knob3-63.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olilarkin/olControls/9049aefa7e4d4c41bffdc76bbab86992ec1839cc/pngknob/knob3-63.png -------------------------------------------------------------------------------- /pngknob/knob4-100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/olilarkin/olControls/9049aefa7e4d4c41bffdc76bbab86992ec1839cc/pngknob/knob4-100.png -------------------------------------------------------------------------------- /pngknob/ol.pngknob.js: -------------------------------------------------------------------------------- 1 | /* ol.pngknob.js - a javascript to load a png stitched knob image 2 | v2.0 3 | 4 | http://www.olilarkin.co.uk 5 | 6 | */ 7 | 8 | 9 | // Initialisation ---------------------------- 10 | //------------------------------------------- 11 | inlets = 1; 12 | outlets = 1; 13 | 14 | autowatch = 0; 15 | 16 | mgraphics.init(); 17 | mgraphics.relative_coords = 0; 18 | mgraphics.autofill = 0; 19 | 20 | var imagefile = ""; // path of image or filename 21 | var img = new Image(); // create a new Image 22 | var frames; // number of frames in the stitched image 23 | var frameHeight = img.size[1]/frames; 24 | var yoffset = 0; // the y offset for the current frame 25 | var brgb = [1.,1.,1.,0.]; 26 | var frgb = [0.,0.,0.,1.]; 27 | var pos = 0; // 0-1 for position of knob 28 | var last_x = 0; 29 | var last_y = 0; 30 | var vmin = 0.; 31 | var vmax = 1.; 32 | var vreset = 0.; 33 | var readout = 0; 34 | var dp = 2; 35 | var type = 1; //0 = int, 1 = float 36 | var dispval = vreset; 37 | var val = vreset; // the value that is input/output/displayed 38 | var font = "Arial"; 39 | var fontsize = 10; 40 | var width, height; 41 | 42 | declareattribute("brgb", null, "setbrgb", 1); 43 | declareattribute("frgb", null, "setfrgb", 1); 44 | declareattribute("readout", null, "setreadout", 1); 45 | declareattribute("type", null, "settype", 1); 46 | declareattribute("font",null,"setfont",1); 47 | declareattribute("fontsize",null,"setfontsize",1); 48 | declareattribute("vreset",null,null,1); 49 | declareattribute("vmin",null,null,1); 50 | declareattribute("vmax",null,null,1); 51 | 52 | //declareattribute("font",null,null,1); 53 | frames = jsarguments[2]; 54 | loadImage(jsarguments[1]); 55 | 56 | set(vreset); 57 | 58 | function paint() 59 | { 60 | if(type) //if float 61 | { 62 | dispval = val.toFixed(dp); 63 | } 64 | else // if int 65 | { 66 | dispval = val.toFixed(0); 67 | if (val > -0.5 && val < 0.) dispval = 0.; // avoid -0 68 | } 69 | 70 | var str = "" + dispval + ""; 71 | 72 | with(mgraphics) 73 | { 74 | save(); 75 | set_source_rgba(brgb); 76 | rectangle(0, 0, width, height); 77 | fill(); 78 | restore(); 79 | 80 | save(); 81 | image_surface_draw(img, [0, yoffset,img.size[0],frameHeight], [0, 0,img.size[0],frameHeight] ); 82 | restore(); 83 | 84 | if(readout) 85 | { 86 | select_font_face(font); 87 | set_font_size(fontsize); 88 | set_source_rgba(frgb); 89 | move_to((img.size[0]/2) - text_measure(str)[0] / 2 ,frameHeight+text_measure(str)[1]); 90 | text_path(str); 91 | fill(); 92 | } 93 | 94 | 95 | } 96 | 97 | } 98 | 99 | function loadImage(s) 100 | { 101 | imagefile = s; 102 | img.freepeer(); 103 | img = new Image(s); 104 | frameHeight = img.size[1]/frames; 105 | 106 | //post("" + s + "," + img.size[1] + "," + frames + " "); 107 | 108 | if(img.size[1]/frameHeight != frames) post("check number of frames"); 109 | else onresize(); 110 | } 111 | 112 | function msg_float(v) 113 | { 114 | val = Math.min(Math.max(vmin,v),vmax); 115 | 116 | pos = (val - vmin) / (vmax - vmin); 117 | 118 | var frame = Math.floor(pos*(frames-1)); 119 | 120 | yoffset = Math.floor(frameHeight*frame); 121 | 122 | if(frame>frames/2) yoffset = yoffset; 123 | 124 | notifyclients(); 125 | bang(); 126 | } 127 | 128 | function set(v) 129 | { 130 | val = Math.min(Math.max(vmin,v),vmax); 131 | 132 | pos = (val - vmin) / (vmax - vmin); 133 | 134 | var frame = Math.floor(pos*(frames-1)); 135 | 136 | yoffset = Math.floor(frameHeight*frame); 137 | if(frame>frames/2) yoffset = yoffset; 138 | 139 | notifyclients(); 140 | mgraphics.redraw(); 141 | } 142 | 143 | function bang() 144 | { 145 | mgraphics.redraw(); 146 | outlet(0,val); 147 | } 148 | 149 | function notifydeleted() 150 | { 151 | img.freepeer(); 152 | } 153 | notifydeleted.setlocal = 1; 154 | 155 | function setbrgb(r,g,b,a) 156 | { 157 | brgb = [r,g,b,a]; 158 | mgraphics.redraw(); 159 | } 160 | 161 | function setfrgb(r,g,b,a) 162 | { 163 | frgb = [r,g,b,a]; 164 | mgraphics.redraw(); 165 | } 166 | 167 | function settype(v) 168 | { 169 | type = v; 170 | mgraphics.redraw(); 171 | } 172 | 173 | function setreadout(v) 174 | { 175 | readout = v; 176 | onresize(); 177 | } 178 | 179 | function setfontsize(v) 180 | { 181 | if(v > 5) 182 | { 183 | fontsize = v; 184 | } 185 | else fontsize = 5; 186 | 187 | onresize(); 188 | } 189 | 190 | function setfont(v) 191 | { 192 | font = v; 193 | onresize(); 194 | } 195 | 196 | function setdp(v) 197 | { 198 | dp = v; 199 | mgraphics.redraw(); 200 | } 201 | 202 | function ondrag(x,y,but,cmd,shift,capslock,option,ctrl) 203 | { 204 | var f,dy; 205 | 206 | dy = y - last_y; 207 | if (shift) { 208 | f = pos - dy*0.001; 209 | } else { 210 | f = pos - dy*0.01; 211 | } 212 | msg_float(f * (vmax - vmin) + vmin); 213 | last_x = x; 214 | last_y = y; 215 | } 216 | ondrag.local = 1; 217 | 218 | function onclick(x,y,but,cmd,shift,capslock,option,ctrl) 219 | { 220 | last_x = x; 221 | last_y = y; 222 | } 223 | onclick.local = 1; 224 | 225 | function ondblclick(x,y,but,cmd,shift,capslock,option,ctrl) 226 | { 227 | last_x = x; 228 | last_y = y; 229 | msg_float(vreset); // reset dial? 230 | } 231 | ondblclick.local = 1; 232 | 233 | function onresize() 234 | { 235 | if(readout) box.size(img.size[0],frameHeight + (fontsize * 2)); 236 | else box.size(img.size[0],frameHeight); 237 | 238 | width = box.rect[2]-box.rect[0]; 239 | height = box.rect[3]-box.rect[1]; 240 | 241 | mgraphics.redraw(); 242 | } 243 | onresize.local = 1; //private -------------------------------------------------------------------------------- /pngknob/ol.pngknob.maxhelp: -------------------------------------------------------------------------------- 1 | { 2 | "patcher" : { 3 | "fileversion" : 1, 4 | "appversion" : { 5 | "major" : 6, 6 | "minor" : 0, 7 | "revision" : 2 8 | } 9 | , 10 | "rect" : [ 716.0, 158.0, 752.0, 747.0 ], 11 | "bglocked" : 0, 12 | "openinpresentation" : 0, 13 | "default_fontsize" : 12.0, 14 | "default_fontface" : 0, 15 | "default_fontname" : "Arial", 16 | "gridonopen" : 0, 17 | "gridsize" : [ 15.0, 15.0 ], 18 | "gridsnaponopen" : 0, 19 | "statusbarvisible" : 2, 20 | "toolbarvisible" : 1, 21 | "boxanimatetime" : 200, 22 | "imprint" : 0, 23 | "enablehscroll" : 1, 24 | "enablevscroll" : 1, 25 | "devicewidth" : 0.0, 26 | "description" : "", 27 | "digest" : "", 28 | "tags" : "", 29 | "boxes" : [ { 30 | "box" : { 31 | "border" : 0, 32 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 33 | "filename" : "ol.pngknob.js", 34 | "id" : "obj-42", 35 | "jsarguments" : [ "boss.png", 61 ], 36 | "maxclass" : "jsui", 37 | "numinlets" : 1, 38 | "numoutlets" : 1, 39 | "outlettype" : [ "" ], 40 | "parameter_enable" : 0, 41 | "patching_rect" : [ 581.5, 171.0, 80.0, 80.0 ], 42 | "presentation_rect" : [ 600.0, 435.0, 80.0, 80.0 ] 43 | } 44 | 45 | } 46 | , { 47 | "box" : { 48 | "border" : 0, 49 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 50 | "filename" : "ol.pngknob.js", 51 | "id" : "obj-40", 52 | "jsarguments" : [ "test.png", 69 ], 53 | "maxclass" : "jsui", 54 | "numinlets" : 1, 55 | "numoutlets" : 1, 56 | "outlettype" : [ "" ], 57 | "parameter_enable" : 0, 58 | "patching_rect" : [ 492.0, 438.0, 64.0, 64.0 ], 59 | "presentation_rect" : [ 565.5, 475.0, 64.0, 64.0 ] 60 | } 61 | 62 | } 63 | , { 64 | "box" : { 65 | "border" : 0, 66 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 50 ], [ "frgb", 1, 1, 1, 1 ], [ "brgb", 0.192157, 0.682353, 0.580392, 1 ], [ "vmax", 100 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 67 | "filename" : "ol.pngknob.js", 68 | "id" : "obj-38", 69 | "jsarguments" : [ "knob1-60.png", 60 ], 70 | "maxclass" : "jsui", 71 | "numinlets" : 1, 72 | "numoutlets" : 1, 73 | "outlettype" : [ "" ], 74 | "parameter_enable" : 0, 75 | "patching_rect" : [ 361.0, 636.0, 48.0, 68.0 ], 76 | "presentation_rect" : [ 55.5, 508.0, 48.0, 68.0 ] 77 | } 78 | 79 | } 80 | , { 81 | "box" : { 82 | "border" : 0, 83 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 84 | "filename" : "ol.pngknob.js", 85 | "id" : "obj-36", 86 | "jsarguments" : [ "knob4-100.png", 100 ], 87 | "maxclass" : "jsui", 88 | "numinlets" : 1, 89 | "numoutlets" : 1, 90 | "outlettype" : [ "" ], 91 | "parameter_enable" : 0, 92 | "patching_rect" : [ 190.833344, 602.0, 60.0, 60.0 ], 93 | "presentation_rect" : [ 520.5, 108.0, 60.0, 60.0 ] 94 | } 95 | 96 | } 97 | , { 98 | "box" : { 99 | "border" : 0, 100 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 101 | "filename" : "ol.pngknob.js", 102 | "id" : "obj-35", 103 | "jsarguments" : [ "knob4-100.png", 100 ], 104 | "maxclass" : "jsui", 105 | "numinlets" : 1, 106 | "numoutlets" : 1, 107 | "outlettype" : [ "" ], 108 | "parameter_enable" : 0, 109 | "patching_rect" : [ 122.333336, 602.0, 60.0, 60.0 ], 110 | "presentation_rect" : [ 454.5, 108.0, 60.0, 60.0 ] 111 | } 112 | 113 | } 114 | , { 115 | "box" : { 116 | "border" : 0, 117 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 1, 1, 1, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 118 | "filename" : "ol.pngknob.js", 119 | "id" : "obj-33", 120 | "jsarguments" : [ "knob4-100.png", 100 ], 121 | "maxclass" : "jsui", 122 | "numinlets" : 1, 123 | "numoutlets" : 1, 124 | "outlettype" : [ "" ], 125 | "parameter_enable" : 0, 126 | "patching_rect" : [ 53.833336, 602.0, 60.0, 80.0 ], 127 | "presentation_rect" : [ 512.5, 424.0, 60.0, 80.0 ] 128 | } 129 | 130 | } 131 | , { 132 | "box" : { 133 | "border" : 0, 134 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 135 | "filename" : "ol.pngknob.js", 136 | "id" : "obj-32", 137 | "jsarguments" : [ "knob3-63.png", 63 ], 138 | "maxclass" : "jsui", 139 | "numinlets" : 1, 140 | "numoutlets" : 1, 141 | "outlettype" : [ "" ], 142 | "parameter_enable" : 0, 143 | "patching_rect" : [ 634.5, 328.0, 42.0, 42.0 ], 144 | "presentation_rect" : [ 633.5, 328.0, 42.0, 42.0 ] 145 | } 146 | 147 | } 148 | , { 149 | "box" : { 150 | "border" : 0, 151 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 152 | "filename" : "ol.pngknob.js", 153 | "id" : "obj-31", 154 | "jsarguments" : [ "knob3-63.png", 63 ], 155 | "maxclass" : "jsui", 156 | "numinlets" : 1, 157 | "numoutlets" : 1, 158 | "outlettype" : [ "" ], 159 | "parameter_enable" : 0, 160 | "patching_rect" : [ 592.5, 328.0, 42.0, 42.0 ], 161 | "presentation_rect" : [ 591.5, 328.0, 42.0, 42.0 ] 162 | } 163 | 164 | } 165 | , { 166 | "box" : { 167 | "border" : 0, 168 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 169 | "filename" : "ol.pngknob.js", 170 | "id" : "obj-23", 171 | "jsarguments" : [ "knob3-63.png", 63 ], 172 | "maxclass" : "jsui", 173 | "numinlets" : 1, 174 | "numoutlets" : 1, 175 | "outlettype" : [ "" ], 176 | "parameter_enable" : 0, 177 | "patching_rect" : [ 550.5, 328.0, 42.0, 42.0 ], 178 | "presentation_rect" : [ 577.5, 349.0, 42.0, 42.0 ] 179 | } 180 | 181 | } 182 | , { 183 | "box" : { 184 | "id" : "obj-26", 185 | "maxclass" : "toggle", 186 | "numinlets" : 1, 187 | "numoutlets" : 1, 188 | "outlettype" : [ "int" ], 189 | "parameter_enable" : 0, 190 | "patching_rect" : [ 361.0, 477.0, 20.0, 20.0 ] 191 | } 192 | 193 | } 194 | , { 195 | "box" : { 196 | "fontname" : "Arial", 197 | "fontsize" : 13.0, 198 | "id" : "obj-27", 199 | "maxclass" : "newobj", 200 | "numinlets" : 1, 201 | "numoutlets" : 1, 202 | "outlettype" : [ "" ], 203 | "patcher" : { 204 | "fileversion" : 1, 205 | "appversion" : { 206 | "major" : 6, 207 | "minor" : 0, 208 | "revision" : 2 209 | } 210 | , 211 | "rect" : [ 40.0, 55.0, 453.0, 333.0 ], 212 | "bglocked" : 0, 213 | "openinpresentation" : 0, 214 | "default_fontsize" : 10.0, 215 | "default_fontface" : 0, 216 | "default_fontname" : "Arial", 217 | "gridonopen" : 0, 218 | "gridsize" : [ 15.0, 15.0 ], 219 | "gridsnaponopen" : 0, 220 | "statusbarvisible" : 2, 221 | "toolbarvisible" : 1, 222 | "boxanimatetime" : 200, 223 | "imprint" : 0, 224 | "enablehscroll" : 1, 225 | "enablevscroll" : 1, 226 | "devicewidth" : 0.0, 227 | "description" : "", 228 | "digest" : "", 229 | "tags" : "", 230 | "boxes" : [ { 231 | "box" : { 232 | "fontname" : "Arial", 233 | "fontsize" : 11.595187, 234 | "id" : "obj-18", 235 | "maxclass" : "newobj", 236 | "numinlets" : 1, 237 | "numoutlets" : 1, 238 | "outlettype" : [ "" ], 239 | "patching_rect" : [ 26.0, 209.0, 83.0, 20.0 ], 240 | "text" : "vexpr $i1/255." 241 | } 242 | 243 | } 244 | , { 245 | "box" : { 246 | "comment" : "", 247 | "id" : "obj-1", 248 | "maxclass" : "inlet", 249 | "numinlets" : 0, 250 | "numoutlets" : 1, 251 | "outlettype" : [ "int" ], 252 | "patching_rect" : [ 26.0, 9.0, 25.0, 25.0 ] 253 | } 254 | 255 | } 256 | , { 257 | "box" : { 258 | "comment" : "", 259 | "id" : "obj-2", 260 | "maxclass" : "outlet", 261 | "numinlets" : 1, 262 | "numoutlets" : 0, 263 | "patching_rect" : [ 26.0, 237.0, 25.0, 25.0 ] 264 | } 265 | 266 | } 267 | , { 268 | "box" : { 269 | "fontname" : "Arial", 270 | "fontsize" : 11.595187, 271 | "id" : "obj-3", 272 | "maxclass" : "newobj", 273 | "numinlets" : 4, 274 | "numoutlets" : 1, 275 | "outlettype" : [ "" ], 276 | "patching_rect" : [ 26.0, 186.0, 75.0, 20.0 ], 277 | "text" : "pack i i i 255" 278 | } 279 | 280 | } 281 | , { 282 | "box" : { 283 | "fontname" : "Arial", 284 | "fontsize" : 11.595187, 285 | "id" : "obj-4", 286 | "maxclass" : "newobj", 287 | "numinlets" : 2, 288 | "numoutlets" : 1, 289 | "outlettype" : [ "bang" ], 290 | "patching_rect" : [ 181.5, 82.0, 69.0, 20.0 ], 291 | "text" : "metro 1300" 292 | } 293 | 294 | } 295 | , { 296 | "box" : { 297 | "fontname" : "Arial", 298 | "fontsize" : 11.595187, 299 | "id" : "obj-5", 300 | "maxclass" : "message", 301 | "numinlets" : 2, 302 | "numoutlets" : 1, 303 | "outlettype" : [ "" ], 304 | "patching_rect" : [ 181.5, 132.0, 52.0, 18.0 ], 305 | "text" : "$1 1300" 306 | } 307 | 308 | } 309 | , { 310 | "box" : { 311 | "fontname" : "Arial", 312 | "fontsize" : 11.595187, 313 | "id" : "obj-6", 314 | "maxclass" : "newobj", 315 | "numinlets" : 2, 316 | "numoutlets" : 1, 317 | "outlettype" : [ "int" ], 318 | "patching_rect" : [ 181.5, 107.0, 72.0, 20.0 ], 319 | "text" : "random 256" 320 | } 321 | 322 | } 323 | , { 324 | "box" : { 325 | "fontname" : "Arial", 326 | "fontsize" : 11.595187, 327 | "id" : "obj-7", 328 | "maxclass" : "newobj", 329 | "numinlets" : 3, 330 | "numoutlets" : 2, 331 | "outlettype" : [ "", "" ], 332 | "patching_rect" : [ 181.5, 157.0, 51.0, 20.0 ], 333 | "text" : "line 100" 334 | } 335 | 336 | } 337 | , { 338 | "box" : { 339 | "fontname" : "Arial", 340 | "fontsize" : 11.595187, 341 | "id" : "obj-8", 342 | "maxclass" : "newobj", 343 | "numinlets" : 3, 344 | "numoutlets" : 2, 345 | "outlettype" : [ "", "" ], 346 | "patching_rect" : [ 103.5, 157.333328, 51.0, 20.0 ], 347 | "text" : "line 100" 348 | } 349 | 350 | } 351 | , { 352 | "box" : { 353 | "fontname" : "Arial", 354 | "fontsize" : 11.595187, 355 | "id" : "obj-9", 356 | "maxclass" : "newobj", 357 | "numinlets" : 2, 358 | "numoutlets" : 1, 359 | "outlettype" : [ "int" ], 360 | "patching_rect" : [ 103.5, 107.333336, 72.0, 20.0 ], 361 | "text" : "random 256" 362 | } 363 | 364 | } 365 | , { 366 | "box" : { 367 | "fontname" : "Arial", 368 | "fontsize" : 11.595187, 369 | "id" : "obj-10", 370 | "maxclass" : "message", 371 | "numinlets" : 2, 372 | "numoutlets" : 1, 373 | "outlettype" : [ "" ], 374 | "patching_rect" : [ 103.5, 132.333344, 46.0, 18.0 ], 375 | "text" : "$1 900" 376 | } 377 | 378 | } 379 | , { 380 | "box" : { 381 | "fontname" : "Arial", 382 | "fontsize" : 11.595187, 383 | "id" : "obj-11", 384 | "maxclass" : "newobj", 385 | "numinlets" : 2, 386 | "numoutlets" : 1, 387 | "outlettype" : [ "bang" ], 388 | "patching_rect" : [ 103.5, 82.0, 63.0, 20.0 ], 389 | "text" : "metro 900" 390 | } 391 | 392 | } 393 | , { 394 | "box" : { 395 | "id" : "obj-12", 396 | "maxclass" : "toggle", 397 | "numinlets" : 1, 398 | "numoutlets" : 1, 399 | "outlettype" : [ "int" ], 400 | "parameter_enable" : 0, 401 | "patching_rect" : [ 26.0, 46.0, 20.0, 20.0 ] 402 | } 403 | 404 | } 405 | , { 406 | "box" : { 407 | "fontname" : "Arial", 408 | "fontsize" : 11.595187, 409 | "id" : "obj-13", 410 | "maxclass" : "newobj", 411 | "numinlets" : 2, 412 | "numoutlets" : 1, 413 | "outlettype" : [ "bang" ], 414 | "patching_rect" : [ 26.0, 82.0, 69.0, 20.0 ], 415 | "text" : "metro 1000" 416 | } 417 | 418 | } 419 | , { 420 | "box" : { 421 | "fontname" : "Arial", 422 | "fontsize" : 11.595187, 423 | "id" : "obj-14", 424 | "maxclass" : "message", 425 | "numinlets" : 2, 426 | "numoutlets" : 1, 427 | "outlettype" : [ "" ], 428 | "patching_rect" : [ 26.0, 132.333344, 52.0, 18.0 ], 429 | "text" : "$1 1000" 430 | } 431 | 432 | } 433 | , { 434 | "box" : { 435 | "fontname" : "Arial", 436 | "fontsize" : 11.595187, 437 | "id" : "obj-15", 438 | "maxclass" : "newobj", 439 | "numinlets" : 2, 440 | "numoutlets" : 1, 441 | "outlettype" : [ "int" ], 442 | "patching_rect" : [ 26.0, 107.333336, 72.0, 20.0 ], 443 | "text" : "random 256" 444 | } 445 | 446 | } 447 | , { 448 | "box" : { 449 | "fontname" : "Arial", 450 | "fontsize" : 11.595187, 451 | "id" : "obj-16", 452 | "maxclass" : "newobj", 453 | "numinlets" : 3, 454 | "numoutlets" : 2, 455 | "outlettype" : [ "", "" ], 456 | "patching_rect" : [ 26.0, 157.333328, 51.0, 20.0 ], 457 | "text" : "line 100" 458 | } 459 | 460 | } 461 | , { 462 | "box" : { 463 | "fontname" : "Arial", 464 | "fontsize" : 11.595187, 465 | "id" : "obj-17", 466 | "maxclass" : "comment", 467 | "numinlets" : 1, 468 | "numoutlets" : 0, 469 | "patching_rect" : [ 59.0, 45.0, 185.0, 20.0 ], 470 | "text" : "<- turn on mood machine" 471 | } 472 | 473 | } 474 | ], 475 | "lines" : [ { 476 | "patchline" : { 477 | "destination" : [ "obj-12", 0 ], 478 | "disabled" : 0, 479 | "hidden" : 0, 480 | "source" : [ "obj-1", 0 ] 481 | } 482 | 483 | } 484 | , { 485 | "patchline" : { 486 | "destination" : [ "obj-8", 0 ], 487 | "disabled" : 0, 488 | "hidden" : 0, 489 | "source" : [ "obj-10", 0 ] 490 | } 491 | 492 | } 493 | , { 494 | "patchline" : { 495 | "destination" : [ "obj-9", 0 ], 496 | "disabled" : 0, 497 | "hidden" : 0, 498 | "source" : [ "obj-11", 0 ] 499 | } 500 | 501 | } 502 | , { 503 | "patchline" : { 504 | "destination" : [ "obj-11", 0 ], 505 | "disabled" : 0, 506 | "hidden" : 0, 507 | "source" : [ "obj-12", 0 ] 508 | } 509 | 510 | } 511 | , { 512 | "patchline" : { 513 | "destination" : [ "obj-13", 0 ], 514 | "disabled" : 0, 515 | "hidden" : 0, 516 | "source" : [ "obj-12", 0 ] 517 | } 518 | 519 | } 520 | , { 521 | "patchline" : { 522 | "destination" : [ "obj-4", 0 ], 523 | "disabled" : 0, 524 | "hidden" : 0, 525 | "source" : [ "obj-12", 0 ] 526 | } 527 | 528 | } 529 | , { 530 | "patchline" : { 531 | "destination" : [ "obj-15", 0 ], 532 | "disabled" : 0, 533 | "hidden" : 0, 534 | "source" : [ "obj-13", 0 ] 535 | } 536 | 537 | } 538 | , { 539 | "patchline" : { 540 | "destination" : [ "obj-16", 0 ], 541 | "disabled" : 0, 542 | "hidden" : 0, 543 | "source" : [ "obj-14", 0 ] 544 | } 545 | 546 | } 547 | , { 548 | "patchline" : { 549 | "destination" : [ "obj-14", 0 ], 550 | "disabled" : 0, 551 | "hidden" : 0, 552 | "source" : [ "obj-15", 0 ] 553 | } 554 | 555 | } 556 | , { 557 | "patchline" : { 558 | "destination" : [ "obj-3", 0 ], 559 | "disabled" : 0, 560 | "hidden" : 0, 561 | "source" : [ "obj-16", 0 ] 562 | } 563 | 564 | } 565 | , { 566 | "patchline" : { 567 | "destination" : [ "obj-2", 0 ], 568 | "disabled" : 0, 569 | "hidden" : 0, 570 | "source" : [ "obj-18", 0 ] 571 | } 572 | 573 | } 574 | , { 575 | "patchline" : { 576 | "destination" : [ "obj-18", 0 ], 577 | "disabled" : 0, 578 | "hidden" : 0, 579 | "source" : [ "obj-3", 0 ] 580 | } 581 | 582 | } 583 | , { 584 | "patchline" : { 585 | "destination" : [ "obj-6", 0 ], 586 | "disabled" : 0, 587 | "hidden" : 0, 588 | "source" : [ "obj-4", 0 ] 589 | } 590 | 591 | } 592 | , { 593 | "patchline" : { 594 | "destination" : [ "obj-7", 0 ], 595 | "disabled" : 0, 596 | "hidden" : 0, 597 | "source" : [ "obj-5", 0 ] 598 | } 599 | 600 | } 601 | , { 602 | "patchline" : { 603 | "destination" : [ "obj-5", 0 ], 604 | "disabled" : 0, 605 | "hidden" : 0, 606 | "source" : [ "obj-6", 0 ] 607 | } 608 | 609 | } 610 | , { 611 | "patchline" : { 612 | "destination" : [ "obj-3", 2 ], 613 | "disabled" : 0, 614 | "hidden" : 0, 615 | "source" : [ "obj-7", 0 ] 616 | } 617 | 618 | } 619 | , { 620 | "patchline" : { 621 | "destination" : [ "obj-3", 1 ], 622 | "disabled" : 0, 623 | "hidden" : 0, 624 | "source" : [ "obj-8", 0 ] 625 | } 626 | 627 | } 628 | , { 629 | "patchline" : { 630 | "destination" : [ "obj-10", 0 ], 631 | "disabled" : 0, 632 | "hidden" : 0, 633 | "source" : [ "obj-9", 0 ] 634 | } 635 | 636 | } 637 | ], 638 | "dependency_cache" : [ ] 639 | } 640 | , 641 | "patching_rect" : [ 361.0, 515.0, 111.0, 21.0 ], 642 | "saved_object_attributes" : { 643 | "default_fontname" : "Arial", 644 | "fontname" : "Arial", 645 | "default_fontsize" : 10.0, 646 | "description" : "", 647 | "globalpatchername" : "", 648 | "tags" : "", 649 | "fontface" : 0, 650 | "fontsize" : 10.0, 651 | "default_fontface" : 0, 652 | "digest" : "" 653 | } 654 | , 655 | "text" : "p mood_machine" 656 | } 657 | 658 | } 659 | , { 660 | "box" : { 661 | "fontname" : "Arial", 662 | "fontsize" : 12.0, 663 | "id" : "obj-8", 664 | "maxclass" : "message", 665 | "numinlets" : 2, 666 | "numoutlets" : 1, 667 | "outlettype" : [ "" ], 668 | "patching_rect" : [ 490.0, 273.0, 66.0, 18.0 ], 669 | "text" : "font Times" 670 | } 671 | 672 | } 673 | , { 674 | "box" : { 675 | "fontname" : "Arial", 676 | "fontsize" : 12.0, 677 | "id" : "obj-29", 678 | "maxclass" : "message", 679 | "numinlets" : 2, 680 | "numoutlets" : 1, 681 | "outlettype" : [ "" ], 682 | "patching_rect" : [ 464.0, 238.0, 77.0, 18.0 ], 683 | "text" : "font Monaco" 684 | } 685 | 686 | } 687 | , { 688 | "box" : { 689 | "fontname" : "Arial", 690 | "fontsize" : 12.0, 691 | "id" : "obj-28", 692 | "maxclass" : "message", 693 | "numinlets" : 2, 694 | "numoutlets" : 1, 695 | "outlettype" : [ "" ], 696 | "patching_rect" : [ 412.0, 197.0, 57.0, 18.0 ], 697 | "text" : "font Arial" 698 | } 699 | 700 | } 701 | , { 702 | "box" : { 703 | "fontname" : "Arial", 704 | "fontsize" : 12.0, 705 | "id" : "obj-22", 706 | "maxclass" : "comment", 707 | "numinlets" : 1, 708 | "numoutlets" : 0, 709 | "patching_rect" : [ 246.0, 134.0, 94.0, 20.0 ], 710 | "text" : "0 = int, 1 = float" 711 | } 712 | 713 | } 714 | , { 715 | "box" : { 716 | "id" : "obj-24", 717 | "maxclass" : "toggle", 718 | "numinlets" : 1, 719 | "numoutlets" : 1, 720 | "outlettype" : [ "int" ], 721 | "parameter_enable" : 0, 722 | "patching_rect" : [ 221.5, 134.0, 20.0, 20.0 ] 723 | } 724 | 725 | } 726 | , { 727 | "box" : { 728 | "fontname" : "Arial", 729 | "fontsize" : 12.0, 730 | "id" : "obj-25", 731 | "maxclass" : "message", 732 | "numinlets" : 2, 733 | "numoutlets" : 1, 734 | "outlettype" : [ "" ], 735 | "patching_rect" : [ 221.5, 171.0, 50.0, 18.0 ], 736 | "text" : "type $1" 737 | } 738 | 739 | } 740 | , { 741 | "box" : { 742 | "fontface" : 3, 743 | "fontname" : "Arial", 744 | "fontsize" : 20.871338, 745 | "id" : "obj-110", 746 | "maxclass" : "comment", 747 | "numinlets" : 1, 748 | "numoutlets" : 0, 749 | "patching_rect" : [ 9.0, 9.0, 705.0, 30.0 ], 750 | "text" : "ol.pngknob.js", 751 | "varname" : "autohelp_top_title" 752 | } 753 | 754 | } 755 | , { 756 | "box" : { 757 | "fontname" : "Arial", 758 | "fontsize" : 12.754705, 759 | "id" : "obj-111", 760 | "maxclass" : "comment", 761 | "numinlets" : 1, 762 | "numoutlets" : 0, 763 | "patching_rect" : [ 9.0, 41.0, 705.0, 21.0 ], 764 | "text" : "jsui vertically stiched png based control", 765 | "varname" : "autohelp_top_digest" 766 | } 767 | 768 | } 769 | , { 770 | "box" : { 771 | "border" : 0, 772 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 773 | "filename" : "ol.pngknob.js", 774 | "id" : "obj-18", 775 | "jsarguments" : [ "knob2-100.png", 100 ], 776 | "maxclass" : "jsui", 777 | "numinlets" : 1, 778 | "numoutlets" : 1, 779 | "outlettype" : [ "" ], 780 | "parameter_enable" : 0, 781 | "patching_rect" : [ 284.5, 512.0, 27.0, 27.0 ], 782 | "presentation_rect" : [ 250.0, 326.0, 27.0, 27.0 ] 783 | } 784 | 785 | } 786 | , { 787 | "box" : { 788 | "border" : 0, 789 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 790 | "filename" : "ol.pngknob.js", 791 | "id" : "obj-20", 792 | "jsarguments" : [ "knob2-100.png", 100 ], 793 | "maxclass" : "jsui", 794 | "numinlets" : 1, 795 | "numoutlets" : 1, 796 | "outlettype" : [ "" ], 797 | "parameter_enable" : 0, 798 | "patching_rect" : [ 253.5, 512.0, 27.0, 27.0 ], 799 | "presentation_rect" : [ 219.0, 326.0, 27.0, 27.0 ] 800 | } 801 | 802 | } 803 | , { 804 | "box" : { 805 | "border" : 0, 806 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 807 | "filename" : "ol.pngknob.js", 808 | "id" : "obj-21", 809 | "jsarguments" : [ "knob2-100.png", 100 ], 810 | "maxclass" : "jsui", 811 | "numinlets" : 1, 812 | "numoutlets" : 1, 813 | "outlettype" : [ "" ], 814 | "parameter_enable" : 0, 815 | "patching_rect" : [ 221.5, 512.0, 27.0, 27.0 ], 816 | "presentation_rect" : [ 187.0, 326.0, 27.0, 27.0 ] 817 | } 818 | 819 | } 820 | , { 821 | "box" : { 822 | "border" : 0, 823 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 824 | "filename" : "ol.pngknob.js", 825 | "id" : "obj-16", 826 | "jsarguments" : [ "knob2-100.png", 100 ], 827 | "maxclass" : "jsui", 828 | "numinlets" : 1, 829 | "numoutlets" : 1, 830 | "outlettype" : [ "" ], 831 | "parameter_enable" : 0, 832 | "patching_rect" : [ 284.5, 477.0, 27.0, 27.0 ], 833 | "presentation_rect" : [ 245.0, 299.0, 27.0, 27.0 ] 834 | } 835 | 836 | } 837 | , { 838 | "box" : { 839 | "border" : 0, 840 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 841 | "filename" : "ol.pngknob.js", 842 | "id" : "obj-15", 843 | "jsarguments" : [ "knob2-100.png", 100 ], 844 | "maxclass" : "jsui", 845 | "numinlets" : 1, 846 | "numoutlets" : 1, 847 | "outlettype" : [ "" ], 848 | "parameter_enable" : 0, 849 | "patching_rect" : [ 253.5, 477.0, 27.0, 27.0 ], 850 | "presentation_rect" : [ 218.0, 300.0, 27.0, 27.0 ] 851 | } 852 | 853 | } 854 | , { 855 | "box" : { 856 | "border" : 0, 857 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 858 | "filename" : "ol.pngknob.js", 859 | "id" : "obj-14", 860 | "jsarguments" : [ "knob1-60.png", 60 ], 861 | "maxclass" : "jsui", 862 | "numinlets" : 1, 863 | "numoutlets" : 1, 864 | "outlettype" : [ "" ], 865 | "parameter_enable" : 0, 866 | "patching_rect" : [ 457.5, 328.0, 48.0, 68.0 ], 867 | "presentation_rect" : [ 443.5, 191.0, 48.0, 68.0 ] 868 | } 869 | 870 | } 871 | , { 872 | "box" : { 873 | "border" : 0, 874 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 875 | "filename" : "ol.pngknob.js", 876 | "id" : "obj-13", 877 | "jsarguments" : [ "knob1-60.png", 60 ], 878 | "maxclass" : "jsui", 879 | "numinlets" : 1, 880 | "numoutlets" : 1, 881 | "outlettype" : [ "" ], 882 | "parameter_enable" : 0, 883 | "patching_rect" : [ 396.833344, 328.0, 48.0, 68.0 ], 884 | "presentation_rect" : [ 384.0, 186.0, 48.0, 68.0 ] 885 | } 886 | 887 | } 888 | , { 889 | "box" : { 890 | "border" : 0, 891 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 892 | "filename" : "ol.pngknob.js", 893 | "id" : "obj-12", 894 | "jsarguments" : [ "knob1-60.png", 60 ], 895 | "maxclass" : "jsui", 896 | "numinlets" : 1, 897 | "numoutlets" : 1, 898 | "outlettype" : [ "" ], 899 | "parameter_enable" : 0, 900 | "patching_rect" : [ 344.333344, 328.0, 48.0, 68.0 ], 901 | "presentation_rect" : [ 331.0, 186.0, 48.0, 68.0 ] 902 | } 903 | 904 | } 905 | , { 906 | "box" : { 907 | "border" : 0, 908 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 909 | "filename" : "ol.pngknob.js", 910 | "id" : "obj-10", 911 | "jsarguments" : [ "knob1-60.png", 60 ], 912 | "maxclass" : "jsui", 913 | "numinlets" : 1, 914 | "numoutlets" : 1, 915 | "outlettype" : [ "" ], 916 | "parameter_enable" : 0, 917 | "patching_rect" : [ 297.333344, 328.0, 48.0, 68.0 ], 918 | "presentation_rect" : [ 285.0, 189.0, 48.0, 68.0 ] 919 | } 920 | 921 | } 922 | , { 923 | "box" : { 924 | "border" : 0, 925 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 926 | "filename" : "ol.pngknob.js", 927 | "id" : "obj-7", 928 | "jsarguments" : [ "knob1-60.png", 60 ], 929 | "maxclass" : "jsui", 930 | "numinlets" : 1, 931 | "numoutlets" : 1, 932 | "outlettype" : [ "" ], 933 | "parameter_enable" : 0, 934 | "patching_rect" : [ 243.333344, 328.0, 48.0, 68.0 ], 935 | "presentation_rect" : [ 228.5, 188.0, 48.0, 68.0 ] 936 | } 937 | 938 | } 939 | , { 940 | "box" : { 941 | "border" : 0, 942 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 943 | "filename" : "ol.pngknob.js", 944 | "id" : "obj-6", 945 | "jsarguments" : [ "knob1-60.png", 60 ], 946 | "maxclass" : "jsui", 947 | "numinlets" : 1, 948 | "numoutlets" : 1, 949 | "outlettype" : [ "" ], 950 | "parameter_enable" : 0, 951 | "patching_rect" : [ 190.833344, 328.0, 48.0, 68.0 ], 952 | "presentation_rect" : [ 179.5, 190.0, 48.0, 68.0 ] 953 | } 954 | 955 | } 956 | , { 957 | "box" : { 958 | "border" : 0, 959 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 0 ], [ "frgb", 0, 0, 0, 0 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 1 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 0 ] ], 960 | "filename" : "ol.pngknob.js", 961 | "id" : "obj-1", 962 | "jsarguments" : [ "knob2-100.png", 100 ], 963 | "maxclass" : "jsui", 964 | "numinlets" : 1, 965 | "numoutlets" : 1, 966 | "outlettype" : [ "" ], 967 | "parameter_enable" : 0, 968 | "patching_rect" : [ 221.5, 477.0, 27.0, 27.0 ], 969 | "presentation_rect" : [ 85.0, 273.5, 27.0, 27.0 ] 970 | } 971 | 972 | } 973 | , { 974 | "box" : { 975 | "fontname" : "Arial", 976 | "fontsize" : 12.0, 977 | "id" : "obj-19", 978 | "maxclass" : "flonum", 979 | "numinlets" : 1, 980 | "numoutlets" : 2, 981 | "outlettype" : [ "float", "bang" ], 982 | "parameter_enable" : 0, 983 | "patching_rect" : [ 101.0, 171.0, 50.0, 20.0 ] 984 | } 985 | 986 | } 987 | , { 988 | "box" : { 989 | "fontname" : "Arial", 990 | "fontsize" : 12.0, 991 | "id" : "obj-17", 992 | "maxclass" : "message", 993 | "numinlets" : 2, 994 | "numoutlets" : 1, 995 | "outlettype" : [ "" ], 996 | "patching_rect" : [ 101.0, 217.0, 69.0, 18.0 ], 997 | "text" : "fontsize $1" 998 | } 999 | 1000 | } 1001 | , { 1002 | "box" : { 1003 | "id" : "obj-11", 1004 | "maxclass" : "toggle", 1005 | "numinlets" : 1, 1006 | "numoutlets" : 1, 1007 | "outlettype" : [ "int" ], 1008 | "parameter_enable" : 0, 1009 | "patching_rect" : [ 284.5, 197.0, 20.0, 20.0 ] 1010 | } 1011 | 1012 | } 1013 | , { 1014 | "box" : { 1015 | "fontname" : "Arial", 1016 | "fontsize" : 12.0, 1017 | "id" : "obj-9", 1018 | "maxclass" : "message", 1019 | "numinlets" : 2, 1020 | "numoutlets" : 1, 1021 | "outlettype" : [ "" ], 1022 | "patching_rect" : [ 284.5, 232.0, 68.0, 18.0 ], 1023 | "text" : "readout $1" 1024 | } 1025 | 1026 | } 1027 | , { 1028 | "box" : { 1029 | "fontname" : "Arial", 1030 | "fontsize" : 12.0, 1031 | "id" : "obj-4", 1032 | "maxclass" : "flonum", 1033 | "numinlets" : 1, 1034 | "numoutlets" : 2, 1035 | "outlettype" : [ "float", "bang" ], 1036 | "parameter_enable" : 0, 1037 | "patching_rect" : [ 37.0, 221.0, 50.0, 20.0 ] 1038 | } 1039 | 1040 | } 1041 | , { 1042 | "box" : { 1043 | "fontname" : "Arial", 1044 | "fontsize" : 12.0, 1045 | "id" : "obj-3", 1046 | "maxclass" : "flonum", 1047 | "numinlets" : 1, 1048 | "numoutlets" : 2, 1049 | "outlettype" : [ "float", "bang" ], 1050 | "parameter_enable" : 0, 1051 | "patching_rect" : [ 139.5, 416.25, 50.0, 20.0 ] 1052 | } 1053 | 1054 | } 1055 | , { 1056 | "box" : { 1057 | "border" : 0, 1058 | "embedstate" : [ [ "vmin", 0 ], [ "vreset", 50 ], [ "frgb", 0, 0, 0, 1 ], [ "brgb", 1, 1, 1, 0 ], [ "vmax", 100 ], [ "type", 1 ], [ "font", "Arial" ], [ "fontsize", 10 ], [ "readout", 1 ] ], 1059 | "filename" : "ol.pngknob.js", 1060 | "id" : "obj-130", 1061 | "jsarguments" : [ "knob1-60.png", 60 ], 1062 | "maxclass" : "jsui", 1063 | "numinlets" : 1, 1064 | "numoutlets" : 1, 1065 | "outlettype" : [ "" ], 1066 | "parameter_enable" : 0, 1067 | "patching_rect" : [ 139.5, 328.0, 48.0, 68.0 ], 1068 | "presentation_rect" : [ 390.0, 390.0, 48.0, 68.0 ] 1069 | } 1070 | 1071 | } 1072 | , { 1073 | "box" : { 1074 | "grad1" : [ 0.0, 0.096331, 0.929412, 1.0 ], 1075 | "grad2" : [ 0.8995, 0.899114, 0.989796, 1.0 ], 1076 | "id" : "obj-2", 1077 | "ignoreclick" : 1, 1078 | "maxclass" : "panel", 1079 | "mode" : 1, 1080 | "numinlets" : 1, 1081 | "numoutlets" : 0, 1082 | "patching_rect" : [ 133.0, 322.5, 382.0, 73.5 ] 1083 | } 1084 | 1085 | } 1086 | , { 1087 | "box" : { 1088 | "bgcolor" : [ 0.192157, 0.682353, 0.580392, 1.0 ], 1089 | "grad1" : [ 0.0, 0.096331, 0.929412, 1.0 ], 1090 | "grad2" : [ 0.8995, 0.899114, 0.989796, 1.0 ], 1091 | "id" : "obj-5", 1092 | "ignoreclick" : 1, 1093 | "maxclass" : "panel", 1094 | "numinlets" : 1, 1095 | "numoutlets" : 0, 1096 | "patching_rect" : [ 209.0, 469.0, 116.0, 78.0 ] 1097 | } 1098 | 1099 | } 1100 | , { 1101 | "box" : { 1102 | "background" : 1, 1103 | "bgcolor" : [ 1.0, 0.701961, 0.0, 1.0 ], 1104 | "grad1" : [ 0.86, 0.86, 0.75, 1.0 ], 1105 | "grad2" : [ 0.78, 0.84, 0.86, 0.7 ], 1106 | "id" : "obj-114", 1107 | "ignoreclick" : 1, 1108 | "maxclass" : "panel", 1109 | "numinlets" : 1, 1110 | "numoutlets" : 0, 1111 | "patching_rect" : [ 4.0, 6.0, 709.0, 60.0 ], 1112 | "varname" : "autohelp_top_panel" 1113 | } 1114 | 1115 | } 1116 | , { 1117 | "box" : { 1118 | "attr" : "bgcolor", 1119 | "fontname" : "Arial", 1120 | "fontsize" : 12.0, 1121 | "id" : "obj-30", 1122 | "maxclass" : "attrui", 1123 | "numinlets" : 1, 1124 | "numoutlets" : 1, 1125 | "outlettype" : [ "" ], 1126 | "patching_rect" : [ 209.0, 439.0, 150.0, 20.0 ] 1127 | } 1128 | 1129 | } 1130 | , { 1131 | "box" : { 1132 | "attr" : "frgb", 1133 | "fontname" : "Arial", 1134 | "fontsize" : 12.0, 1135 | "id" : "obj-39", 1136 | "maxclass" : "attrui", 1137 | "numinlets" : 1, 1138 | "numoutlets" : 1, 1139 | "outlettype" : [ "" ], 1140 | "patching_rect" : [ 400.5, 590.0, 249.0, 20.0 ] 1141 | } 1142 | 1143 | } 1144 | , { 1145 | "box" : { 1146 | "bgcolor" : [ 0.666667, 0.666667, 0.666667, 0.0 ], 1147 | "border" : 2, 1148 | "bordercolor" : [ 0.835766, 0.835766, 0.835766, 1.0 ], 1149 | "id" : "obj-37", 1150 | "ignoreclick" : 1, 1151 | "maxclass" : "panel", 1152 | "numinlets" : 1, 1153 | "numoutlets" : 0, 1154 | "patching_rect" : [ 44.666672, 590.0, 215.333328, 96.0 ], 1155 | "rounded" : 15 1156 | } 1157 | 1158 | } 1159 | , { 1160 | "box" : { 1161 | "bgcolor" : [ 0.030612, 0.030612, 0.030612, 1.0 ], 1162 | "grad1" : [ 0.368613, 0.368613, 0.368613, 1.0 ], 1163 | "grad2" : [ 0.092732, 0.092692, 0.102041, 1.0 ], 1164 | "id" : "obj-34", 1165 | "ignoreclick" : 1, 1166 | "maxclass" : "panel", 1167 | "mode" : 1, 1168 | "numinlets" : 1, 1169 | "numoutlets" : 0, 1170 | "patching_rect" : [ 37.0, 568.0, 233.0, 128.0 ] 1171 | } 1172 | 1173 | } 1174 | , { 1175 | "box" : { 1176 | "bgcolor" : [ 0.030612, 0.030612, 0.030612, 1.0 ], 1177 | "grad1" : [ 0.368613, 0.368613, 0.368613, 1.0 ], 1178 | "grad2" : [ 0.092732, 0.092692, 0.102041, 1.0 ], 1179 | "id" : "obj-43", 1180 | "ignoreclick" : 1, 1181 | "maxclass" : "panel", 1182 | "mode" : 1, 1183 | "numinlets" : 1, 1184 | "numoutlets" : 0, 1185 | "patching_rect" : [ 559.0, 150.75, 124.0, 100.25 ] 1186 | } 1187 | 1188 | } 1189 | , { 1190 | "box" : { 1191 | "attr" : "brgb", 1192 | "fontname" : "Arial", 1193 | "fontsize" : 12.0, 1194 | "id" : "obj-41", 1195 | "maxclass" : "attrui", 1196 | "numinlets" : 1, 1197 | "numoutlets" : 1, 1198 | "outlettype" : [ "" ], 1199 | "patching_rect" : [ 361.0, 558.0, 330.0, 20.0 ] 1200 | } 1201 | 1202 | } 1203 | ], 1204 | "lines" : [ { 1205 | "patchline" : { 1206 | "destination" : [ "obj-9", 0 ], 1207 | "disabled" : 0, 1208 | "hidden" : 0, 1209 | "source" : [ "obj-11", 0 ] 1210 | } 1211 | 1212 | } 1213 | , { 1214 | "patchline" : { 1215 | "destination" : [ "obj-3", 0 ], 1216 | "disabled" : 0, 1217 | "hidden" : 0, 1218 | "source" : [ "obj-130", 0 ] 1219 | } 1220 | 1221 | } 1222 | , { 1223 | "patchline" : { 1224 | "destination" : [ "obj-130", 0 ], 1225 | "disabled" : 0, 1226 | "hidden" : 0, 1227 | "source" : [ "obj-17", 0 ] 1228 | } 1229 | 1230 | } 1231 | , { 1232 | "patchline" : { 1233 | "destination" : [ "obj-17", 0 ], 1234 | "disabled" : 0, 1235 | "hidden" : 0, 1236 | "source" : [ "obj-19", 0 ] 1237 | } 1238 | 1239 | } 1240 | , { 1241 | "patchline" : { 1242 | "destination" : [ "obj-25", 0 ], 1243 | "disabled" : 0, 1244 | "hidden" : 0, 1245 | "source" : [ "obj-24", 0 ] 1246 | } 1247 | 1248 | } 1249 | , { 1250 | "patchline" : { 1251 | "destination" : [ "obj-130", 0 ], 1252 | "disabled" : 0, 1253 | "hidden" : 0, 1254 | "source" : [ "obj-25", 0 ] 1255 | } 1256 | 1257 | } 1258 | , { 1259 | "patchline" : { 1260 | "destination" : [ "obj-27", 0 ], 1261 | "disabled" : 0, 1262 | "hidden" : 0, 1263 | "source" : [ "obj-26", 0 ] 1264 | } 1265 | 1266 | } 1267 | , { 1268 | "patchline" : { 1269 | "destination" : [ "obj-30", 0 ], 1270 | "disabled" : 0, 1271 | "hidden" : 0, 1272 | "source" : [ "obj-27", 0 ] 1273 | } 1274 | 1275 | } 1276 | , { 1277 | "patchline" : { 1278 | "destination" : [ "obj-41", 0 ], 1279 | "disabled" : 0, 1280 | "hidden" : 0, 1281 | "source" : [ "obj-27", 0 ] 1282 | } 1283 | 1284 | } 1285 | , { 1286 | "patchline" : { 1287 | "destination" : [ "obj-13", 0 ], 1288 | "disabled" : 0, 1289 | "hidden" : 0, 1290 | "source" : [ "obj-28", 0 ] 1291 | } 1292 | 1293 | } 1294 | , { 1295 | "patchline" : { 1296 | "destination" : [ "obj-13", 0 ], 1297 | "disabled" : 0, 1298 | "hidden" : 0, 1299 | "source" : [ "obj-29", 0 ] 1300 | } 1301 | 1302 | } 1303 | , { 1304 | "patchline" : { 1305 | "destination" : [ "obj-5", 0 ], 1306 | "disabled" : 0, 1307 | "hidden" : 0, 1308 | "source" : [ "obj-30", 0 ] 1309 | } 1310 | 1311 | } 1312 | , { 1313 | "patchline" : { 1314 | "destination" : [ "obj-38", 0 ], 1315 | "disabled" : 0, 1316 | "hidden" : 0, 1317 | "source" : [ "obj-39", 0 ] 1318 | } 1319 | 1320 | } 1321 | , { 1322 | "patchline" : { 1323 | "destination" : [ "obj-130", 0 ], 1324 | "disabled" : 0, 1325 | "hidden" : 0, 1326 | "source" : [ "obj-4", 0 ] 1327 | } 1328 | 1329 | } 1330 | , { 1331 | "patchline" : { 1332 | "destination" : [ "obj-38", 0 ], 1333 | "disabled" : 0, 1334 | "hidden" : 0, 1335 | "source" : [ "obj-41", 0 ] 1336 | } 1337 | 1338 | } 1339 | , { 1340 | "patchline" : { 1341 | "destination" : [ "obj-13", 0 ], 1342 | "disabled" : 0, 1343 | "hidden" : 0, 1344 | "source" : [ "obj-8", 0 ] 1345 | } 1346 | 1347 | } 1348 | , { 1349 | "patchline" : { 1350 | "destination" : [ "obj-130", 0 ], 1351 | "disabled" : 0, 1352 | "hidden" : 0, 1353 | "source" : [ "obj-9", 0 ] 1354 | } 1355 | 1356 | } 1357 | ], 1358 | "dependency_cache" : [ { 1359 | "name" : "ol.pngknob.js", 1360 | "bootpath" : "/Users/oli/Dev/MyMaxStuff/MyControlsLibrary/pngknob", 1361 | "patcherrelativepath" : "", 1362 | "type" : "TEXT", 1363 | "implicit" : 1 1364 | } 1365 | ] 1366 | } 1367 | 1368 | } 1369 | -------------------------------------------------------------------------------- /trajectory/ol.trajectory.js: -------------------------------------------------------------------------------- 1 | inlets = 1; 2 | outlets = 1; 3 | 4 | autowatch = 1; 5 | 6 | var gWidth = this.box.rect[2] - this.box.rect[0]; 7 | var gHeight = this.box.rect[3] - this.box.rect[1]; 8 | 9 | const kModeEdit = 0; 10 | const kModePlay = 1; 11 | const kNumModes = 2; 12 | 13 | const gBallDiameter = 10; 14 | const gBallRadius = 5; 15 | 16 | mgraphics.init(); 17 | mgraphics.relative_coords = 0; 18 | mgraphics.autofill = 0; 19 | 20 | mgraphics.redraw(); 21 | 22 | function bpObj(x, y) 23 | { 24 | this.x = x; 25 | this.y = y; 26 | } 27 | 28 | var gMode = kModeEdit; 29 | var gDragging = -1; 30 | var gHit = -1; 31 | 32 | var frgb = [1, 0., 0., 1.]; 33 | declareattribute("frgb", null, null, 1); 34 | 35 | var grgb = [0., 0., 0., 0.2]; 36 | declareattribute("grgb", null, null, 1); 37 | 38 | var linewidth = 1; 39 | declareattribute("linewidth", null, null, 1); 40 | 41 | var hsegs = 3; 42 | declareattribute("hsegs", null, null, 1); 43 | 44 | var vsegs = 3; 45 | declareattribute("vsegs", null, null, 1); 46 | 47 | var snap = false; 48 | declareattribute("snap", null, null, 0); 49 | 50 | var gCursor = new bpObj(0.5,0.5); 51 | 52 | var gData = new Array(); 53 | 54 | function clear() 55 | { 56 | gData = new Array(); 57 | notifyclients(); 58 | mgraphics.redraw(); 59 | } 60 | 61 | function mode(v) 62 | { 63 | if(v >= kModeEdit && v < kNumModes) 64 | { 65 | gMode = v; 66 | mgraphics.redraw(); 67 | } 68 | } 69 | 70 | function clip(input, outputMin, outputMax) 71 | { 72 | if(input < outputMin) return outputMin; 73 | if(input > outputMax) return outputMax; 74 | 75 | return input; 76 | } 77 | 78 | function linearMap(input, inputMin, inputMax, outputMin, outputMax) 79 | { 80 | var inputSpan = inputMax - inputMin; 81 | var outputSpan = outputMax - outputMin; 82 | 83 | var inputScaled = input - (inputMin / inputSpan); 84 | 85 | return outputMin + (inputScaled * outputSpan); 86 | } 87 | 88 | function msg_float(v) 89 | { 90 | var trunc = Math.floor(v); 91 | var frac = v - trunc; 92 | 93 | if(trunc >= 0 && trunc < gData.length-1) 94 | { 95 | var x = linearMap(frac, 0., 1., gData[trunc].x, gData[trunc+1].x); 96 | var y = linearMap(frac, 0., 1., gData[trunc].y, gData[trunc+1].y); 97 | 98 | gCursor.x = x; 99 | gCursor.y = y; 100 | outlet(0, x, y); 101 | 102 | mgraphics.redraw(); 103 | } 104 | 105 | mgraphics.redraw(); 106 | } 107 | 108 | function msg_int(v) 109 | { 110 | if(v >= 0 && v < gData.length) 111 | { 112 | gCursor.x = gData[v].x; 113 | gCursor.y = gData[v].y; 114 | outlet(0, gData[v].x, gData[v].y); 115 | mgraphics.redraw(); 116 | } 117 | } 118 | 119 | function draw_grid() 120 | { 121 | with (mgraphics) 122 | { 123 | set_line_width(1); 124 | set_source_rgba(grgb); 125 | 126 | if(hsegs) 127 | { 128 | var xstep = gWidth / hsegs; 129 | 130 | for(i = 1; i < hsegs; i++) 131 | { 132 | move_to(i * xstep, 0); 133 | line_to(i * xstep, gHeight); 134 | } 135 | 136 | stroke(); 137 | } 138 | 139 | if(vsegs) 140 | { 141 | var ystep = gHeight / vsegs; 142 | 143 | for(i = 1; i < vsegs; i++) 144 | { 145 | move_to(0, i * ystep); 146 | line_to(gWidth, i * ystep); 147 | } 148 | 149 | stroke(); 150 | } 151 | } 152 | } 153 | 154 | function paint() 155 | { 156 | draw_grid(); 157 | 158 | with (mgraphics) 159 | { 160 | if (gData.length) 161 | { 162 | set_line_width(linewidth); 163 | set_source_rgba(frgb); 164 | 165 | var x = gData[0].x * gWidth; 166 | var y = gData[0].y * gHeight; 167 | 168 | for(i = 1; i < gData.length; i++) 169 | { 170 | var newx = gData[i].x * gWidth; 171 | var newy = gData[i].y * gHeight; 172 | 173 | move_to(x, y); 174 | line_to(newx, newy); 175 | stroke(); 176 | 177 | x = newx; 178 | y = newy; 179 | } 180 | 181 | for(i = 0; i < gData.length; i++) 182 | { 183 | x = gData[i].x * gWidth - gBallRadius; 184 | y = gData[i].y * gHeight - gBallRadius; 185 | ellipse(x, y, gBallDiameter, gBallDiameter); 186 | fill(); 187 | } 188 | } 189 | 190 | // draw hit circle 191 | 192 | if(gHit > -1) 193 | { 194 | ellipse(gData[gHit-1].x * gWidth - gBallRadius - 5, gData[gHit-1].y * gHeight - gBallRadius - 5, gBallDiameter + 10, gBallDiameter + 10); 195 | stroke(); 196 | } 197 | 198 | // var bounds = getbounds(); 199 | // rectangle(bounds[0]*gWidth, bounds[1]*gHeight, bounds[2]*gWidth, bounds[3]*gHeight); 200 | // stroke(); 201 | 202 | //draw cursor 203 | 204 | set_line_width(4); 205 | 206 | var alpha = 1.; 207 | 208 | if(gMode == kModeEdit) 209 | { 210 | alpha = 0.3; 211 | } 212 | 213 | set_source_rgba(0.,0.,0.,alpha); 214 | 215 | move_to(gCursor.x * gWidth, (gCursor.y * gHeight) - 10); 216 | line_to(gCursor.x * gWidth, (gCursor.y * gHeight) + 10); 217 | move_to((gCursor.x * gWidth) - 10, gCursor.y * gHeight); 218 | line_to((gCursor.x * gWidth) + 10, gCursor.y * gHeight); 219 | stroke(); 220 | } 221 | } 222 | 223 | function ondrag(x,y,but,cmd,shift,capslock,option,ctrl) 224 | { 225 | x = clip(x / gWidth, 0., 1.); 226 | y = clip(y / gHeight, 0., 1.); 227 | 228 | if(but) 229 | { 230 | if(gMode == kModePlay) 231 | { 232 | gCursor.x = x; 233 | gCursor.y = y; 234 | outlet(0, x, y); 235 | } 236 | 237 | if(gMode == kModeEdit && gDragging > -1) 238 | { 239 | var pos = [x,y]; 240 | 241 | if(snap) 242 | { 243 | pos = nearestintersection(x, y); 244 | } 245 | 246 | gData[gDragging].x = pos[0]; 247 | gData[gDragging].y = pos[1]; 248 | notifyclients(); 249 | } 250 | } 251 | else 252 | { 253 | gHit = -1; 254 | gDragging = -1; 255 | } 256 | 257 | mgraphics.redraw(); 258 | } 259 | ondrag.local = 1; 260 | 261 | function addbp(x, y) 262 | { 263 | gData[gData.length] = new bpObj(x, y); 264 | } 265 | 266 | function onclick(x,y,but,cmd,shift,capslock,option,ctrl) 267 | { 268 | if(but) 269 | { 270 | if(gMode == kModeEdit) 271 | { 272 | if(shift) 273 | { 274 | if(gHit > -1) 275 | { 276 | gData.splice(gHit-1,1); 277 | } 278 | else 279 | { 280 | x = clip(x / gWidth, 0., 1.); 281 | y = clip(y / gHeight, 0., 1.); 282 | 283 | var pos = [x, y]; 284 | 285 | if(snap) 286 | { 287 | pos = nearestintersection(x, y); 288 | } 289 | 290 | addbp(x,y); 291 | } 292 | 293 | gHit = -1; 294 | gDragging = -1; 295 | notifyclients(); 296 | mgraphics.redraw(); 297 | } 298 | else 299 | { 300 | if(gHit > -1) 301 | { 302 | gDragging = gHit -1; 303 | } 304 | else 305 | { 306 | gDragging = -1; 307 | } 308 | } 309 | } 310 | } 311 | } 312 | onclick.local = 1; 313 | 314 | function ondblclick(x,y,but,cmd,shift,capslock,option,ctrl) 315 | { 316 | } 317 | ondblclick.local = 1; 318 | 319 | function onidle(x,y,but,cmd,shift,capslock,option,ctrl) 320 | { 321 | if(gDragging == -1) 322 | { 323 | gHit = hittest(x, y); 324 | 325 | if(gHit > -1) 326 | { 327 | mgraphics.redraw(); 328 | } 329 | } 330 | } 331 | onidle.local = 1; 332 | 333 | function onidleout(x,y,but,cmd,shift,capslock,option,ctrl) 334 | { 335 | gHit = -1; 336 | gDragging = -1; 337 | } 338 | onidleout.local = 1; 339 | 340 | function nearestintersection(x, y) 341 | { 342 | var xincr = 1./hsegs; 343 | var yincr = 1./vsegs; 344 | 345 | var hseg = Math.floor(x / xincr); 346 | var vseg = Math.floor(y / yincr); 347 | 348 | var hfrac = (x - (hseg * xincr))/xincr; 349 | var vfrac = (y - (vseg * yincr))/yincr; 350 | 351 | var gridx = 0.; 352 | var gridy = 0.; 353 | 354 | if(hfrac >= 0.5) 355 | { 356 | gridx = (hseg + 1) * xincr; 357 | } 358 | else 359 | { 360 | gridx = hseg * xincr; 361 | } 362 | 363 | if(vfrac >= 0.5) 364 | { 365 | gridy = (vseg + 1) * yincr; 366 | } 367 | else 368 | { 369 | gridy = vseg * yincr; 370 | } 371 | 372 | return [gridx, gridy]; 373 | } 374 | 375 | function getbounds() 376 | { 377 | var left = 1.; 378 | var top = 1.; 379 | var right = 0.; 380 | var bottom = 0.; 381 | 382 | var topy = 0; 383 | 384 | for(i = 0; i < gData.length; i++) 385 | { 386 | if(gData[i].x < left) left = gData[i].x; 387 | if(gData[i].x > right) right = gData[i].x; 388 | if(gData[i].y < top) top = gData[i].y; 389 | if(gData[i].y > bottom) bottom = gData[i].y; 390 | 391 | if(gData[i].y > topy) topy = gData[i].y; 392 | } 393 | 394 | return [left, topy, right-left, top-bottom]; 395 | } 396 | 397 | function hittest(x, y) 398 | { 399 | var hit = -1; 400 | 401 | for(i = 0; i < gData.length; i++) 402 | { 403 | var a = (gData[i].x * gWidth) - x; //x dist 404 | var b = (gData[i].y * gHeight) - y; //y dist 405 | 406 | if(a == 0) a = 0.0001; // to prevent nan 407 | if(b == 0) b = 0.0001; 408 | var dist = Math.sqrt(a*a+b*b); // distance from mouse 409 | 410 | if(dist < gBallDiameter) 411 | { 412 | hit = i+1; 413 | break; 414 | } 415 | } 416 | return hit; 417 | } 418 | hittest.local = 1; 419 | 420 | function onresize() 421 | { 422 | gWidth = box.rect[2]-box.rect[0]; 423 | gHeight = box.rect[3]-box.rect[1]; 424 | 425 | mgraphics.redraw(); 426 | } 427 | onresize.local = 1; 428 | 429 | function getvalueof() 430 | { 431 | var data = new Array(); 432 | var dataIdx = 0; 433 | 434 | data[dataIdx++] = gData.length; 435 | 436 | for(i=0;i