[PD] Setting a variable in abstractions

Derek Holzer derek at umatic.nl
Wed Sep 3 22:55:12 CEST 2008

Hi Simone,

I'm guessing that the slider which is attached to the [ctlin] in the 
parent patch sends to [handson] abstraction. In the future, it's usually 
better to zip up the whole patch that you have questions about, rather 
than send a screen shot with potentially hidden information.

But to answer your question: there's no real need to make two levels of 
abstractions here. Replace the two inlets in [handson] with [f $1] and 
[f $2] connected to a loadbang. And replace the slider with [ctlin $3 $4].

Then you can replace [handson1 -11 0] with [handson -11 0 80 1]. The CC 
you mention is actually two values, as in [ctlin 80 1] that must be 
parsed before the actual controller data will come through.

The other way to do it would be to make a [send CC1], [send CC2], etc 
etc below the [ctlin] objects, and include a [receive $1] in each 
[handson] abstraction, in which case you could create it as [handson -11 
0 CC1].

Of course, the other suggestions in this thread are also useful, but in 
a more general way ;-)


simone-www.io-sound.org wrote:
> hi
> this is my first patch so bear with my n00bness
> I ve taken a screen shot of the whole thing open: it s a GEM patch
> that will show 8 "knobs" and rotate them depending on the MIDI cc
> input. and also show the cc value.
> So far i ve created the 8 knobs but i can t really understand how to
> send the MIDI cc from "handson2" to the abstraction "handson" and
> parse it to the right knob.
> Thanks
> Simone

derek holzer ::: http://www.umatic.nl ::: http://blog.myspace.com/macumbista
---Oblique Strategy # 125:
"Only a part, not the whole"

More information about the Pd-list mailing list