Namespace Celeritas.Core.VoiceLeading
Classes
- VoiceLeadingRules
High-performance voice leading rule checker. Uses bitwise operations and SIMD where possible for speed.
- VoiceLeadingSolution
Result of voice leading solver.
- VoiceLeadingSolver
High-performance voice leading solver using parallel BFS/A* search. Finds optimal voicings for a chord progression following counterpoint rules.
Algorithm:
- Generate all valid voicings for each chord (constraint: notes in range, proper spacing)
- Build a graph where edges connect compatible voicings of consecutive chords
- Use parallel A* search to find the path with minimum voice leading cost
The rules followed are exactly the ones VoiceLeadingViolation names. Inversion is not among them: a chord arrives here as a set of pitch classes with no bass named, so the bass takes whichever chord tone the smoothest path wants, and a progression may well begin or end on a six-four. Choose the inversions yourself if they matter.
- VoiceLeadingSolverOptions
Options for the voice leading solver.
- VoiceRanges
Represents the MIDI pitch ranges for each voice.
Structs
- VoiceLeadingCheck
Result of checking voice leading rules between two voicings.
- Voicing
A specific voicing of a chord (4 pitches, one per voice). Stored as a packed 32-bit integer for efficient comparison.
Enums
- VoiceLeadingViolation
Types of voice leading violations.
- VoicePart
A voice part in a chord voicing (SATB: Soprano, Alto, Tenor, Bass).