Skip to main content

ENVELOPE_CONVENTION

Constant ENVELOPE_CONVENTION 

Source
pub const ENVELOPE_CONVENTION: &str = "each note is read on a 1 ms hop from 30 ms before its onset \
in the note list to its end; the amp proxy is the note's lowest harmonic among the first three \
that lies 30 Hz or more from every harmonic of the notes sounding with it: for a note that \
overlaps no other, a sliding DFT over one period of the fundamental, else the zero-phase band \
magnitude, low-passed at half the distance to the nearest foreign or own neighbouring harmonic, 12 \
to 40 Hz; levels are dB from the note's peak of the amp proxy, read no lower than -60 dB; attack_s \
is 1.25 times the 10 to 90 % rise of the linear amplitude to the attack's top, the full 0 to 100 % \
time of a linear ramp, read on the centred RMS over one period of the fundamental, or the fewest \
whole periods that span 2 ms, for a note that overlaps no other, else on the amp proxy; the top is \
the first frame from the onset that the level exceeds by less than 1 dB over as long again as it \
took to rise to it from under 10 % of it, and at least over the shortest rise the track can tell, \
the upper bound's figure below, and the shares are of the highest frame over that span; \
the attack is an upper bound \
when the rise is shorter than 1.5 RMS windows, or on the amp proxy shorter than 0.98 over its \
low-pass cutoff, twice its rise for an instant step; hold_s is the time from the first frame \
within 1 dB of the peak to the start of the decay, 0 when under 10 ms; decay_s is the time between \
the first frames after the peak, linear between frames, at which the level falls through 10 % and \
90 % of the sustain level in dB, the first at least 0.5 dB down, divided by the gap between the \
two shares, and the decay starts the first share of it before the first; sustain_db is the median \
of the last 30 % of the held part, from the first frame within 1 dB of the peak to the note-off \
knee, or to 25 ms before the note's end without one; decay and sustain are null when a note with a \
knee holds for less than the attack, the hold and three decay times, and a note without one \
sustains at its end level; fit_residual_db is the median over the pool of the RMS in dB of each \
held part against 0 dB over the hold, a fall linear in dB to the sustain level over the decay, \
then the sustain level; ripple_db is the median, over the pooled notes whose sustain is \
observable, of the 90th minus the 10th percentile of the sustain window after its line; each \
statistic is the median and interquartile range over the pooled notes: of the notes whose peak lies \
less than 12 dB below the peak of every note they overlap, those whose length to the knee, or to \
the end without one, lies within a factor of 2 of their median length and whose pitch lies within \
12 semitones of their median pitch; a value over fewer than 3 notes, with an interquartile range \
above half its median, or with a median of 0 under an interquartile range above 0, has low \
confidence; attack_is_upper_bound is set when more than half the pooled attacks are upper bounds; \
a note whose amp proxy peaks at -120 dB or lower is skipped as silent";
Expand description

The convention of the envelope stages in layers.json.