Skip to main content

Module laws

Module laws 

Source
Expand description

Vital laws that span several controls: unison spread, LFO tempo rates, pan gains, modulation depth and the amplitude path.

Each law is read from the Vital 1.0.6 open source and restated here. Where the reading joins several facts, the function says so; a probe or a render confirms it before a mapper relies on it.

Structs§

UnisonGains
The gains of the centre and the detuned unison voices.

Enums§

TempoMode
How a tempo-synced LFO scales its note division.

Constants§

MIDI_0_HZ
The note-number frequency law: 8.1757989156 * 2^(note / 12) Hz.
PROVENANCE
The provenance of each law in this module, by function name.

Functions§

amp_gain
The voice gain after the amplitude envelope: (envelope * lerp(1, velocity, velocity_track) * voice_amplitude)^2.
lfo_keytrack_rate
The rate of a key-tracked LFO: the note-number law applied to transpose + tune + note.
lfo_tempo_rate
The rate of a tempo-synced LFO.
modulation_delta
The change a modulation route adds to the stored value of its destination: (source - 0.5 * bipolar) * amount * (max - min). It adds before the engine scale of the destination is applied.
pan_gains
The left and right gains of a pan position pan (stored -1 to 1).
power_scale
Vital’s power curve: (e^(p*t) - 1) / (e^p - 1), or t when |p| < 0.01. It maps 0 to 0 and 1 to 1 and bends in between.
unison_gains
The level compensation of unison voices at blend (stored 0 to 1).
unison_offsets
The offsets of voices unison voices as fractions of the outer offset, from lowest to highest.
unison_outer_offset
The offset of the outermost unison voice: detune_range * detune^2 cents, with detune the stored osc_N_unison_detune and detune_range the stored osc_N_detune_range.