[PD] how to set variable types

AshK ashk at azylum.net
Sat Jul 29 21:51:34 CEST 2006


Since this abstraction is not working yet I have started to do the math 
myself the way you mentioned and I realized I'm going to have to bind a 
*lot* of MIDI parameters and they will often change so I'd like to make 
this abstraction work and I thought setting a variable was easy.

I was trying to do that "sub" abstraction you are talking about so yes 
it makes a lot of sense but I didn't succeed so I'm not sure I really 
get it but if you say it works then I'm going to try again.

thanks

derek holzer wrote:
> Well, I see exactly what you are trying to do, but it's not exactly the 
> right way to do it.
> 
> In this case, you would have to set the value of $3 external to the 
> abstraction. Since the [ctlin] object doesn't take any inputs, it can 
> only get variables from creation arguments.
> 
> If you really wanted to dynamically create this abstraction, which would 
> automatically create the LSB channel of the control in message, you 
> could create another abstraction within the abstraction, and add 32 to 
> the channel number in the first-level abstraction which would pass it as 
> a creation argument to the inner-most abstraction.
> 
> Does that make sense?
> 
> Otherwise, and probably what I would do, would be to simply create the 
> abstraction you made already with three creation arguments and do the 
> math yourself, i.e. make $3 equal to $1 + 32. Unless you're stubborn and 
> you simply *must* have the computer do all the work for you ;-)
> 
> Or maybe you have a more compelling reason why PD should dynamically 
> create these [ctlin]s without you having to think about it...?
> 
> best,
> d.
> 
> 
> 
> AshK wrote:
>> well I keep working on this patch on the working PD and I need help 
>> about how I can pass the $3 variable to the second [ctlin] (the one 
>> that uses $3 as an argument) ?
> 
> 




More information about the Pd-list mailing list