Skip to main content

Module mapper

Module mapper 

Source
Expand description

Turns measured layer values into edits for one synth.

Estimators report values in unit types and never round to what a synth offers. A SynthMapper picks the nearest edit the synth can make and lists what it cannot reach in unrepresentable, with the residual. fit_param is the one helper every mapper shares: it keeps keys in the registry, values in range and output order stable.

fit_flag, fit_stored and fit_route do the same for a switch, a control without a unit and a modulation route. pitch_envelope holds the synth-neutral flow of the pitch and envelope groups. The timbre and motion inputs are empty until their estimator epics add their group fields.

Re-exports§

pub use pitch_envelope::PitchEnvelopeGroups;

Modules§

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

Structs§

MapContext
What a mapper may know about its synth.
Mapped
The output of a mapper.
MotionFxGroups
The motion and effect groups of the layer report.
SuggestedEdit
One edit a mapper suggests.
TimbreGroups
The timbre groups of the layer report.
Unrepresentable
A wanted value the synth cannot reach exactly.
Unwritten
A measured field that the mapper does not write.

Enums§

Amount
A number in a unit, or a choice name.
UnrepresentableReason
Why a wanted value has no exact edit.
UnwrittenReason
Why a mapper leaves a measured field unwritten.

Traits§

SynthMapper
Maps layer groups to the edits of one synth.

Functions§

fit_flag
A switch set on or off.
fit_param
The nearest edit of one control to a wanted physical value.
fit_route
A route of a depth in semitones into a destination stored in semitones, such as an envelope into oscillator pitch.
fit_stored
The nearest edit of a control without a unit to a wanted stored value, such as a voice count or a level the adapter’s own law computed.
mapper_for
The mapper of a synth.
sort_edits
Sorts edits by registry key, then by route slot, as every mapper must.