Skip to main content

Module pitch

Module pitch 

Source
Expand description

The pitch layer of a monophonic line: glides between notes, pitch drops at the strike of a low note, and vibrato.

The glides and the vibrato read the f0 track; the drops read the sub-band line of the stem, because the track smears a drop that settles in tens of milliseconds. Every record carries its own confidence. A line that plays chords reports nothing, since no method here separates the voices.

Structs§

DropFit
A fitted drop.
DropSkips
The low notes the drop search read no drop at, by the first gate that stopped each.
GlideFit
A fitted glide.
PitchCounts
How many candidates each search read.
PitchFlags
Flags of the pitch layer.
PitchInput
What the pitch layer reads.
PitchLayer
The pitch layer of a stem.
Rated
A record with its confidence.
SubBandLine
The instantaneous frequency of the 20 to 200 Hz band of a segment, with the envelope of that band.
VibratoFit
A vibrato read from one span.

Enums§

DropMiss
Why a fit does not count as a drop.
PitchError
The pitch layer failed.

Constants§

ATTACK_HIGH
The longest attack of a high-confidence drop.
CURVE_HIGH
The largest curve power of a high-confidence glide. A faster start reads its rise less well: up to 11 % off at p 4.4 on the generated sets, within 7.1 % at 3 or less.
CURVE_RANGE
The range of the curve power p.
CYCLES_HIGH
A vibrato over this many cycles or more reads at high confidence.
DROP_BAND_GATE
A strike whose RMS in the band of the line, over the 20 ms after the onset, lies more than this below the loudest QUIET_FRAME of that band in the stem is no candidate.
DROP_CONVENTION
The convention of a drop, as layers.json names it.
DROP_FIT_START
The fit starts this long after the onset. The line of a tone switched on from silence overshoots by about 11 Hz at 3 ms and by 1 to 4 Hz at 7 ms, at 30 to 150 Hz, and settles within 1 Hz by 30 ms.
DROP_GLIDE_DISTANCE
A glide from silence is a drop when its run starts this close to the onset of an accepted drop.
DROP_MAX
The largest drop that counts: three octaves. The line reads up to 200 Hz, so a larger fall starts far outside the band and its df is extrapolated from the tail alone.
DROP_MAX_RESIDUAL
The largest RMS residual of an accepted fit, as a share of the fall the fit span shows.
DROP_MIN
The smallest drop that counts.
DROP_NOTE_LEAD
The note a drop settles on starts at most this long before the onset.
DROP_NOTE_MATCH
A drop settles on a note whose pitch lies within this many cents of f_end.
DROP_ONSET_SHARE
The onset of a strike: the first sample whose band envelope reaches this share of its peak.
DROP_RESIDUAL_HIGH
A drop whose residual share stays below this reads at high confidence.
DROP_TAU_MIN
The smallest tau of a fit, about 3 ms.
EXTENT_SHARE
The raw extent the f0 track reads, as a share of the true extent, by rate.
FAST_TAU
A drop with tau under this needs a strike of STRIKE_RISE. The swing of the line where a ringing tone restarts its phase fits a fast fall: a plain retriggered 808 read 32 semitones with a tau of 4 ms.
GAP_DIP_DB
A gap of the track whose full-band RMS, over 10 ms, falls this far below the 20 ms before or after it is not bridged.
GLIDE_CONVENTION
The convention of a glide, as layers.json names it.
GLIDE_SLOPE_MIN
The slope above which the pitch moves, in cents per second: 0.861 semitone per second, the floor of a published portamento detector. Untuned.
JITTER_HIGH
The largest jitter of a high-confidence glide, in cents. A unison beats, and the track then wanders on the stable pitches.
JITTER_LOW
The jitter above which a glide reads at low confidence.
KURTOSIS_LOW
A vibrato whose contour has a kurtosis below this reads at low confidence: it jumps between two levels, as a trill does. The sines of the generated set read 1.36 to 1.66, a semitone trill 1.06.
LINE_CONVENTION
The convention of the line, as layers.json names it.
NOTE_FRAMES_LOW
The layer reads at low confidence below this share of note frames.
NOTE_FRAME_MATCH
A voiced frame belongs to a sounding note within this many cents.
NOTE_LINE_EDGE
The low-pass of the note line, as a multiple of the note’s pitch.
NOTE_LINE_LOSS
A fit on the note line counts when the note line keeps the fall: its RMS envelope over the fall lies at most this far below the band’s.
ONSET_SMOOTHING
The centred average of the band envelope that the onset search reads.
RESIDUAL_HIGH
A glide whose fit residual stays at or below this many cents, whose stable pitches jitter at most JITTER_HIGH and whose motion lasts SPAN_HIGH or more reads at high confidence.
RISE_PERIODS
The span, in periods of the note, of the band envelope average that tells a strike found again from a strike of its own.
RUN_START_RISE
A sound starts where the full-band RMS rises by this factor, 20 dB: from silence, not from a dip of a beating unison.
RUN_TRIM
The vibrato search skips this much at each end of a steady span.
SPAN_HIGH
The shortest motion of a high-confidence glide.
STRIKE_ATTACK
A drop without a full-band rise needs an attack this short or shorter. Struck 808 notes read 9 to 13 ms; a unison falling into the band from above reads 190 ms.
STRIKE_LOOKAHEAD
The onset search ends this long after the note onset.
STRIKE_LOOKBACK
The onset search of a strike starts at most this long before the note onset, because the transcriber places the onset of a falling note late.
STRIKE_RISE
A strike raises the full-band RMS by this factor, 6 dB. The glide search reads it as a new note, and a drop that is fast or starts at the top of the band needs it.
VIBRATO_CONVENTION
The convention of a vibrato, as layers.json names it.
VIBRATO_LOW_PITCH
A vibrato on a pitch below this reads at low confidence.
VIBRATO_SPAN_MIN
The shortest voiced span the search reads.
WEAK_FROM
The harmonic check of a strike reads the bands from this long after the onset.
WEAK_RATIO
A fundamental is weak when the band around twice the pitch exceeds the band around the pitch by this factor, 6 dB.

Functions§

band_onset
The onset of a strike inside from..to, from the band envelope.
fit_drop
Fits the drop model to the line from onset on, up to end at most. None when fewer than three line values fall inside the fit span.
fit_vibrato
Fits a vibrato to voiced frames (time, f0) in time order. None when the frames span less than VIBRATO_SPAN_MIN, hold no motion, or are too few for the line and the sine together.