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

Secip Xynic's icon

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.

Sebastian Lexer's icon

[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

Secip Xynic's icon

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.

Sebastian Lexer's icon

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! :)

Roman Thilenius's icon

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.

andrea agostini's icon

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

Chris Muir's icon

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