ofxPDSP
pdsp::UsesSlew Class Reference

Slewing behavior. More...

#include <UsesSlew.h>

Inheritance diagram for pdsp::UsesSlew:
pdsp::SequencerValueOutput pdsp::ValueControl

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...
 

Detailed Description

Slewing behavior.

Classes that inherits from UsesSlew have some slewing of signal (usually control signals). Think about it as them implementing "portamento" between values.

Member Function Documentation

◆ setSlewRateModeReference()

void pdsp::UsesSlew::setSlewRateModeReference ( float  valueReference)

sets the reference value for Rate mode slewing.

Parameters
[in]valueReferencecalibration 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.

◆ setSlewTime()

void pdsp::UsesSlew::setSlewTime ( float  slewTimeMs,
SlewMode_t  mode = Time 
)

sets the slew time in milliseconds

Parameters
[in]slewTimeMsthe time for slewing
[in]modethe 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 .


The documentation for this class was generated from the following files: