Supex.Ugen.Pulse (supex v0.2.0)

View Source

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

Defines a %Pulse{} struct with

freq frequency in Hertz,

width pulse width ratio from zero to one (0.5 makes a square wave)

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 %Pulse{} struct.

Functions

command(pulse)

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

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

example

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

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