Hello, the Nyquist works, but unfortunately, it is not a real slewrate, as the slope is slewed everywhere, not only at places where the slope is of an exceeding slew. Normally a sine i. e. shall be unmodified at its peaks. Maybe a different function is able to do what I want.
Hello, my intension is to get a slewrate function like the red one in the diagram. I simulated this with Excel. The difference to the snd-chase function is, that the actual slope is computed by the original signal only and not the green curve, made by the difference between the modified signal and original sample value (which is made by snd-chase).
By the way, do you know where the code is behind the snd-chase function?
I’d never seen that function before, I just knew that *track*is used in the most recent version of Nyquist. Apparently it was created for fading audio, so designed to work over ~1sec time-scale
(snd-chase sound risetime falltime)
A slew rate limiter. The output “chases” the input at rates determined by risetime and falltime. If the input changes too fast, the output will lag behind the input. This is a form of lowpass filter, but it was created to turn hard-switching square waves into smoother control signals that could be used for linear crossfades. If the input switches from 0 to 1, the output will linearly rise to 1 in risetime seconds. If the input switches from 1 to 0, the output will linearly fall to 0 in falltime seconds. The generated slope is constant; the transition is linear; this is not an exponential rise or fall. The risetime and falltime must be scalar constants; complain to the author if this is not adequate. The snd-chase function is safe for ordinary use. See snd-follow in Section “Signal Operations” for a related function.
Yes, I know this explanation. The function is clear for me: The output follows up the input as fast as it can, but limited by the slewrate defined by risetime and falltime. In most cases the output is formed to triangles. In my imagination I want to add the slopes from sample to sample to its last output values, where the slopes are limited by risetime and falltime. This results to much different signals, though.