Update of /cvsroot/pure-data/extensions/gui/ix In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18155
Modified Files: kbd-demo.pd kbd.wid mat-demo.pd Log Message: .
Index: kbd-demo.pd =================================================================== RCS file: /cvsroot/pure-data/extensions/gui/ix/kbd-demo.pd,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kbd-demo.pd 24 May 2005 22:28:08 -0000 1.3 --- kbd-demo.pd 24 May 2005 23:38:22 -0000 1.4 *************** *** 1,3 **** ! #N canvas 360 12 554 299 12; #X obj 56 57 widget kbd k1 #octaves 7 -width 444.094 -height 63.4421 ; --- 1,3 ---- ! #N canvas 360 12 574 324 12; #X obj 56 57 widget kbd k1 #octaves 7 -width 444.094 -height 63.4421 ; *************** *** 7,12 **** #X floatatom 98 135 5 0 0 0 - - -; #X obj 56 29 pack 0 1; ! #X floatatom 56 11 5 0 0 0 - - -; ! #X obj 98 12 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1 ; #X floatatom 21 32 5 0 0 0 - - -; --- 7,12 ---- #X floatatom 98 135 5 0 0 0 - - -; #X obj 56 29 pack 0 1; ! #X floatatom 56 13 5 0 0 0 - - -; ! #X obj 99 14 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1 ; #X floatatom 21 32 5 0 0 0 - - -; *************** *** 18,32 **** #X obj 81 242 *~; #X obj 92 173 * 0.4; - #X floatatom 115 14 5 0 1 0 - - -; #X floatatom 149 21 5 0 12 0 - - -; #X msg 148 38 #octaves $1; ! #X obj 165 140 widget kbd k2 #octaves 3 #bg purple #fg pink -height 32; #X obj 56 174 + 36; #X connect 0 0 1 0; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 1 1 3 0; ! #X connect 2 0 20 0; #X connect 3 0 15 0; #X connect 5 0 0 0; --- 18,39 ---- #X obj 81 242 *~; #X obj 92 173 * 0.4; #X floatatom 149 21 5 0 12 0 - - -; #X msg 148 38 #octaves $1; ! #X obj 143 134 widget kbd k2 #octaves 3 #bg hotpink #fg orange -height 32; #X obj 56 174 + 36; + #X obj 345 134 widget kbd k2 #octaves 3 #bg blue #fg cyan -height 32 + ; + #X obj 207 232 * 127; + #X obj 171 230 + 36; + #X obj 171 265 noteout; + #X obj 170 203 unpack 0 0 0; + #X obj 160 172 Append 1; + #X obj 232 173 Append 2; #X connect 0 0 1 0; #X connect 0 0 4 0; #X connect 1 0 2 0; #X connect 1 1 3 0; ! #X connect 2 0 19 0; #X connect 3 0 15 0; #X connect 5 0 0 0; *************** *** 41,47 **** #X connect 14 0 13 1; #X connect 15 0 12 0; ! #X connect 16 0 5 1; ! #X connect 17 0 18 0; ! #X connect 18 0 0 0; ! #X connect 19 0 1 0; ! #X connect 20 0 10 0; --- 48,61 ---- #X connect 14 0 13 1; #X connect 15 0 12 0; ! #X connect 16 0 17 0; ! #X connect 17 0 0 0; ! #X connect 18 0 25 0; ! #X connect 19 0 10 0; ! #X connect 20 0 26 0; ! #X connect 21 0 23 1; ! #X connect 22 0 23 0; ! #X connect 24 0 22 0; ! #X connect 24 1 21 0; ! #X connect 24 2 23 2; ! #X connect 25 0 24 0; ! #X connect 26 0 24 0;
Index: kbd.wid =================================================================== RCS file: /cvsroot/pure-data/extensions/gui/ix/kbd.wid,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** kbd.wid 24 May 2005 22:42:42 -0000 1.3 --- kbd.wid 24 May 2005 23:38:22 -0000 1.4 *************** *** 1,3 **** --- 1,11 ---- namespace eval ::ix { + proc kbd_list {p t args} { + variable _ + 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 + } + proc kbd_play {t m b x y} { variable _ *************** *** 16,21 **** for {set o 0} {$o < $octaves} {incr o} { for {set on 0} {$on < 12} {incr on} { ! set no [expr $o * 12 + $on] ! if {[$p.f$o.$no cget -relief] eq "sunken"} {kbd_action $p.f$o.$no $t 0}}}}
proc kbd {path t octaves b f} { --- 24,29 ---- for {set o 0} {$o < $octaves} {incr o} { for {set on 0} {$on < 12} {incr on} { ! set w $p.f$o.[expr $o * 12 + $on] ! if {[$w cget -relief] eq "sunken"} {kbd_action $w $t 0}}}}
proc kbd {path t octaves b f} { *************** *** 37,40 **** #. -height 100 -width 60 #. #octaves 6 #bg black #fg white ! ::ix::kbd .- .| .#octaves .#bg .#fg --- 45,49 ---- #. -height 100 -width 60 #. #octaves 6 #bg black #fg white ! #. @list ::ix::kbd_list .- .| .#args ! #. @float ::ix::kbd_list .- .| .#args ::ix::kbd .- .| .#octaves .#bg .#fg
Index: mat-demo.pd =================================================================== RCS file: /cvsroot/pure-data/extensions/gui/ix/mat-demo.pd,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mat-demo.pd 24 May 2005 22:28:08 -0000 1.4 --- mat-demo.pd 24 May 2005 23:38:22 -0000 1.5 *************** *** 20,24 **** #X obj 16 901 pack f f f; #X obj 18 958 print note; ! #X obj 73 927 makenote 99 250; #X obj 92 961 noteout; #X msg 317 2 #Ya 1 , #Yb 128 , #qYv 8; --- 20,24 ---- #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; *************** *** 27,39 **** #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 obj 97 854 unpack 0 0; - #X obj 98 897 pack 0 0 1; - #X obj 211 894 * 127; - #X obj 175 892 + 36; - #X obj 187 869 unpack 0 0; - #X obj 188 912 pack 0 0 2; #X msg 283 874 redefine; #X msg 414 885 #bg blue , #fg green; ! #X obj 115 818 print a; #X connect 0 0 13 0; #X connect 2 0 0 0; --- 27,35 ---- #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 connect 2 0 0 0; *************** *** 42,48 **** #X connect 5 0 3 0; #X connect 6 0 4 0; ! #X connect 7 0 27 1; #X connect 9 0 8 0; ! #X connect 10 0 27 0; #X connect 12 0 11 0; #X connect 13 0 15 0; --- 38,44 ---- #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; *************** *** 57,73 **** #X connect 19 1 20 1; #X connect 21 0 0 0; ! #X connect 24 0 26 0; ! #X connect 24 0 34 0; #X connect 25 0 30 0; ! #X connect 26 0 10 0; ! #X connect 26 1 7 0; ! #X connect 27 0 20 0; ! #X connect 28 0 31 1; ! #X connect 29 0 31 0; ! #X connect 30 0 29 0; ! #X connect 30 1 28 0; ! #X connect 31 0 20 0; ! #X connect 32 0 24 0; ! #X connect 32 0 25 0; ! #X connect 33 0 25 0; ! #X connect 33 0 24 0; --- 53,65 ---- #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;