How to read value of a variable "value x" (without sending bang to a "v x" obj)

Oct 21, 2010 at 5:37am

How to read value of a variable "value x" (without sending bang to a "v x" obj)

Hi,
I have multiple “v x” in my patches.
Now, in my mxj object, I need value of x.

I DON’T want to have a trigger at input of “v x” which sends the value out every time it changes.

I just want to read value of “x” when I need, synchronously.

How I can do this in mxj ?

Thanks
Chris

#52861
Oct 24, 2010 at 6:02pm

it’s not pretty, but you could use this.getPatcher() to get the patcher your MXJ is in, then create a new val box with the same name as your other val using MaxPatcher.newObject() or newDefault, connecting it to an inlet on your MXJ, and then send it a bang. you would have to set up a method in your object to receive that message. you can then destroy the extra val object with MaxBox.remove().

#190017
Oct 28, 2010 at 10:43am

Hi, that’s what I want to avoid…
Strange that there is no way to access “v” value

Chris

#190018

You must be logged in to reply to this topic.