Class VoiceLeadingRules
- Namespace
- Celeritas.Core.VoiceLeading
- Assembly
- Celeritas.dll
High-performance voice leading rule checker. Uses bitwise operations and SIMD where possible for speed.
public static class VoiceLeadingRules
- Inheritance
-
VoiceLeadingRules
- Inherited Members
Methods
Check(Voicing, Voicing, int)
Check all voice leading rules between two consecutive voicings.
public static VoiceLeadingCheck Check(Voicing from, Voicing to, int keyRoot = 0)
Parameters
fromVoicingThe voicing being left.
toVoicingThe voicing being moved to.
keyRootintPitch class of the tonic, 0=C .. 11=B. Folded into that range, as elsewhere in the engine, so -1 is B and 12 is C.
Returns
Score(Voicing, Voicing, int)
Combined score for voice leading quality (higher = better).
public static float Score(Voicing from, Voicing to, int keyRoot = 0)
Parameters
Returns
ScoreSmoothness(Voicing, Voicing)
Score the smoothness of voice leading (lower = smoother). Measures total melodic motion across all voices.
public static float ScoreSmoothness(Voicing from, Voicing to)