SawProcessor
A monophonic saw synthesizer made of seven detuned saw oscillators.
| Declared in | src/libs/libbahn/bahn/tracker/processor/SawProcessor.hpp |
| Inherits | Processor |
| Group | bahn |
Detailed description
The Note parameter sets the pitch, and a note off silences the voice. The Volume parameter sets the level. The seven oscillators are spread around the note frequency, and their sum makes a thick saw sound. The level moves toward its target over 5 ms, so a note does not click.
Member function documentation
setSampleRate
[override virtual] void SawProcessor::setSampleRate(int rate)
Follow the device: rate is the sample rate of the output device, in Hz. A rate of zero or less, or a rate equal to the current one, changes nothing.
Called by BahnPlayer::broadcastSampleRate once the speaker's format is known. ProcessorFactory builds every processor at bahn::DEFAULT_SAMPLE_RATE before the device is open, so without this the node stays at 44100 whatever the hardware is doing.