Implementing randomness


#1

Hi all

I'm trying to alter the adsr object in a way that all parameters can be altered by a random generator. Not just modulated, but fully randomized. Like the random function used in Crystal VST synth. It can be done via MIDI, but for learning purposes I'm trying it to achieve via altering the object. But I'm stuck now. For instance, if I want to let release value (param_r in code) be dependent of inlet_r (extra frac32 inlet), the mapping between input value (-64->64) and release value is not ok. Can this be achieved this way? Or am I missing something basic here and are there other ways of fully manipulating the parameters by external input (not MIDI)?

Thanks for the help!

BTW: axoloti's being really quite addictive....


#2

Some parameter types (for example those used on the adsr envelope) have a remapping between parameter value shown in the GUI and the value in the dsp code ("pfunction"). For instance from logarithmic scaling to linear scaling.
This enables moving some computations out of the dsp-code, increasing efficiency. But also assumes parameters are changing less frequently than control rate.

Manipulating parameters without creating an custom object variant: check objects/patch/modulator.axh