Doh! I can’t think of the maths to figure out how to do this in vvvv.
First number range is:
0-15 (including 0 and 15)
…and then all the other number ranges after this ie:
So what I want to do is input a number and then have returned what number range this belongs to.
So if I enter 18 it will return 2 (ie the Second range 16-31)
If I enter 75 it will return 5 (ie the Fifth range 64-79)
If I enter 49 it will return 4 (ie the Fourth range 48-63)
And so on…
Any ideas? I’m sure it’s simple I just can’t figure it out!
My first thought is a Frac (Value) connected to an Equals (Value) and using the epsilon to define the range of your values.
Does this make sense? There may be a much better way to patch it, good luck!
Hmmmm, could you show me it in a quick patch?
wait sorry I didn’t really pay attention but can’t you solve this by just dividing by 16?
idividethingsby16thenadd1.v4p (2.7 kB)
Yeah, that’s simpler :) Thanks!
Oh dear feel like I’m at school again :) Thanks!
You can also use dynamic plugins. It’s really fast to do math and logic calculations with it.
but as kalle said, this is really just a division and a frac…
using Answer = roundup(input + 1)/16)
Using Answer = Roundup ((input+1)/16)
Using Answer = Roundup((input+1)/16)
try this… no text …
DividedRange.v4p (15.4 kB)