thanks very much for all the replies! and frank, thanks for the patch--i'm enjoying your help a lot.
it's working now with steffen & hc's
[r pd-patchname.pd] | [route editmode] | [nbx]
there's something i don't get though. i mapped capslock to [;pd-patch.pd editmode $1( (good idea there). now, when i [pack] the [keyname] and float to [route Caps_Lock] as well as in a simpler patch, the float gets 'inversed': a 1 from the [keyname] becomes a 0 and vice versa. no problem, but i don't get why this is. patch below. i'm curious, any ideas?
#N canvas 0 22 782 318 10; #X obj 255 49 keyname; #X symbolatom 376 136 10 0 0 0 - - -; #X obj 255 167 route Caps_Lock; #X floatatom 172 187 5 0 0 0 - - -; #X obj 255 115 pack s f; #X obj 255 141 list trim; #X obj 498 141 keyname; #X obj 482 167 f; #X obj 542 167 sel Caps_Lock; #X floatatom 420 189 5 0 0 0 - - -; #X floatatom 376 94 5 0 0 0 - - -; #X msg 522 219 ; pd-?.pd editmode $1; #X obj 482 193 t f f; #X obj 482 219 == 0; #X floatatom 402 228 5 0 0 0 - - -; #X obj 445 245 spigot; #X connect 0 0 4 1; #X connect 0 0 10 0; #X connect 0 1 1 0; #X connect 0 1 4 0; #X connect 2 0 3 0; #X connect 4 0 5 0; #X connect 5 0 2 0; #X connect 6 0 7 1; #X connect 6 1 8 0; #X connect 7 0 9 0; #X connect 8 0 7 0; #X connect 12 0 13 0; #X connect 12 1 11 0; #X connect 13 0 14 0; #X connect 13 0 15 1;
Hallo, robbert van hulzen hat gesagt: // robbert van hulzen wrote:
thanks very much for all the replies! and frank, thanks for the patch--i'm enjoying your help a lot.
it's working now with steffen & hc's
[r pd-patchname.pd] | [route editmode] | [nbx]
there's something i don't get though. i mapped capslock to [;pd-patch.pd editmode $1( (good idea there).
Acutally I intended to express a different idea though: Peter doesn't use Caps_lock to switch to edit mode. Instead certain keys are mapped to performance functions, but only if caps_lock is active. If caps_lock is not pressed these keys do their usual thing.
now, when i [pack] the [keyname] and float to [route Caps_Lock] as well as in a simpler patch, the float gets 'inversed': a 1 from the [keyname] becomes a 0 and vice versa. no problem, but i don't get why this is. patch below. i'm curious, any ideas?
That's an execution order bug in your patch: By crossing the connection of the upper keyname you also inverted the execution order. Now every key-name from the right outlet will be packed with the number from the left keyname-outlet that was active the one step before!
If you want to [route] by key-name, you need to pack name and state, but in reverse order, that is, make "Caps_Lock 1" out of "1 Caps_lock".
Normally one would use [swap] for this, but [swap] only works for floats. But you can use [list prepend] here much the same, just don't forget to [list trim] the result befor you want to use it in [route Caps_Lock]
Frank Barknecht _ ______footils.org_ __goto10.org__