Hello Ventuzians!
THE FORUMS ARE CLOSED!

Please join our discord server HERE!! << click me :D

We are shutting our Ventuz Forum, but don't worry, it will all be archived for you to search in if you have a query. From now on, please add all your comments, questions or observations into our Discord Server

Thanks for the great time - see you on discord!!
Dee, Karol, Daniel and the whoooole Product and Support team!

Simple Maths - Conceptual Problem

Q and A about functionality and how to solve a special task for your application.

Moderator: Support

Post Reply
Tom Ellard

Simple Maths - Conceptual Problem

Post by Tom Ellard » 21 Apr 2013, 10:28

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.

User avatar
Karol
Posts: 640
Joined: 10 Jan 2012, 12:07

Re: Simple Maths - Conceptual Problem

Post by Karol » 22 Apr 2013, 12:01

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

Tom Ellard

Re: Simple Maths - Conceptual Problem

Post by Tom Ellard » 23 Apr 2013, 04:42

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.

happyt
Posts: 4
Joined: 07 Mar 2013, 00:46

Re: Simple Maths - Conceptual Problem

Post by happyt » 30 Apr 2013, 07:35

Could you get the same 'bang' from using a Mover node to set things off?

chriss0212
Posts: 666
Joined: 18 Jan 2012, 20:56
Location: wuppertal
Contact:

Re: Simple Maths - Conceptual Problem

Post by chriss0212 » 30 Apr 2013, 18:28

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

Tom Ellard

Re: Simple Maths - Conceptual Problem

Post by Tom Ellard » 01 May 2013, 11:24

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.

Post Reply