ofxPDSP
|
Slewing behavior. More...
#include <UsesSlew.h>
Public Member Functions | |
void | setSlewTime (float slewTimeMs, SlewMode_t mode=Time) |
sets the slew time in milliseconds More... | |
void | deactivateSlew () |
sets the slew time to 0.0f | |
void | setSlewRateModeReference (float valueReference) |
sets the reference value for Rate mode slewing. More... | |
Slewing behavior.
Classes that inherits from UsesSlew have some slewing of signal (usually control signals). Think about it as them implementing "portamento" between values.
void pdsp::UsesSlew::setSlewRateModeReference | ( | float | valueReference | ) |
sets the reference value for Rate mode slewing.
[in] | valueReference | calibration value for Rate mode |
sets the reference value for Rate mode slewing. For example if we are slewing some pitch control, slew time is 50ms and this value is 7.0f the algorithm will more or less take 50ms to travel 7 semitones. I say "more or less" as the algorhitm emulates analog capacitors so it is slower when it approaches the destination value.
void pdsp::UsesSlew::setSlewTime | ( | float | slewTimeMs, |
SlewMode_t | mode = Time |
||
) |
sets the slew time in milliseconds
[in] | slewTimeMs | the time for slewing |
[in] | mode | the mode of slewing, if not given is Time. |
The two available slew mode are Time and Rate. In Time mode you set the time for slewing to a value to another and it is not important how the values are distant. In Rate mode you set the time it takes for the slew to change of a given amount. You set this amount with setSlewRateModeReference(), the standard is 12.0f .