Hi folks,

My first contribution to the Patch Repo (and greater Pure Data community at large)!

In my own performance patch, I found myself re-creating this concept over & over again with slightly different parameters, and eventually realized I should just make an abstraction to save myself a lot of time & energy in the future.

rm1.png

The basic idea is simple—essentially just feeding [random] into [line] so that values will float around within a defined range at unpredictable intervals (without discontinuities between the ramps). You can set a center value and deviation percentage, so that the ramps will stick close to a value within the overall range. For example: playing sound files with [phasor~] and [tabread4~], I often like to add a touch of warping to the speed, so with this module I can send the phasor speed to argumentname-randcenter, set a range of values around the center (with small deviation %), and let the warping begin without having to redo all of the math.

Also, the module's output is sent to both the outlet and also to a [send] which is set by the creation argument, thus you can use the receive name of an existing slider in your patch as a creation argument, set the min/max and other preferred parameters, and it's ready to go.

Finally, I added the low clip % control to prevent the "jumpiness" that results when very low values of [random] are fed into the right inlet of [metro] (which can sound like discontinuities in certain applications). So, for instance, if your maximum rate in milliseconds (set by rate_range) is 3000, and you set low clip to 10%, none of the ramps will be faster than 300 ms. And, setting low clip % to 100% will result in a regular metro pulse at the specified maximum rate.

Hope you find it useful! Feedback/improvements welcome of course. (and apologies for the messy patching with the min/max/center calculations, still learning how to keep simple math from looking incomprehensible with cables running all over the place…)

randmodule.zip

Cheers,
-Jon

rm2.png