This is a very specialized object that performs the hard-sync operation using two SynthClocks.
More...
#include <synthbase.h>
|
bool | reset (double _sampleRate, double startPhase, int32_t xfadeSamples=16) |
| Specialized reset function that: More...
|
|
bool | setHardSyncFrequency (double hardSyncFrequency) |
| Sets the new reset oscillator frequency in Hz. More...
|
|
SynthClock & | getHardSyncClock () |
|
SynthClock & | getCrossFadeClock () |
|
void | startHardSync (SynthClock oscClock) |
| Starts the hard sync operation as a result of being reset, using the main oscillator's SynthClock to get the number of sub-samples to offset the clock with (see synth book). The crossfader object is then started. More...
|
|
double | doHardSyncXFade (double inA, double inB) |
| Perform the crossfade on the two oscillator signals to smear over the discontinuity. More...
|
|
bool | isProcessing () |
|
void | addPhaseOffset (double offset) |
| Add a phase offset to the reset clock; for supporting phase modulation. More...
|
|
void | removePhaseOffset () |
| Remove existing a phase offset to the reset clock; for supporting phase modulation.
|
|
This is a very specialized object that performs the hard-sync operation using two SynthClocks.
- designed for use with an oscillator that is using a SynthClock for the timebase and running at a rate that is HIGHER than the MIDI pitch, called the "main oscillator" in the synth book
- contains two SynthClocks: one is used as the "reset oscillator" in the synth book
- the other is used as a timer for smearing over the discontinuity
- Author
- Will Pirkle http://www.willpirkle.com
- Version
- Revision : 1.0
- Date
- Date : 2021 / 04 / 26
◆ addPhaseOffset()
void SynthLab::Synchronizer::addPhaseOffset |
( |
double |
offset | ) |
|
Add a phase offset to the reset clock; for supporting phase modulation.
for hard syncing with phase modulation
- Parameters
-
◆ doHardSyncXFade()
double SynthLab::Synchronizer::doHardSyncXFade |
( |
double |
inA, |
|
|
double |
inB |
|
) |
| |
Perform the crossfade on the two oscillator signals to smear over the discontinuity.
- Parameters
-
inA | input A for crossfade - will be the output of the currently running oscillator |
inB | input B for crossfade - will be the output of a shadow oscillator that has been reset |
◆ reset()
bool SynthLab::Synchronizer::reset |
( |
double |
_sampleRate, |
|
|
double |
startPhase, |
|
|
int32_t |
xfadeSamples = 16 |
|
) |
| |
Specialized reset function that:
initialization
- resets the reset-oscillator
- resets the crossfader
- sets the crossfade time in samples - usually just a few (4-10) samples during smear-over
- Parameters
-
_sampleRate | fs |
startPhase | the starting phase of the reset oscillator; used when the main oscillator is phase shifted at the note-on time |
xfadeSamples | crossfade time for discontinuity |
◆ setHardSyncFrequency()
bool SynthLab::Synchronizer::setHardSyncFrequency |
( |
double |
hardSyncFrequency | ) |
|
Sets the new reset oscillator frequency in Hz.
hard sync functions
- Parameters
-
hardSyncFrequency | frequency in Hz of the reset oscillator |
◆ startHardSync()
void SynthLab::Synchronizer::startHardSync |
( |
SynthClock |
oscClock | ) |
|
Starts the hard sync operation as a result of being reset, using the main oscillator's SynthClock to get the number of sub-samples to offset the clock with (see synth book). The crossfader object is then started.
- Parameters
-
The documentation for this class was generated from the following files: