tecs.audio.effects#

Overview#

Functions#

customfunction#

function(
    kind: integer,
    name: string,
    names: {[string]: integer}?,
    values: {[string]: number}?,
    params: string?
): Spec

A spec for a kind a library registered.

Arguments#

kind - integer
what Audio.registerEffect returned
name - string
the kind's name, for a snapshot
names - {[string]: integer}?
parameter ids by name
values - {[string]: number}?
starting values by name
params - string?
bytes the library's open reads

Returns#

Spec

the spec

eqfunction#

function(options: {[string]: number}?): Spec

A three-band equalizer, flat until a band's gain moves.

Arguments#

options - {[string]: number}?

gains in dB and frequencies in hertz: lowGain, lowFrequency (200), midGain, midFrequency (1000), midQ (1), highGain, highFrequency (5000)

Returns#

Spec

the spec

filterfunction#

function(options: {
    shape: string?,
    frequency: number?,
    q: number?,
    gain: number?
}?): Spec

A biquad filter.

Arguments#

options - { shape: string?, frequency: number?, q: number?, gain: number? }? : shape: "lowpass" (the default), "highpass", "bandpass", "notch", "peak", "lowshelf" or "highshelf"; frequency in hertz (20000); q (0.707); gain in dB for the peak and shelves (0)

Returns#

Spec

the spec

Raises#

Type Condition
string for a shape it does not know

limiterfunction#

function(options: {
    ceiling: number?,
    release: number?
}?): Spec

A lookahead peak limiter: nothing past ceiling leaves it.

Arguments#

options - { ceiling: number?, release: number? }? : ceiling, linear full scale (0.891, -1 dBFS, by default), and release in seconds (0.05)

Returns#

Spec

the spec

reverbfunction#

function(options: {[string]: number}?): Spec

An algorithmic room, for a return bus.

Arguments#

options - {[string]: number}?

each from zero to one: size (0.5), damping (0.5), wet (1), dry (0) and width (1)

Returns#

Spec

the spec

Types#

Specrecord#

record Spec

What an insert builds: a kind, its parameter names, and their values.

Members#

constructors

fields

constructorconstructor#

function(
    kind: integer,
    name: string,
    names: {[string]: integer},
    values: {[integer]: number},
    params: string
): tecs.audio.effects.Spec

Constructs an instance from named fields. Optional fields may be omitted.

Arguments#
kind - integer
Required. Read-only. The native kind.
name - string
Required. Read-only. The kind's name, for a snapshot.
names - {[string]: integer}
Required. Read-only. Parameter ids by name, for Effect.set.
values - {[integer]: number}
Required. Read-only. Starting values by parameter id.
params - string
Required. Read-only. Bytes a registered kind's open reads, empty for a built-in.
Returns#
tecs.audio.effects.Spec

the constructed instance

Examples#

Using values of the argument types above:

local value = require("tecs.audio.effects").Spec(
    kind = kind,
    name = name,
    names = names,
    values = values,
    params = params
)

kindfield#

kind: integer

Read-only. The native kind.

namefield#

name: string

Read-only. The kind's name, for a snapshot.

namesfield#

names: {[string]: integer}

Read-only. Parameter ids by name, for Effect.set.

valuesfield#

values: {[integer]: number}

Read-only. Starting values by parameter id.

paramsfield#

params: string

Read-only. Bytes a registered kind's open reads, empty for a built-in.

Values#

EQvariable#

const EQ: integer

FILTERvariable#

const FILTER: integer

LIMITERvariable#

const LIMITER: integer

Built-in kinds, as the native mixer numbers them.

REVERBvariable#

const REVERB: integer