Send bang if between 1-10?

    Jan 24 2013 | 12:45 pm
    Hello. I am creating a a patch that reads a live weather feed and corresponds musically. However I have reached a stopping point. I need to find out how to specify a number range and output a bang to start a sample playing.
    For example I want to have a separate sound for temperatures between 1-5. So I need to know how to specify "if 1-5 is present play sound".
    I have used regexp already in the patch but I don't think this is the answer. I also tried Coll but couldn't use it to complete this task.
    Thanks for any help.

    • Jan 24 2013 | 1:12 pm
    • Jan 24 2013 | 1:21 pm
      Thanks Karl but my numbers are fed in to a message box and I can't seem to work it even when I add them to a flonum.
    • Jan 24 2013 | 1:32 pm
      Please send a patch where we can see what the format in the message box looks like.
    • Jan 24 2013 | 1:53 pm
      Yes Karl i have copied it here. You may not be able to collect the data as I am using an external script to collect it. But you will be able to see the manner in which my data outputs.
    • Jan 24 2013 | 3:50 pm
      I think the main problem is that you're setting message box contents with 'set', which will only set the message box, but won't give you any output. One solution is to put a [route] object instead of your message boxes which will drop the 'set' prefix of your messages. I modified your patch to show you what I mean.
      Hope this helps, Ádám
    • Jan 24 2013 | 4:03 pm
      Thank you gents. This has indeed solved my problem. Great work.