aboutsummaryrefslogtreecommitdiff
path: root/extensions
diff options
context:
space:
mode:
Diffstat (limited to 'extensions')
-rwxr-xr-xextensions/gui/ix/kbd.wid5
-rwxr-xr-xextensions/gui/ix/mat-demo.pd111
-rwxr-xr-xextensions/gui/ix/mat.wid20
-rw-r--r--extensions/gui/ix/ngrid-demo.pd246
4 files changed, 190 insertions, 192 deletions
diff --git a/extensions/gui/ix/kbd.wid b/extensions/gui/ix/kbd.wid
index 177f503b..06c1d7e7 100755
--- a/extensions/gui/ix/kbd.wid
+++ b/extensions/gui/ix/kbd.wid
@@ -4,8 +4,7 @@ namespace eval ::ix {
set w $p.f[expr [lindex $args 0] / 12].[lindex $args 0]
if {[llength $args] == 1} {set v 1;if {$_($t:lp) != -1 && $_($t:lp) ne $w} {kbd_action $_($t:lp) $t 0}} {set v [lindex $args 1]}
kbd_action $w $t $v
- set _($t:lp) $w
- }
+ set _($t:lp) $w}
proc kbd_play {t m b x y} {
variable _
@@ -27,10 +26,10 @@ namespace eval ::ix {
if {[$w cget -relief] eq "sunken"} {kbd_action $w $t 0}}}}
proc kbd {path t octaves b f} {
+ $path config -width [expr $octaves * 66]
if {![winfo exists $path.f0]} {
variable _
set _($t:lp) -1
- $path config -width [expr $octaves * 66]
set bw {0 1 0 1 0 0 1 0 1 0 1 0} ; set npl {0 1 1 2 2 3 4 4 5 5 6 6}
foreach a {{bg "0 $b 1 $f"} {fg "1 $b 0 $f"} {an {0 ";lower $wk" 1 "-anchor n"}} {rw {0 {[expr 1 / 7.]} 1 {[expr 1 / 10.]}}} {rh {0 {[expr 1.]} 1 {[expr 6 / 10.]}}}} {array set [lindex $a 0] [lindex $a 1]}
for {set o 0} {$o < $octaves} {incr o} {
diff --git a/extensions/gui/ix/mat-demo.pd b/extensions/gui/ix/mat-demo.pd
index df994ec9..f96bfefd 100755
--- a/extensions/gui/ix/mat-demo.pd
+++ b/extensions/gui/ix/mat-demo.pd
@@ -1,65 +1,50 @@
-#N canvas 25 0 920 1029 12;
-#X obj 17 22 widget mat n1 #w 881 #bg white #divX 8 #divY 5 #h 740
-#Yb 1 #Ya 88 #qYv 2 #qYa 8;
+#N canvas 1036 0 914 718 12;
+#X obj 17 22 widget mat n1 #w 881 #bg gray83 #divX 8 #divY 5 #h 494
+#Yb 1 #Ya 88 #qYv 2 #qYa 8 #ln white;
#X msg 1080 -13 -height 26 -width 26 -bg gray95;
-#X msg 19 0 redefine;
-#X msg 229 1 #w \$1;
-#X msg 193 0 #h \$1;
-#X floatatom 159 -1 5 0 0 0 - - -;
-#X floatatom 127 1 5 0 0 0 - - -;
-#X obj 121 879 * 127;
-#X msg 447 689 #w \$1 \, #h \$1;
-#X floatatom 453 672 5 0 0 0 - - -;
-#X obj 85 877 + 36;
-#X obj 577 798 rr ss;
-#X obj 577 779 rg;
-#X obj 17 771 route note;
-#X msg 460 1 #Ya 88 \, Yb 24 \, #qYv 2;
-#X obj 9 836 unpack f f f;
-#X obj 37 871 * 127;
-#X obj 16 901 pack f f f;
-#X obj 18 958 print note;
-#X obj 39 925 makenote 99 250;
-#X obj 92 961 noteout;
-#X msg 317 2 #Ya 1 \, #Yb 128 \, #qYv 8;
-#X obj 535 833 rp ss kbd;
-#X obj 591 833 rp ss kb2;
-#X obj 109 775 widget kbd k1 #bg blue #fg green -height 32;
-#X obj 207 823 widget kbd k2 #bg blue #fg green -height 32;
-#X msg 283 874 redefine;
-#X msg 414 885 #bg blue \, #fg green;
-#X obj 98 855 unpack 0 0 0;
-#X obj 106 819 Append 1;
-#X obj 201 864 Append 2;
-#X connect 0 0 13 0;
+#X msg 184 648 redefine;
+#X obj 131 646 * 127;
+#X obj 95 644 + 36;
+#X obj 587 565 rr ss;
+#X obj 587 546 rg;
+#X obj 27 538 route note;
+#X obj 19 603 unpack f f f;
+#X obj 47 638 * 127;
+#X obj 26 668 pack f f f;
+#X obj 49 692 makenote 99 250;
+#X obj 102 728 noteout;
+#X obj 108 584 rp ss kbd;
+#X obj 158 583 rp ss kb2;
+#X obj 138 537 widget kbd k1 #bg blue #fg green #ln gray50 -height
+32;
+#X obj 138 570 widget kbd k2 #bg orange #fg red #ln gray50 -height
+32;
+#X obj 108 622 unpack 0 0 0;
+#X obj 108 603 Append 1;
+#X obj 158 602 Append 2;
+#X msg 74 575 1;
+#X connect 0 0 7 0;
#X connect 2 0 0 0;
-#X connect 3 0 0 0;
-#X connect 4 0 0 0;
-#X connect 5 0 3 0;
-#X connect 6 0 4 0;
-#X connect 7 0 20 1;
-#X connect 9 0 8 0;
-#X connect 10 0 20 0;
-#X connect 12 0 11 0;
-#X connect 13 0 15 0;
-#X connect 14 0 0 0;
-#X connect 15 0 17 0;
-#X connect 15 1 16 0;
-#X connect 15 2 17 2;
-#X connect 16 0 17 1;
-#X connect 17 0 18 0;
-#X connect 17 0 19 0;
-#X connect 19 0 20 0;
-#X connect 19 1 20 1;
-#X connect 21 0 0 0;
-#X connect 24 0 29 0;
-#X connect 25 0 30 0;
-#X connect 26 0 24 0;
-#X connect 26 0 25 0;
-#X connect 27 0 25 0;
-#X connect 27 0 24 0;
-#X connect 28 0 10 0;
-#X connect 28 1 7 0;
-#X connect 28 2 20 2;
-#X connect 29 0 28 0;
-#X connect 30 0 28 0;
+#X connect 3 0 12 1;
+#X connect 4 0 12 0;
+#X connect 6 0 5 0;
+#X connect 7 0 8 0;
+#X connect 8 0 10 0;
+#X connect 8 1 9 0;
+#X connect 8 2 10 2;
+#X connect 9 0 10 1;
+#X connect 10 0 11 0;
+#X connect 11 0 12 0;
+#X connect 11 1 12 1;
+#X connect 13 0 18 0;
+#X connect 14 0 19 0;
+#X connect 15 0 18 0;
+#X connect 15 0 13 0;
+#X connect 16 0 19 0;
+#X connect 16 0 14 0;
+#X connect 17 0 4 0;
+#X connect 17 1 3 0;
+#X connect 17 2 12 2;
+#X connect 18 0 17 0;
+#X connect 19 0 17 0;
+#X connect 20 0 10 2;
diff --git a/extensions/gui/ix/mat.wid b/extensions/gui/ix/mat.wid
index a4e743fa..d77b541d 100755
--- a/extensions/gui/ix/mat.wid
+++ b/extensions/gui/ix/mat.wid
@@ -1,14 +1,12 @@
package require tkpath
namespace eval ::ix {
- proc random_int {} {return [expr "int(floor(rand()*16))"]}
- proc random_clr {} {return [format "\#%1X%1X%1X%1X%1X%1X" [random_int] [random_int] [random_int] [random_int] [random_int] [random_int]]}
-
+ proc rc {} {return [format "\#%06x" [expr "int(floor(rand() * 16))"]]}
proc mat_note {p t item} {
variable _
set id [lindex [$p.m itemcget $item -tags] 1]
- set len [expr [lindex $_($t:items:$id) 2] - [lindex $_($t:items:$id) 0]]
+ set len [expr [dict get $_($t) $id xx] - [dict get $_($t) $id x]]
set vel [$p.m itemcget $item -fillopacity]
- pd [concat $t.rp _cb note [lindex $_($t:items:$id) 1] $vel $len \;]}
+ pd [concat $t.rp _cb note [dict get $_($t) $id y] $vel $len \;]}
proc mat_click {m button action p t x y} {
variable _
@@ -64,10 +62,9 @@ namespace eval ::ix {
2 {
foreach item [$p.m find withtag item] {
set id [lindex [$p.m itemcget $item -tags] 1]
- set px [mat_tr $p $t x t [lindex $_($t:items:$id) 0]]
- set py [mat_tr $p $t y t [lindex $_($t:items:$id) 1]]
- set sx [mat_tr $p $t x id [expr [lindex $_($t:items:$id) 2] - [lindex $_($t:items:$id) 0]]]
- # set sy [mat_tr $p $t y id [expr [lindex $_($t:items:$id) 3] - [lindex $_($t:items:$id) 1]]]
+ set px [mat_tr $p $t x t [dict get $_($t) $id x]]
+ set py [mat_tr $p $t y t [dict get $_($t) $id y]]
+ set sx [mat_tr $p $t x id [expr [dict get $_($t) $id xx] - [dict get $_($t) $id x]]]
set sy [mat_tr $p $t y id 1]
$p.m coords $item [::tkpath::coords rect $px $py $sx $sy -rx 3 -ry 3]
}
@@ -97,7 +94,10 @@ namespace eval ::ix {
if {$x >= $_($t:cx)} {set xa $_($t:cx);set xb $x} else {set xa $x;set xb $_($t:cx)}
$p.m coords drawing [::tkpath::coords rect $xa $y [expr $xb - $xa] [mat_tr $p $t y id 1] -rx 3 -ry 3]
set yi [mat_tr $p $t y i $y]
- set _($t:items:$_($t:i)) [list [mat_tr $p $t x i $xa] $yi [mat_tr $p $t x i $xb] $yi]
+ dict set _($t) $_($t:i) x [mat_tr $p $t x i $xa]
+ dict set _($t) $_($t:i) y $yi
+ dict set _($t) $_($t:i) xx [mat_tr $p $t x i $xb]
+ dict set _($t) $_($t:i) yy $yi
pd [concat $t.rp _cb note $yi 0.8 \;]}
first {
foreach xy {x y} {set _($t:c$xy) [set $xy]}
diff --git a/extensions/gui/ix/ngrid-demo.pd b/extensions/gui/ix/ngrid-demo.pd
index dad2b75d..29dacac1 100644
--- a/extensions/gui/ix/ngrid-demo.pd
+++ b/extensions/gui/ix/ngrid-demo.pd
@@ -1,4 +1,9 @@
-#N canvas 57 204 1033 585 12;
+#N canvas 1333 136 79 124 12;
+#X msg 785 -536 -height 26 -width 26 -bg gray95;
+#N canvas 0 0 595 500 intro 1;
+#X obj 9 418 osc~;
+#X obj 9 456 dac~;
+#X obj 9 399 line;
#X obj 9 -29 widget ngrid n1 #w 382 #h 382 #move 0 #radius 8;
#X floatatom 360 365 3 2 233 0 - - -;
#X floatatom 381 382 2 4 32 0 - - -;
@@ -6,14 +11,11 @@
#X msg 382 362 spread \$1;
#X obj 403 337 bng 23 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
-1;
-#X obj 9 418 osc~;
#X obj 61 418 osc~;
#X obj 35 418 osc~;
#X obj 87 418 osc~;
#X obj 113 418 osc~;
#X obj 139 418 osc~;
-#X obj 9 456 dac~;
-#X obj 9 399 line;
#X obj 35 399 line;
#X obj 61 399 line;
#X obj 87 399 line;
@@ -33,25 +35,25 @@
#X obj 217 399 line;
#X obj 243 399 line;
#X obj 355 446 tow . ngrid n1;
-#X obj 9 361 Append 100;
+#X obj 9 360 Append 100;
#X msg 258 363 move swarm;
#X msg 312 385 5;
#X msg 326 363 move;
#X obj 86 437 prepend set;
#X obj 86 454 prepend set;
#X obj 160 442 hsl 128 15 0 2000 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 6350 1;
+-1 -1 2100 1;
#X obj 160 458 hsl 128 15 0 2000 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 6350 1;
+-1 -1 0 1;
#X obj 423 50 widget ngrid m #w 64 #h 64;
#X msg 407 451 add x 1 0 10 \, add y 2 0 10;
#X obj 425 127 route x y;
#X obj 468 146 prepend set;
#X obj 400 147 prepend set;
#X obj 435 166 hsl 128 15 0 10 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 1270 1;
+-1 -1 12700 1;
#X obj 435 181 hsl 128 15 0 10 0 0 empty empty empty -2 -6 0 8 -262144
--1 -1 2540 1;
+-1 -1 385 1;
#X obj 496 50 widget ngrid m #w 64 #h 64;
#X obj 510 212 widget ngrid m #w 64 #h 64;
#X obj 514 286 widget ngrid m #w 64 #h 64;
@@ -91,73 +93,38 @@
#X obj 449 370 select 6.28 0;
#X obj 448 352 spigot;
#X msg 472 333 0 2000;
-#X text 530 -25 ngrid;
-#X obj 884 480 sendOSC;
-#X msg 885 404 connect localhost 16180;
-#X obj 884 461 prepend send;
-#X obj 601 362 dumpOSC 3339;
-#X obj 600 -30 widget ngrid n2 #w 382 #h 382 #move 0 #radius 8;
-#X obj 601 381 OSCroute /om;
-#X obj 601 400 OSCroute /new_port;
-#X obj 601 419 niagara 4;
-#X obj 601 438 niagara 1;
-#X obj 601 476 glue;
-#X obj 601 533 prepend add;
-#X obj 601 457 a2l;
-#X obj 984 385 t b b b;
-#X msg 884 442 /om/request/all_objects 5;
-#X obj 785 366 widget dm dmngr #items .(error normal swarm trails.)
-;
-#X msg 732 372 move \$1;
-#X msg 929 481 disconnect;
-#X obj 677 437 prepend /om/synth/set_port_value 1;
-#X msg 883 423 /om/engine/register_client 0 localhost 3339;
-#X msg 1080 -23 -height 26 -width 26 -bg gray95;
-#X obj 650 457 niagara 1;
-#X obj 601 495 spigot;
-#X msg 650 495 1;
-#X msg 670 495 0;
-#X obj 650 476 route CONTROL;
-#X obj 724 399 OSCroute /control_change;
-#X obj 724 416 prepend setpos;
-#X obj 680 379 spigot;
-#X obj 711 365 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#X obj 49 480 switch~;
+#X obj 430 324 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1
1;
-#X obj 743 456 OSCroute /node_removal;
-#X obj 690 495 niagara 1;
-#X obj 601 514 spigot;
-#X msg 650 514 1;
-#X msg 670 514 0;
-#X obj 690 514 route INPUT;
-#X obj 744 475 prepend delete;
-#X obj 932 384 loadbang;
-#X text 844 524 www.nongnu.org/om-synth/;
-#X text 877 514 get om:;
-#X connect 0 0 33 0;
-#X connect 1 0 4 0;
-#X connect 2 0 3 0;
-#X connect 3 0 32 0;
-#X connect 4 0 32 0;
-#X connect 5 0 35 0;
-#X connect 5 0 42 0;
-#X connect 5 0 63 0;
-#X connect 5 0 65 0;
-#X connect 5 0 64 0;
-#X connect 6 0 59 0;
-#X connect 7 0 59 0;
-#X connect 8 0 59 0;
+#X obj 63 363 hsl 128 15 0 2000 0 0 empty empty empty -2 -6 0 8 -262144
+-1 -1 12700 1;
+#X obj 78 368 prepend set;
+#X connect 0 0 59 0;
+#X connect 2 0 0 0;
+#X connect 3 0 33 0;
+#X connect 4 0 7 0;
+#X connect 5 0 6 0;
+#X connect 6 0 32 0;
+#X connect 7 0 32 0;
+#X connect 8 0 35 0;
+#X connect 8 0 42 0;
+#X connect 8 0 63 0;
+#X connect 8 0 65 0;
+#X connect 8 0 64 0;
+#X connect 8 0 86 0;
#X connect 9 0 59 0;
#X connect 10 0 59 0;
#X connect 11 0 59 0;
-#X connect 13 0 6 0;
-#X connect 14 0 8 0;
-#X connect 15 0 7 0;
-#X connect 16 0 9 0;
-#X connect 17 0 10 0;
-#X connect 18 0 11 0;
+#X connect 12 0 59 0;
+#X connect 13 0 59 0;
+#X connect 14 0 10 0;
+#X connect 15 0 9 0;
+#X connect 16 0 11 0;
+#X connect 17 0 12 0;
+#X connect 18 0 13 0;
#X connect 19 0 59 0;
#X connect 20 0 59 0;
-#X connect 21 0 13 0;
+#X connect 21 0 2 0;
#X connect 21 1 14 0;
#X connect 21 2 15 0;
#X connect 21 3 16 0;
@@ -215,8 +182,8 @@
#X connect 56 0 32 0;
#X connect 57 0 32 0;
#X connect 58 0 32 0;
-#X connect 59 0 12 0;
-#X connect 59 0 12 1;
+#X connect 59 0 1 0;
+#X connect 59 0 1 1;
#X connect 60 0 49 0;
#X connect 61 0 60 0;
#X connect 61 0 55 0;
@@ -250,47 +217,94 @@
#X connect 83 0 82 0;
#X connect 83 0 71 0;
#X connect 84 0 81 0;
-#X connect 87 0 86 0;
-#X connect 88 0 86 0;
-#X connect 89 0 91 0;
-#X connect 90 0 103 0;
-#X connect 91 0 92 0;
-#X connect 91 0 113 0;
-#X connect 91 0 115 0;
-#X connect 92 0 93 0;
-#X connect 93 0 94 0;
-#X connect 93 1 95 1;
-#X connect 94 0 97 0;
-#X connect 94 1 106 0;
-#X connect 95 0 107 0;
-#X connect 96 0 90 0;
-#X connect 97 0 95 0;
-#X connect 98 0 99 0;
-#X connect 98 1 104 0;
-#X connect 98 2 87 0;
-#X connect 99 0 88 0;
-#X connect 100 0 101 0;
-#X connect 101 0 90 0;
-#X connect 102 0 86 0;
-#X connect 103 0 88 0;
-#X connect 104 0 88 0;
-#X connect 106 0 110 0;
-#X connect 106 1 116 0;
-#X connect 107 0 117 0;
-#X connect 108 0 107 1;
-#X connect 109 0 107 1;
-#X connect 110 0 108 0;
-#X connect 110 1 109 0;
-#X connect 111 0 112 0;
-#X connect 112 0 90 0;
-#X connect 113 0 111 0;
-#X connect 114 0 113 1;
-#X connect 115 0 121 0;
-#X connect 116 0 120 0;
-#X connect 117 0 96 0;
-#X connect 118 0 117 1;
-#X connect 119 0 117 1;
-#X connect 120 0 118 0;
-#X connect 120 1 119 0;
-#X connect 121 0 90 0;
-#X connect 122 0 98 0;
+#X connect 86 0 85 0;
+#X connect 87 0 88 0;
+#X connect 88 0 33 0;
+#X restore 18 35 pd intro;
+#N canvas 0 0 442 580 om 0;
+#X obj 306 502 sendOSC;
+#X msg 307 426 connect localhost 16180;
+#X obj 306 483 prepend send;
+#X obj 23 382 dumpOSC 3339;
+#X obj 22 -8 widget ngrid n2 #w 382 #h 382 #move 0 #radius 8;
+#X obj 23 403 OSCroute /om;
+#X obj 23 422 OSCroute /new_port;
+#X obj 23 441 niagara 4;
+#X obj 23 460 niagara 1;
+#X obj 23 498 glue;
+#X obj 23 555 prepend add;
+#X obj 23 479 a2l;
+#X obj 406 407 t b b b;
+#X msg 306 464 /om/request/all_objects 5;
+#X obj 207 388 widget dm dmngr #items .(error normal swarm trails.)
+;
+#X msg 154 394 move \$1;
+#X msg 351 503 disconnect;
+#X obj 99 459 prepend /om/synth/set_port_value 1;
+#X msg 305 445 /om/engine/register_client 0 localhost 3339;
+#X obj 72 479 niagara 1;
+#X obj 23 517 spigot;
+#X msg 72 517 1;
+#X msg 92 517 0;
+#X obj 72 498 route CONTROL;
+#X obj 146 421 OSCroute /control_change;
+#X obj 146 438 prepend setpos;
+#X obj 102 401 spigot;
+#X obj 133 387 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+1;
+#X obj 165 478 OSCroute /node_removal;
+#X obj 112 517 niagara 1;
+#X obj 23 536 spigot;
+#X msg 72 536 1;
+#X msg 92 536 0;
+#X obj 112 536 route INPUT;
+#X obj 166 497 prepend delete;
+#X obj 354 406 loadbang;
+#X text 266 546 www.nongnu.org/om-synth/;
+#X obj 199 532 print NOSHIT;
+#X connect 1 0 0 0;
+#X connect 2 0 0 0;
+#X connect 3 0 5 0;
+#X connect 3 0 37 0;
+#X connect 4 0 17 0;
+#X connect 5 0 6 0;
+#X connect 5 0 26 0;
+#X connect 5 0 28 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X connect 7 1 9 1;
+#X connect 8 0 11 0;
+#X connect 8 1 19 0;
+#X connect 9 0 20 0;
+#X connect 10 0 4 0;
+#X connect 11 0 9 0;
+#X connect 12 0 13 0;
+#X connect 12 1 18 0;
+#X connect 12 2 1 0;
+#X connect 13 0 2 0;
+#X connect 14 0 15 0;
+#X connect 15 0 4 0;
+#X connect 16 0 0 0;
+#X connect 17 0 2 0;
+#X connect 18 0 2 0;
+#X connect 19 0 23 0;
+#X connect 19 1 29 0;
+#X connect 20 0 30 0;
+#X connect 21 0 20 1;
+#X connect 22 0 20 1;
+#X connect 23 0 21 0;
+#X connect 23 1 22 0;
+#X connect 24 0 25 0;
+#X connect 25 0 4 0;
+#X connect 26 0 24 0;
+#X connect 27 0 26 1;
+#X connect 28 0 34 0;
+#X connect 29 0 33 0;
+#X connect 30 0 10 0;
+#X connect 31 0 30 1;
+#X connect 32 0 30 1;
+#X connect 33 0 31 0;
+#X connect 33 1 32 0;
+#X connect 34 0 4 0;
+#X connect 35 0 12 0;
+#X restore 18 59 pd om;