How? Numeral -> corresponding numeral -> bang

Nov 11, 2010 at 9:43am

How? Numeral -> corresponding numeral -> bang

I would like to send a bang from a number object, that reacts to a numeral output by a slider.

Is == the right object to output a bang (instead of a number)?

[attachment=145761,1353]

Attachments:
  1. Screen_shot_2010-11-11_at_8.39.27_PM.png
#53261
Nov 11, 2010 at 10:10am

Nearly there… just put a [select 1] (or [sel 1] ) object between each [== ] object and their message boxes; they send out bangs instead of numbers.

#191380
Nov 11, 2010 at 10:15am

Hi,

[==] output 1 if the two numbers are equal, 0 otherwise.
so yes, what you’re looking for is the [sel] object.

You can replace all the [==] of your patch by a single [sel 0 1 2 3 4 5]

By the way, if you’re new to max and this forum (welcome!), you should read that post :

http://cycling74.com/forums/topic.php?id=26095

that explains how to post a patch (that’s better than a pic).

Ch.

#191381
Nov 11, 2010 at 10:17am

first off you don’t need the [int] object if you have a number box, unless you need to store that int for later…
second, if you have a look at the helpfile of [==] it will tell you that if it receives the number provided it will output a 1 otherwise a 0. So you will either have to use a [sel 1] to get a bang or use a different object. By the look of it the object you want is [route] or [sel]. If you use a [route 0 1 2 3 4 5] or [sel 0 1 2 3 4 5] you should be good to go ;)

And one last thing. Did you notice the ugly red ERROR messages I am sure you are getting in the max window?? Don’t use object boxes for making notes!!! That’s what the comment box is for!!!!! press “c” in an open patcher to get a comment box, then use those for “RGB preset values for projector” :)

#191382
Nov 11, 2010 at 10:28am

…. just a quick patch to demonstrate the route and sel thing. Just copy and past everything below into an empty max window.

– Pasted Max Patch, click to expand. –
#191383

You must be logged in to reply to this topic.