Skip to main content

Module pitch_envelope

Module pitch_envelope 

Source
Expand description

The synth-neutral flow from the pitch, voices and envelope groups to suggested edits.

plan reads the groups and decides what a patch should hold: the voicing, the glide, the pitch drop, the velocity path and the amplitude envelope, each in physical units with its confidence. It leaves out a low-confidence or flagged field and lists it in unwritten. An adapter implements PitchEnvelopeControls, which turns one Wanted into the edits of its synth through its own keys and laws. map runs the plan through an adapter, drops each value equal to its default and sorts the edits.

The laws are interim until the calibration set (epic #11) measures them. No law maps the fitted glide curve or the envelope contour, so the curves stay at their defaults and unwritten says “curve not set”.

Structs§

DropValue
A pitch-drop record.
EnvelopeValues
The values of the envelope group that the mapper reads. A statistic is its median, None when it has no value.
GlideValue
A glide record.
JoinValue
A join record.
PitchEnvelopeGroups
The pitch, voices and envelope groups of the layer report, as the mapper reads them. Each group is None when the report holds no values for it.
PitchValues
The values of the pitch group that the mapper reads.
Plan
What the groups ask of a synth, and what they leave unwritten.
Reading
A measured value and how far to trust it.
VoicesValues
The values of the voices group that the mapper reads.
Wanted
A setting and the confidence its edits carry.

Enums§

Want
One setting the groups ask of a synth, in physical units.

Constants§

VELOCITY_SPREAD
The spread of the full-band levels of the pooled notes above which velocity gets a path to the level.

Traits§

PitchEnvelopeControls
The controls and laws of one synth for the pitch and envelope groups.

Functions§

group_of
The layer group of a field that a setting, a miss or an unwritten entry names, such as pitch for glides.time_s; None for a field no setting reads.
map
The edits of the groups through one adapter: the plan, then each setting through controls. A parameter whose value equals its default gives no edit. The edits are sorted by key.
plan
The settings the groups ask for and the fields they leave unwritten.
velocity_reaches_level
Whether velocity gets a path to the level: the level spread has a value, read over at least three pooled notes, and exceeds VELOCITY_SPREAD.