dlib.audio.synth

Simplest waveform synthesizers

Members

Classes

FMSynth
class FMSynth

Frequency modulation synthesizer

SawtoothWaveSynth
class SawtoothWaveSynth

Sawtooth wave synthesizer

SineWaveSynth
class SineWaveSynth

Sine wave synthesizer

SquareWaveSynth
class SquareWaveSynth

Square wave synthesizer

TriangleWaveSynth
class TriangleWaveSynth

Triangle wave synthesizer

Functions

fillSynth
void fillSynth(Sound sound, uint channel, Synth synth, float freq, double startTime, double duration, float amplitude)

Fill a given portion of a sound with a signal from specified synthesizer.

mixSynth
void mixSynth(Sound sound, uint channel, Synth synth, float freq, double startTime, double duration, float amplitude)

Additively mix a signal from specified synthesizer to a given portion of a sound. sound = a sound object to write to channel = channel to fill (beginning from 0) synth = synthesizer object freq = synthesizer frequency startTime = start time of a signal in seconds duration = duration of a signal in seconds amplitude = volume coefficient of a signal

sineWave
void sineWave(Sound snd, uint ch, float freq)

Fill the sound with simple sine wave tone. snd = sound ch = channel to fill (beginning from 0) freq = frequency in Hz. For example, a dial tone in Europe is usually 425 Hz

whiteNoise
void whiteNoise(Sound snd, uint ch)

Generate random audio signal. snd = sound ch = channel to fill (beginning from 0)

Interfaces

Synth
interface Synth

An interface for a synthesizer that maps sample position to -1..1 sample value

Meta

Authors

Timur Gafarov