Opposite of 'past' object?

Apr 25, 2012 at 7:43am

Opposite of 'past' object?

Hi all,

I need to send a bang when a number is reached in a descending run of numbers. Like ‘past’ bangs from low to high, but opposite.

I can’t seem to find something like that.

‘select’ doesn’t respond quickly enough. ‘< ' bangs at every number less than. I need it to bang only when it gets the specified number and only when on the descend.


Apr 25, 2012 at 7:59am

can you not just use past, with num*-1 and take you number away from 0, i.e. if the threshold is 40

– Pasted Max Patch, click to expand. –
Apr 25, 2012 at 11:55am

You can also use a scale object to mirror the stream of numbers.

Marc P.

  1. InversePast.maxpat
Apr 25, 2012 at 1:47pm

Simplest way I know is:

– Pasted Max Patch, click to expand. –


Apr 25, 2012 at 4:30pm

>select’ doesn’t respond quickly enough

Damn, how fast are you transmitting data here? I’d like to see the patch in question.

Apr 25, 2012 at 8:34pm

Thanks guys! Three great options.

@Wetterberg: I’m using cv.jit.mass for motion tracking. It might be that cv.jit.mass isn’t putting out every number?

Apr 25, 2012 at 9:31pm

I found this knocking about in my ‘downloaded help’ folder. I can’t remember who to give credit to for this, it’s a [js] solution.

  1. reversepast.js
Aug 6, 2012 at 6:53am

(Refreshing memories :)
Hello, the one to be given credit for that [js] solution would be me; it originated in this topic:


Though being an ultra-short routine, it still had redundant code to be simplified, that escaped my attention in my earlier posts to the topic above.

The recent version can be found in the zip attachment I posted to the topic below:



Aug 6, 2012 at 2:50pm


Aug 6, 2012 at 5:01pm

Could you rephrase your question please?

EDIT: I think you were referring to an object (?)

Aug 6, 2012 at 7:41pm

Yes, you were… :)
[trough] seems to be the opposite of [peak], and does not seem to function as the opposite of [past], because -besides outputting different things- (the doc means that) it continuously updates the “threshold”, but a constant one is needed in this case…
… I think.

Aug 6, 2012 at 7:51pm

You’re right. I was responding off the top of my head without reading very carefully or giving it much thought (which was not a great idea), and you’re correct that trough is the opposite of peak, not past. I like big_pause’s solution, which is economical and seems pretty problem-free.


You must be logged in to reply to this topic.