Expand description
The envelope layer: the amplitude envelope of the notes and the sidechain pump.
The pump comes first: a dip that locks to the beat is stripped from the level tracks before the notes are read. Each note gets an attack, a hold, a decay, a sustain level, a note-off knee, a peak level and a fit of its release and tail. The notes of similar length and register form a pool, and each value of the layer is the median over the pool with its interquartile range. Five votes over the pool read whether the tail is reverb.
Structs§
- Envelope
Counts - How many notes each step read or skipped.
- Envelope
Flags - Flags of the envelope layer.
- Envelope
Input - What the envelope layer reads.
- Envelope
Layer - The envelope layer of a stem.
- Level
Track - A level track in dB, one value per
HOPfromstart. - Note
Envelope - The envelope of one note.
- Pump
- The pump read of a stem.
- TailFit
- The tail model fitted to a note after its note-off.
- Tail
Votes - The votes that a tail is reverb:
Nonewhen nothing could be read.
Enums§
- Envelope
Error - The envelope layer failed.
- Note
Skip - Why a note has no envelope.
- Pump
Lock - What a level dip follows.
Constants§
- ATTACK_
PERIODS_ MIN - A rise shorter than this many RMS windows cannot be told from a shorter one: the attack is an upper bound.
- ATTACK_
TOP - How little the level may rise after the attack’s top.
- BAND_
STEPS_ MIN - The attack of an overlapping note, read on its harmonic band, is an upper bound when its rise is shorter than this many times the band’s rise for an instant step.
- BAND_
STEP_ RISE - The 10-90 % rise of a harmonic band track for an instant step, times its low-pass cutoff: 0.490 to 0.491 at cutoffs of 12 to 40 Hz on a generated 220 Hz sine.
- DECAY_
FIRST_ DB - The first share of the decay lies at least this far below the peak.
- DECAY_
SHARES - The decay time is read between these shares of the fall in dB from the peak to the sustain level, as the attack is read between 10 % and 90 % of its rise.
- DUCK_
TAIL_ BINS - A duck takes at least this many bins, and
DUCK_TAIL_WINDOWSmore, from half its depth back to a quarter of it. A read over a grid read of none asks this many bins alone. - DUCK_
TAIL_ WINDOWS - The shares of the level window that
DUCK_TAIL_BINSgrows by, for a read that replaces a free read. A read over a grid read of none drops this share, which costs real ducks under a low note. - ENVELOPE_
CONVENTION - The convention of the envelope stages in
layers.json. - FALL_
MAX - A pump falls into its dip within this many bins.
- FIT_
FLOOR - The tracks are read no lower than this far below the note’s peak, so the floor of a silent frame does not steer a fit.
- FLATNESS_
RISE - The flatness rises by this much from the note body to the tail.
- FOLD_
ERROR_ GAIN - A fold error must also fall by at least this much, in dB, for the search’s read to replace a read that locks on the grid.
- FOLD_
ERROR_ SHARE - The period search’s read replaces a read that locks on the grid when its fold error is under this share of the grid read’s.
- FREE_
GAP - A harmonic of an overlapping note is free when it lies at least this far from every harmonic of the notes it overlaps.
- FREE_
RATE_ MIN - The lowest tremolo rate searched.
- FREE_
REACH - A free line lies within the period search’s reach when it lies this far or nearer from the nearest division.
- FREE_
RESIDUAL - A tremolo runs free when its rate lies this far from every note division of the tempo.
- FREE_
SWING - A tremolo counts when its line swings the level by at least this much either way. The slow beating of a chord’s near-coinciding harmonics stays below it.
- GAP_
LEVEL - A tail outlasts a gap when its level before the next note lies above this level under the sustain level.
- HARMONIC_
CUTOFF_ MAX - The low-pass of a harmonic track sits at most this far from the harmonic. A wider band follows an attack faster.
- HARMONIC_
CUTOFF_ MIN - The low-pass of a harmonic track sits at least this far from the harmonic. A 12 Hz low-pass smears a rise by about 30 ms.
- HIGH_
BAND_ FALL - The share of the bands from 1 kHz falls by this much from the first half of a tail to the second.
- HOLD_
MIN - A plateau within
ATTACK_TOPof the peak counts as hold when it lasts longer than this. - HOP
- The hop of every envelope track.
- KNEE_
BACK - The least ratio of a next note’s held level to the level at the last clear frames.
- KNEE_
BEND - A later corner replaces an earlier one only when the level between them bends by at most this much.
- KNEE_
BEND_ LAG - The frames each way of the second difference of
KNEE_BEND, 10 ms. - KNEE_
CONVENTION - The convention of the note-off knee and its offset.
- KNEE_
END_ GAP - The knee search stops this long before the note’s end.
- KNEE_
FALL - The release side of a knee falls by at least this share of the held level, 6 dB.
- KNEE_
FLOOR - The release side of a knee ends where the level falls under this share of the held level, -34 dB.
- KNEE_
GAIN - A two-line fit with a knee removes at least this share of the squared error that one line leaves.
- KNEE_
LEFT - The held side of a knee spans up to this many frames, 100 ms.
- KNEE_
RIGHT - The release side of a knee spans up to this many frames, 200 ms.
- KNEE_
RISE - A later corner replaces an earlier one only when the level after it rises by at most this share of the level before it. A note-off falls for good, and a fade of a reverb comes back.
- KNEE_
RISE_ FRAMES - The frames of the mean that the rise reads past its start, so that a noise floor’s wobble after the note-off does not count as a level that comes back.
- KNEE_
SIDE_ MIN - Each side of a knee spans at least this many frames, 10 ms.
- KNEE_
STEEPEN - At a knee the slope steepens by at least this share of the held level
per second. With
KNEE_FALLoverKNEE_RIGHT, a linear release shows a knee up to about 400 ms. - LEVEL_
SPREAD_ CONVENTION - The convention of the level spread.
- OBSERVABLE_
DECAYS - Decay and sustain are observable when the held part lasts the attack, the hold and this many decay times, or when the note has no knee.
- PERIOD_
RANGE - The first stage of the period search reads this far either side of the grid’s period, as a share of it; the second reads one step past it.
- PERIOD_
RUN_ BEATS - The period search’s first stage reads at most this many beats of the longest run; the second refines over all counted beats.
- PHASE_
DEPTH - A beat dips with the curve when its level falls by this share of the
curve’s depth: from its highest bin over the
FALL_MAXbins before the dip, to its lowest withinPHASE_SLACKbins of it. - PHASE_
SHARE - The pump locks to the beat when at least this share of the beats dips with the curve.
- PHASE_
SLACK - A beat dips with the curve when its level falls within this many bins of the curve’s dip.
- POOL_
LENGTH_ FACTOR - The pool holds notes whose length lies within this factor of the median length.
- POOL_
LEVEL_ GATE - The pool leaves out a note whose peak lies this far or more below the peak of a note it overlaps: a quiet second voice, such as another part’s bleed or a ghost note, with an envelope of its own.
- POOL_
NOTES_ MIN - A value over the pool needs this many notes; with fewer it reads low.
- POOL_
PITCH_ RANGE - The pool holds notes within this many semitones of the median pitch.
- PROXY_
HARMONICS - The amp proxy is the lowest free harmonic up to this one.
- PUMP_
BACK - The recovery ends where the curve comes back within this much of the reference.
- PUMP_
BEATS_ MIN - The pump needs this many beats that a sustained note covers.
- PUMP_
BINS - The phase bins of one beat.
- PUMP_
CONVENTION - The convention of the pump.
- PUMP_
MIN - A dip at least this deep counts as a pump, and the layer strips it from the envelope tracks.
- PUMP_
REFERENCE - Each beat’s curve is taken relative to this quantile of its bins, the level between dips.
- PUMP_
RMS_ PERIODS - The RMS window of the pump spans this many periods of the lowest note.
- PUMP_
STRIP_ BEATS - The layer strips a beat-locked pump only over this many counted beats.
- RAMP_
FACTOR - A linear ramp spends 80 % of its time between 10 % and 90 % of its peak, so the 10-90 % rise times 1.25 is the full attack.
- RELATIVE_
SPREAD_ MAX - Above this interquartile range over the median, a value reads low.
- RMS_
PERIODS - The RMS window of a note spans this many periods of its fundamental.
- RMS_
WINDOW_ MIN - The RMS window spans at least this long, in whole periods.
- SAME_
RATE_ SPREAD - The tail rate holds over the notes when its interquartile range stays under this share of its median.
- SIDE_
GROWTH - Side over mid grows by this much from the note body to the tail.
- SILENCE_
DB - A note whose amp proxy peaks at or below this has nothing to read: a list of notes over a silent stretch would read 0 dB sustains at the tracks’ floor. 16-bit dither sits near -96 dB.
- SPREAD_
QUANTILES - The level spread is the gap between these quantiles of the full-band levels of the pooled notes.
- SUSTAIN_
LEAD - A beat counts when one note covers it and started at least this long before it. A pluck struck on the beat then never counts, even when the transcriber places its onset a few milliseconds early.
- SUSTAIN_
SHARE - The sustain level is the median of this last share of the held part.
- TAIL_
BAND_ PERIODS - The shortest RT60 a band can show is this many periods of its cutoff: a dry chord’s release through a band reads 3 to 5 periods, whatever its length up to 50 ms.
- TAIL_
CONVENTION - The convention of the tail.
- TAIL_
FLOOR - The fit reads the tail down to this far under the sustain level.
- TAIL_
HOLD_ BEND - See
TAIL_WOBBLE_RESIDUAL. - TAIL_
HOLD_ FRAMES - The frames before the knee that
TailFit::hold_bendreads. - TAIL_
HOLD_ LAG - The frames each way of
TailFit::hold_bend. Slower than the knee’s bend, to see a tremolo under 10 Hz. - TAIL_
RELEASE_ RANGE - The releases a fit can read, in seconds. A level that never falls would otherwise run the fit to a release of 1e19 s and more.
- TAIL_
RESIDUAL_ MAX - Over this residual the release is not identifiable, and no release is written.
- TAIL_
RT60_ RANGE - The RT60s a fit can read, in seconds.
- TAIL_
SMOOTH - A tail over
TAIL_WEIGHT_MAXthat fits within this RMS reads as the note’s own exponential release: a reverb’s level wobbles more. - TAIL_
WEIGHT_ MAX - Over this tail weight the release is not identifiable, and no release is written.
- TAIL_
WEIGHT_ MIN - A tail lighter than this at the note-off has no RT60 to read: on dry notes the fit often leaves a little weight, and its RT60 is noise.
- TAIL_
WEIGHT_ RANGE - The tail weights a fit can read.
- TAIL_
WOBBLE_ RESIDUAL - A written release reads low when the median residual is over this and the
median
TailFit::hold_bendoverTAIL_HOLD_BEND: a tremolo carries on through the release, which the fit cannot follow. - TRACK_
LEAD - The tracks start this long before the onset, so the attack’s start is inside them.
Functions§
- amp_
proxy - The amp proxy of
noteagainst the notes that sound with it, fromTRACK_LEADbefore its onset to its end, in dB of the harmonic’s power;Nonewhen no harmonic is free. - find_
knee - The knee of a level track: the split where two lines fit best against one, at the crossing of the left line with the release’s first frames.
- fit_
tail - Fits the model to
db, the level in dB over the sustain level on frames from the note-off.Nonewhen too few frames lie above the floor. - full_
band_ level - The full-band level over a span: the peak of
full_band_track;Nonefor a span that holds no frame. - full_
band_ track - The full-band level track of a span.
- lock_
name - The name of a lock in the report.
- read_
note - Reads the envelope of
notefrom the mono mix.othersare the notes that sound during it;pumpis stripped first when it locks to the beat. - rms_
window - The RMS window over
periodsperiods off0, or the fewest whole periods that spanRMS_WINDOW_MINwhen that is more.