Supex.Ugen (supex v0.2.0)

View Source

For composing Oscillators and other SuperCollider's UGens (UnitGnerators).

examples

iex> import Supex.Ugen iex> sin() |> freq(690) |> phase(6) |> mul(0.9) |> add(0.69) %Supex.Ugen.SinOsc{add: 0.69, phase: 6, freq: 690, mul: 0.9}

Summary

Functions

Transforms a "normal" oscillator to a LFO.

Create a pulse oscillator.

Create a saw oscillator.

Create a sine oscillator.

Functions

add(ugen, add)

(since 0.1.0)
@spec add(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()

freq(ugen, freq)

(since 0.1.0)
@spec freq(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()

level(ugen, level)

(since 0.2.0)
@spec level(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()

lfo(ugen)

(since 0.1.0)
@spec lfo(struct()) :: struct()

Transforms a "normal" oscillator to a LFO.

It uses kr (control rate) instead of ar(audio rate), cf. https://doc.sccode.org/Tutorials/Getting-Started/05-Functions-and-Sound.html

mul(ugen, mul)

(since 0.1.0)
@spec mul(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()

pan(ugen)

(since 0.2.0)
@spec pan(struct()) :: %Supex.Ugen.Pan2{in: term(), level: term(), pos: term()}

phase(ugen, phase)

(since 0.1.0)
@spec phase(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()

pos(ugen, pos)

(since 0.2.0)
@spec pos(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()

pulse()

(since 0.2.0)

Create a pulse oscillator.

saw()

(since 0.2.0)

Create a saw oscillator.

sin()

(since 0.2.0)

Create a sine oscillator.

width(ugen, width)

(since 0.1.0)
@spec width(
  struct(),
  integer() | float() | binary() | struct()
) :: struct()