Skip to main content

Crate sim_lib_pitch_scale

Crate sim_lib_pitch_scale 

Source
Expand description

Scales, modes, and scale-locking for the SIM music libraries.

This crate defines the diatonic and symmetric Modes, the Scale type that anchors a mode to a tonic pitch class, and the diatonic operations built on them (degree lookup, diatonic transposition, chord/scale tone mapping). The PlayerScale and ScaleLockPlayer types provide a performance-oriented surface that quantizes, filters, or remaps incoming pitches onto a chosen scale.

Structs§

GeneratedScale
One generated scale candidate with its source choices and derived evidence.
Key
A musical key: a tonic pitch class paired with a Mode.
PlayerScale
A performance-oriented scale that owns its interval list, supporting both the built-in Modes and arbitrary custom scales.
Scale
A concrete scale: a Mode anchored to a tonic pitch class.
ScaleFixture
A preserved catalog fixture for the four named seven-note scale derivations.
ScaleLockPlayer
Applies a ScaleLockPolicy to incoming pitches against a PlayerScale.
Tetrachord
Four scale degrees contained in one tetrachord, rooted at zero.

Enums§

Mode
A scale mode, defined by its semitone interval pattern from the tonic.
PitchScaleError
Error returned when a scale operation fails or a scale cannot be constructed.
ScaleLockPolicy
The strategy a ScaleLockPlayer uses to force pitches onto its scale.
TetrachordJoin
Join interval between the lower tetrachord end and the upper tetrachord root.

Constants§

SCALE_FIXTURES
All preserved catalog scale fixtures in their stable name order.
SCALE_FIXTURE_W
Catalog fixture w: the major scale.
SCALE_FIXTURE_X
Catalog fixture x.
SCALE_FIXTURE_Y
Catalog fixture y.
SCALE_FIXTURE_Z
Catalog fixture z.

Statics§

RECIPES
Cookbook recipes for this lib, embedded at build time.

Functions§

decode_scale_third_stack
Decode a rooted seven-note scale into its cyclic stack of thirds.
generate_scales
Generate scales from lower and upper tetrachords under explicit search controls.
nudge_scale_neighborhood
Return neighboring scale masks under the prior pitch-set neighborhood API.