Accessing parameter values in genexpr

Jan 28, 2012 at 5:14pm

Accessing parameter values in genexpr

Hi, could anybody tell me how to access the same parameter across more than one genexpr?

This works:

– Pasted Max Patch, click to expand. –

But this doesn’t:

– Pasted Max Patch, click to expand. –

Gen doesn’t seem to like the parameters being declared twice, but I can’t see how else it’s possible to access the same parameter across genexpr’s.

Thanks for any assistance

#61512
Jan 28, 2012 at 5:47pm

you can just simplify that:

– Pasted Max Patch, click to expand. –
#221935
Jan 28, 2012 at 6:15pm

Hi Pid – sorry, perhaps I wasn’t clear. I just want to know how to access the same parameter across different genexpr’s, using the parameter name as an argument. Your first solution is the situation I want to avoid, of having multiple param operators across the patch. The second one would be the same as having multiple outlets from genexpr, which seems the only solution at the moment.

Essentially I want this, but using genexpr:

– Pasted Max Patch, click to expand. –

Seems there must be a way…

#221936
Jan 28, 2012 at 8:16pm

ah, indeed, this seems not to work.
when you said “genexpr” i thought you meant the language ‘GenExpr’, not the gen~ object [expr].
what i do a lot is make a pile of [param] objects and just alias them into code and do everything in [codebox] GenExpr language. it works that way round, but not the way you want it it seems:

– Pasted Max Patch, click to expand. –

shame… maybe one day?

#221937
Jan 28, 2012 at 8:38pm

Thanks, pid. And apologies for any confusion re: GenExpr, gen~ [expr], [codebox] and, indeed, max [expr]! You’re right, codebox is really the way to go with this rather than [expr]. It’s screen space more than anything – I can’t wait till encapsulation is introduced…

#221938

You must be logged in to reply to this topic.