Hi folks, I’m finding myself a bit stuck, and wondering if anyone might have an idea for an efficient way to emulate a certain physical behavior. Consider this example:
[metro 1000]
|
[random 1000]
|
[/ 1000]
|
[pack f 1000]
|
[line]
The output will be a series of random one second ramps between 0-1. This gives a rough impression of drifting/floating about the range, however the change in velocity between each ramp is instantaneous & jagged.
What I’m wondering is: how can one smooth out the transitions between ramps, and give the output a sense of inertia/momentum, while preserving the unpredictable, random motion?
I am aware of the pmpd library, which is a powerful tool for physical modeling, but I suspect there might be a computationally cheaper way to accomplish this task. (which is important for my use case)
Do I need to break out the dusty old physics calculations & calculate acceleration/velocity/etc., or is there a simpler solution that has a similar effect? Perhaps using [line] is the wrong approach, since it outputs linear ramps… I wonder if I should be polling a value for current velocity with a metro, and then curving the change in velocity towards the new random position via table lookup or some [expr] function?
Thanks in advance for any thoughts!