deltaclip~ clips at zero - is this a bug?

Leigh Marble's icon

I just noticed this about deltaclip~, when a patcher wasn't working as expected: the output of deltaclip~ is clipping signals at zero (does not go below).

The MSP Reference Manual says of deltaclip's output that "The input signal is sent out, with its change limited by the minimum and maximum slope values".

Easy to check this: open the deltaclip~ help patch, and change the "zero" number box at the top to the value of -1.

So, bug or feature?

Leigh

PS: I tested this in both Max 4.5 and 4.6, both on OS 10.3.9, and the results are the same.

Also tried with Max 4.6 on OS 10.4.8 - result was the same there too. In addition, I had to remove the delta~ object from the deltaclip~ help patch on that system, because otherwise Max would crash as soon as I started audio processing.

Stefan Tiedje's icon

Leigh Marble schrieb:
> So, bug or feature?

This looks like a bug. if you set the min to -1. it will go to the set
input... probably some c-typic type confusion...

But it will revert to zero if I do big jumps. Set the min to -1. Then
set the input to -1: the output will show it. Then type in -20. The
output will go back to 0. If you slowly move the input to -20. the
output will follow...

I guess this needs a fix, it seems totally broken for negative inputs...

Stefan

--
Stefan Tiedje------------x-------
--_____-----------|--------------
--(_|_ ----|-----|-----()-------
-- _|_)----|-----()--------------
----------()--------www.ccmix.com

Leigh Marble's icon

Thanks Stefan.

A workaround for now is (for signals in the range -1 to 1), to offset the input and output of deltaclip~ as such:

[+~ 1] -> [deltaclip~] -> [-~ 1]

This way deltaclip only sees postive values.

Leigh