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§
- Generated
Scale - One generated scale candidate with its source choices and derived evidence.
- Key
- A musical key: a tonic pitch class paired with a
Mode. - Player
Scale - A performance-oriented scale that owns its interval list, supporting both the
built-in
Modes and arbitrary custom scales. - Scale
- A concrete scale: a
Modeanchored to a tonic pitch class. - Scale
Fixture - A preserved catalog fixture for the four named seven-note scale derivations.
- Scale
Lock Player - Applies a
ScaleLockPolicyto incoming pitches against aPlayerScale. - 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.
- Pitch
Scale Error - Error returned when a scale operation fails or a scale cannot be constructed.
- Scale
Lock Policy - The strategy a
ScaleLockPlayeruses to force pitches onto its scale. - Tetrachord
Join - 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.