Skip to content

Reference library > Oscillators > SineOscillator

SineOscillator

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

Produces a sine wave at the given frequency.

Examples

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

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