[PD] Manipulating Gem objects color with notein

simone-www.io-lab.org cimo75 at gmail.com
Tue Feb 3 21:28:59 CET 2009


Hi
it worked out well although for lack of time (it was just a sketch for
a bigger project) i didn t create an Gem abstraction but i duplicated
the object 16 times.
Thanks
SImone

On Tue, Feb 3, 2009 at 8:34 AM, Frank Barknecht <fbar at footils.org> wrote:
> Hallo Simone,
> simone-www.io-lab.org hat gesagt: // simone-www.io-lab.org wrote:
>
>> After a few months without PD it seems like i forgot the basics and
>> got stuck with something rather simple:
>> I am using the NOTEIN object to track 16 coming from a sequencer, what
>> i want to achieve is to toogle 2 different colors on 16 GEM objects
>> ie:
>> Note On - Note 60 = object 60 turns blue
>> Note Off - Note 60 = object 60 turns white
>>
>> Note On - Note 61 = object 61 turns blue
>> Note Off - Note 61 = object 61 turns white
>
> Try something like this:
>
>  [notein 16] <- assuming you read from channel 16
>  |       |
>  [pack 0 0] <-- pack note number and note velocity into a list
>  |
>  [route 60 61 62 ...] <-- route according to note number
>  |
>  [> 0]
>  |
>  [select 1 0] <-- check if noteon or noteoff was sent.
>  |       |
>  [blue(  [white(
>
>
> If you use an abstraction for your Gem objects, I would put the
> route-logic into that abstraction like:
>
>        [r NOTE] <-- "pack"ed note/velocity pairs
>        |
>        [route $1] <-- create abstraction with arguments like 60, 61 ...
>        |
>        [> 0]
>        |
>        [select 1 0]
>        |        |
>        [0 1 0(  [1 1 1(
>        |________/
>  [color]
>  |
>  [square]
>
> Ciao
> --
> Frank
>
> _______________________________________________
> Pd-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list
>



-- 
.wmv , .wma , .pps along with all proprietary Windows formats won t be
accepted and/or viewed....




More information about the Pd-list mailing list