Skip to content

Reference library > Oscillators > SawOscillator

SawOscillator

SawOscillator(frequency=440, phase_offset=None, reset=None)

Produces a (non-band-limited) sawtooth wave, with the given frequency and phase offset. When a reset or trigger is received, resets the phase to zero.

Examples

#-------------------------------------------------------------------------------
# Simple saw wave oscillator shaped by an envelope
#-------------------------------------------------------------------------------
saw = SawOscillator(440)
envelope = ASREnvelope(0.05, 0.1, 0.5)
output = StereoPanner(saw * envelope) * 0.5
output.play()

Last update: 2024-02-18
Created: 2023-12-03