What don't I understand about [minimum] and [maximum]?

Feb 22, 2012 at 6:53pm

What don't I understand about [minimum] and [maximum]?

Alright, this is probably, once again, too simple of a question, but I seem to be having a blackout here.

How I expect maximum to behave (and of course minimum as well):

Increasing values should be output, while values smaller than the last maximum output that maximum instead, until the object receives a new maximum in its right inlet.

How it really behaves:

Decreasing value are output.

Example: Here is how I expect [maximum 0] to behave:

Into the left inlet: 1 2 3 4 5 4 3 2 1
Out of the left outlet: 1 2 3 4 5 5 5 5 5

But here is how it really behaves:

Into the left inlet: 1 2 3 4 5 4 3 2 1
Out of the left outlet: 1 2 3 4 5 4 3 2 1

Surely I am missing something simple here and just having a brain freeze, but the documentation did not seem to hold answers for this.

#61910
Feb 22, 2012 at 7:14pm

[maximum 0] behaves as expected! All values will be greater than 0:

into the left inlet: 1 2 3 2 1 0 -1 -2 -3
out of left outlet: 1 2 3 2 1 0 0 0 0

so in order to get your expected behaviour you need to update the right inlet

#223560
Feb 22, 2012 at 7:26pm

I see, this was what I suspected… Thank you! I find it a bit misleading then what the reference and help files state, quote:

Watches an input stream for any number which is greater than its most recently set maximum, sets that new number as the maximum, and outputs it.

“Sets that new number as the maximum” sounds to me like the initial maximum is overwritten with the newly received maximum from the left inlet, which doesn’t in fact happen.

#223561
Feb 22, 2012 at 7:36pm

remember: setting a value is usually happening through the right inlet. In any case, I remember when I used this object the first time, I had the same assumption! :)

#223562
Feb 22, 2012 at 8:34pm

it will behave like you thought when you give the input to both inlets starting with the right one.

1,2,3,4,5
|
t i i (just to make sure)
|
maximum 0

p.s. but you are right about that tutorial.

#223563
Feb 22, 2012 at 8:35pm

… or you can use peak/trough instead of maximum/minimum
aa

#223564
Feb 22, 2012 at 8:39pm

The peak object is closer to what you want here, I think.

#223565

You must be logged in to reply to this topic.