Table of Contents

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

from Voicing

The voicing being left.

to Voicing

The voicing being moved to.

keyRoot int

Pitch 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

VoiceLeadingCheck

Score(Voicing, Voicing, int)

Combined score for voice leading quality (higher = better).

public static float Score(Voicing from, Voicing to, int keyRoot = 0)

Parameters

from Voicing
to Voicing
keyRoot int

Returns

float

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)

Parameters

from Voicing
to Voicing

Returns

float