Skip to content

Reference library > Oscillators > TriangleOscillator

TriangleOscillator

TriangleOscillator(frequency=440)

Produces a triangle wave with the given frequency.

Examples

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

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