Skip to content

Audio.Oscillator

Name Mandatory Description Default Type
⬅️ Input Accepts a float value representing the frequency of the waveform in Hertz (Hz). Float
Output ➡️ Outputs audio data as an Audio chunk, containing the generated waveform samples. Audio
Type No The waveform type to oscillate (Sine, Square, Triangle or Sawtooth). Waveform::Sine Waveform
Amplitude No A float representing the waveform amplitude. 0.4 FloatVar(Float)
Channels No An int representing the number of desired output audio channels. 2 Int
SampleRate No An int representing desired output sampling rate. Ignored if this shard is inside an Audio.Channel. 44100 Int
Samples No An int representing desired number of samples in the output. Ignored if this shard is inside an Audio.Channel. 1024 Int

Experimental/unstable

This API is experimental and might produce unexpected results or crash.

This shard generates audio waveforms. It can produce various types of waveforms such as sine, square, triangle, and sawtooth. The Oscillator is typically used within an Audio.Channel and can be controlled by other shards to create dynamic audio effects or synthesize sounds.