Page 1 of 1

Simple Maths - Conceptual Problem

Posted: 21 Apr 2013, 10:28
by Tom Ellard
Hello everyone, a new user trying to make a very simple artwork for a gallery here in Australia. My problem is a conceptual one and hopefully very easy for a seasoned Ventuz master!

Stated very simply I'm having trouble understanding variables; how to create X = (X + Y)/2 without causing a loop.

In more detail; I have a colour which I mix with another colour by using R, G and B Integer Expressions. This feeds to a new colour which I then want to copy back to the original for further mixing. The user touches an object, this sends a colour to my mixer. But of course if I then link the result back to the source I can't stop that event from cycling into an infinite loop.

I think I'm misreading the way Ventuz 'thinks' and I'd be thankful for any re-orientation.

Re: Simple Maths - Conceptual Problem

Posted: 22 Apr 2013, 12:01
by Karol
Hi Tom!

Ventuz allows on in very rare cases a recursive binding.
In most case you have to use the Loop Breaker node which causes one frame delay in validation to resolve the infinite binding/validation problem.

Best Regards

Karol

Re: Simple Maths - Conceptual Problem

Posted: 23 Apr 2013, 04:42
by Tom Ellard
Thank you for the advice. Unfortunately I don't have the Loop Breaker available to me in Ventuz Touch. So I am trying to set up a similar delay, most likely by having the calculation take place as the user touches the control and then the feeback loop when they exit the touch. If that doesn't feel right maybe I can use a delay in an Event node.

Another idea is to have a background task that copies the result to the source every few frames.

I think I can see how to do this, but I guess I am puzzled by how Ventuz handles assignment to variables, it's really strange compared to e.g. MaxMSP where there is a 'bang' that causes the data flow.

Cheers.

Re: Simple Maths - Conceptual Problem

Posted: 30 Apr 2013, 07:35
by happyt
Could you get the same 'bang' from using a Mover node to set things off?

Re: Simple Maths - Conceptual Problem

Posted: 30 Apr 2013, 18:28
by chriss0212
in ventuz you can also get a "bang" if a value changes. just put an event behind a variable and bind it with the invoke!

greetz

christian

Re: Simple Maths - Conceptual Problem

Posted: 01 May 2013, 11:24
by Tom Ellard
Thank you for the replies. I think that I would need to set up a 'heartbeat' or metronome (to use a Max Jitter term) and that might work, almost like a game loop. But as I am new to Ventuz I think I haven't thought it out in the right 'language' and so I have done it all again with the user always mixing the colours and a maths decay which slowly brings it back to zero again - like playing a long note on a piano!

This for an artwork to be shown in the 2013 International Symposium of Electronic Arts. We have rebuilt a 20th century mechanical light machine, and I am using Ventuz to give the viewer a touch painting surface. Probably not the right tool but it's working now.

Cheers.