Two-way number conversion

Oct 23, 2012 at 2:20pm

Two-way number conversion

Hello all! I’m new here to the forum, and something’s been bugging me which I can’t figure out.

I’ve made a patch which coverts a number (in flonum) to a different unit of measurement.
So I essentially have two flonum boxes which say

FLONUM degrees C = FLONUM degrees F

Question is, what can I do to the patch to make it backwards compatible? As in, so when I modify the value of ‘degrees F’ it changes the ‘degrees C’ flonum without creating a loop and stack error? Anything which does not require extra Max externals would be great!

Thanks :)

#64886
Oct 23, 2012 at 2:27pm

I don’t believe that you’ll be able to get away with using not extra Max objects at all, but have you taken a look at the “set” message?

#233944
Oct 23, 2012 at 2:33pm

I didn’t consider that. What would it allow the patch routing to do?

#233945
Oct 23, 2012 at 3:29pm

As the refpage says, it sets a value without causing output, which is how you avoid stack overflows

#233946
Oct 23, 2012 at 3:45pm

Hi,

– Pasted Max Patch, click to expand. –
#233947
Oct 24, 2012 at 4:33am

that´s a cool definition of “backwards compatible”.

#233948

You must be logged in to reply to this topic.