|
SynthLab SDK
|
Crossfades two values (from A to B) and then holds B for some amount of time. More...
#include <synthbase.h>
Public Member Functions | |
| void | reset () |
| Reset to initial state; just resets counters to 0. | |
| void | setXFadeTimeSamples (uint32_t _xfadeTimeSamples) |
| uint32_t | getXFadeTimeSamples () |
| void | setHoldTimeSamples (double _holdTimeSamples) |
| Setting the hold time is slightly more complicated than the crossfade time becuase it may be done at any time; this requires checking and setting/clearing the holding boolean. More... | |
| double | getHoldTimeSamples () |
| XFadeData | getCrossfadeData () |
| Returns the current state of the crossfade or hold. More... | |
Protected Attributes | |
| uint32_t | xfadeTime_Samples = 4410 |
| target crossfade time | |
| uint32_t | xfadeTime_Counter = 0 |
| crossfade timer counter | |
| uint32_t | holdTime_Samples = 4410 |
| target hold time | |
| uint32_t | holdTime_Counter = 0 |
| hold timer counter | |
| bool | holding = false |
| state variable for holding | |
Crossfades two values (from A to B) and then holds B for some amount of time.
| XFadeData SynthLab::XHoldFader::getCrossfadeData | ( | ) |
Returns the current state of the crossfade or hold.
perform crossfade from FROM A to B
| void SynthLab::XHoldFader::setHoldTimeSamples | ( | double | _holdTimeSamples | ) |
Setting the hold time is slightly more complicated than the crossfade time becuase it may be done at any time; this requires checking and setting/clearing the holding boolean.
get/set hold time
|
inline |
get/set crossfade time