Struct VoiceLeadingCheck
- Namespace
- Celeritas.Core.VoiceLeading
- Assembly
- Celeritas.dll
Result of checking voice leading rules between two voicings.
public readonly record struct VoiceLeadingCheck : IEquatable<VoiceLeadingCheck>
- Implements
- Inherited Members
Constructors
VoiceLeadingCheck(VoiceLeadingViolation, float)
Result of checking voice leading rules between two voicings.
public VoiceLeadingCheck(VoiceLeadingViolation Violations, float Penalty)
Parameters
ViolationsVoiceLeadingViolationBit flags of the violations detected.
PenaltyfloatAccumulated penalty cost for the detected violations.
Properties
IsValid
True when no violation was detected.
public bool IsValid { get; }
Property Value
Penalty
Accumulated penalty cost for the detected violations.
public float Penalty { get; init; }
Property Value
Violations
Bit flags of the violations detected.
public VoiceLeadingViolation Violations { get; init; }
Property Value
Methods
HasViolation(VoiceLeadingViolation)
Returns whether the given violation flag is set.
public bool HasViolation(VoiceLeadingViolation v)