Accessing parameter values in genexpr

goodparleyandorfing's icon

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

Max Patch
Copy patch and select New From Clipboard in Max.

This works:

Max Patch
Copy patch and select New From Clipboard in Max.

But this doesn't:

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's icon
Max Patch
Copy patch and select New From Clipboard in Max.

you can just simplify that:

goodparleyandorfing's icon

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.

Max Patch
Copy patch and select New From Clipboard in Max.

Essentially I want this, but using genexpr:

Seems there must be a way...

pid's icon
Max Patch
Copy patch and select New From Clipboard in Max.

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:

shame... maybe one day?

goodparleyandorfing's icon

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...