[PD] Re: PD-list Digest, Vol 22, Issue 109

robbert van hulzen robbert at performers.net
Mon Feb 5 20:41:38 CET 2007


ahh, the famous execution order... thanks for that one.
cheers, robbert


Frank Barknecht <fbar at footils.org>wrote:
 
> 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]
> 
> Ciao
> -- 
>  Frank Barknecht                 _ ______footils.org_ __goto10.org__
> 






More information about the Pd-list mailing list