Forums > Gen

Accessing parameter values in genexpr

January 28, 2012 | 5:14 pm

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



pid
January 28, 2012 | 5:47 pm

you can just simplify that:

– Pasted Max Patch, click to expand. –

January 28, 2012 | 6:15 pm

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…



pid
January 28, 2012 | 8:16 pm

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?


January 28, 2012 | 8:38 pm

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…


Viewing 5 posts - 1 through 5 (of 5 total)