Set numbers in a range to equal a fixed value


I’m putting an analog signal into VVVV using an Arduino. But I want values in certain ranges to equal certain things, i.e. -15 to 15 is 0, 16 to 40 is 45. The only way I’ve figured out to do this is by doing an if loop with that range, and then getting it to display the number as a string (which I’ve manually typed in), then repeating it for the entire range. It seems like there should be an easier way to do this? Any suggestions would be appreciated. I’ve attached an image of a segment of it below.

Please attach your patch. It’s much easier to check out and modify an actual patch than having to repatch the whole thing looking at a blurry screenshot.

Display range numbers as single value Rev2.vl (167.7 KB)
Thanks @bjoern , Sorry about the blurry image

Looking at your patch I’d really encourage you too brush up on a few things first:

  1. Check out spreads and how to use them to manage items.

  2. Have a look at ForEach and maybe also Repeat.

  3. Do a tutorial that does something making use of spreads and loops, for example Playing with Truchet Tiles.

  4. If time permits watch the more extensive Introduction to vvvv For Designers and Object Oriented Patching.

  1. Look at your problem again.
  2. Ask questions here or in the chat if necessary.


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.