Send bang if between 1-10?
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.
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.
Please send a patch where we can see what the format in the message box looks like.
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.
Hi,
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
Thank you gents. This has indeed solved my problem. Great work.