Module dlib.audio.synth

Functions

NameDescription
fillSynth(sound, channel, synth, freq, startTime, duration, amplitude) Fill a given portion of a sound with a signal from specified synthesizer.
mixSynth(sound, channel, synth, freq, startTime, duration, 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(snd, ch, 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(snd, ch) Generate random audio signal. snd = sound ch = channel to fill (beginning from 0)

Interfaces

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

Classes

NameDescription
FMSynth Frequency modulation synthesizer
SawtoothWaveSynth Sawtooth wave synthesizer
SineWaveSynth Sine wave synthesizer
SquareWaveSynth Square wave synthesizer
TriangleWaveSynth Triangle wave synthesizer