• ### Lo number=hi number/hi numb=lo numb

hi there

been racking my small brain over this, now it hurts and protests'.

i am using this patch to calculate distance between points from a kinect.
I want the large distance (value)to output a small value & the short distance to output a large value.

i.e turn it all around...

sorry, my maths not great, what is the equation/object/solution available to me?

thanks so much

drew

http://www.pdpatchrepo.info/hurleur/distance-difference.pd

• Posts 7 | Views 3935

you were very close the patch is in the attachment...

http://www.pdpatchrepo.info/hurleur/distance-difference1.pd

• ah, thanks for that - great, but sorry i put the question slightly wrong -
the distance between the 2 sliders represents the distance between players feet.

so, when sliders both come to the centre (at output 0.5) - feet are together. that should be the highest output value, when the sliders cross over, the value should count down again to output 0.

so each extremity outputs 0 - regardless of which side, and when both sliders in centre it outputs highest value

does that make sense?
sorry for confusion

drew

• so;rry, 1 other thing, top slider shouldn't control bottom slider, they should move independently

• ah ok, if I understood correctly, longer distance = smaller output and shorter distance, bigger output? In that case, [abs] object is the answer. Take a look at the attachment...
cheers!

http://www.pdpatchrepo.info/hurleur/distance-difference2.pd

• great! thank you

drew

• in case you want here it is with a flip that trurns around when sliders cross over.

you can choose to flip or not with toggle at top right

http://www.pdpatchrepo.info/hurleur/dist-diff-flip.pd

Posts 7 | Views 3935
Internal error.

Oops! Looks like something went wrong!