I am using moses to do some conditional logic, problem is there is a LOT of data coming in, and it send out string every time the data comes in. is there a way to send only a single output only when the threshold is crossed?
-
-
threshold seems to only work when you cross over that exact number. I need it to fire anytime it is between 1-10 at least once, even if it starts on 3. that's the problem is that I don't know exactly what number it will really start on.
-
Just extend mod's suggestion:
[div 10]
|
[change -1]
|
[sel 1]You're probably missing the first bang because the default state of [change] is 0.
-
sorry I seem to really suck at this. I did what you said and still not desired result. Here is example of what I did.
http://localhostr.com/files/iSk0Skz/Screen+shot+2011-11-22+at+8.35.47+AM.jpg
It indeed sends bang when I hit exactly 10 but I need it to bang when I send 1 and 9 as well. so anything between 1-10 should bang once and only once until it exits threshold, then comes back. so lets say I press 2 [bang] 4 [no bang] 9 [no bang] 12 [no bang] 3 [bang] 4 [no bang]
I appreciate that help. I tried reading documentation, but it is still a bit esoteric to me.
-
wow, never mind. It seems moses does in fact do exactly what I want. When I tried it earlier it seemed like it was sending bang every something matched below 10 if i had [moses 10]. but it seems to only send a single bang out.
sorry I'm a dummy. Definitely appreciate all the patience!
-
you must be doing a double error then, cos moses definitely doesn't work like that. also, it doesn't output 'bangs', it outputs numbers.
here, what you should do is in the attached patch
-
Sorry, lukasz. That should actually be [sel 0].
-
@mod said:
you must be doing a double error then, cos moses definitely doesn't work like that. also, it doesn't output 'bangs', it outputs numbers.
here, what you should do is in the attached patch
mod this is exactly what I need! bit confused on the change -1 though. I added some number atoms in between to see what was actually going on. it doesn't seem to change output of div 10 at all. read the documetation and it says it outputs only when the input it changed, this seems useless though since the output is always changing, no? then +1 is just so you don't have 0 as output I'm assuming.
-
yes, the +1 is so you don't have a zero output (as midi channel zero is not needed)
to see why you need the [change] object, do this:
after the [div 10], send one more cable to a new object: [print before]
and then after the [change -1], send one more cable to a new object: [print after]
now feed some numbers in to the [div 10], and see why the change object is needed. Without it, you get retriggered notes, which is precisely what you said you want to avoid.
-
@lukasz said:
the output is always changing, no?
no, it's not.
if you input 1,3,5,7,15 into the [div 10], then it will output:
0,0,0,0,1
however, what you said you want is just 0,1
that's why you use the [change] object - to suppress the repeated outputs