Supex.Ugen.SinOsc (supex v0.2.0)

View Source

Module for the SuperCollider SinOsc sine wave generator, see https://doc.sccode.org/Classes/SinOsc.html

Defines a %SinOsc{} struct with

freq frequency in Hertz,

phase phase in radians (should be within the range +-8pi),

mul output will be multiplied by this value,

add this value will be added to the output.

Summary

Functions

Builds the SuperCollider command from the %SinOsc{} struct.

Functions

command(sin_osc)

(since 0.2.0)
@spec command(struct()) :: binary()

Builds the SuperCollider command from the %SinOsc{} struct.

example

iex> %SinOsc{freq: 440, phase: 0, mul: 0.1, add: 0, lfo: false} "SinOsc.ar(freq: 440, phase: 0, mul: 0.1, add: 0);"

iex> %SinOsc{freq: 440, phase: 0, mul: 0.1, add: 0, lfo: true} "SinOsc.kr(freq: 440, phase: 0, mul: 0.1, add: 0);"