No matching definitions.

signal/osc

src/signal/osc.tur
defn

sine

(sine [freq :float phase :float])

sine-wave oscillator Signal Function.

freqfrequency in Hz
phaseinitial phase offset in radians

An SF: ignores its input signal and emits sin(2*pi*freq*t + phase).

(sine 440.0 0.0)
defn

square

(square [freq :float dutycycle :float])

square-wave oscillator Signal Function.

freqfrequency in Hz
dutycycleduty cycle in [0, 1]

An SF emitting +1.0 for the on-portion of each cycle, -1.0 otherwise.

(square 220.0 0.5)
defn

sawtooth

(sawtooth [freq :float])

sawtooth-wave oscillator Signal Function.

freqfrequency in Hz

An SF emitting a rising ramp in [0.0, 1.0).

(sawtooth 110.0)
defn

triangle

(triangle [freq :float])

triangle-wave oscillator Signal Function.

freqfrequency in Hz

An SF that rises from -1.0 to 1.0 over the first half of each cycle and falls back to -1.0 over the second.

(triangle 440.0)
Internal definitions
__dsp_sin-- compute sine of angle in radians.
__dsp_fmod-- compute floating-point modulo.