Table of Contents

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

Violations VoiceLeadingViolation

Bit flags of the violations detected.

Penalty float

Accumulated penalty cost for the detected violations.

Properties

IsValid

True when no violation was detected.

public bool IsValid { get; }

Property Value

bool

Penalty

Accumulated penalty cost for the detected violations.

public float Penalty { get; init; }

Property Value

float

Violations

Bit flags of the violations detected.

public VoiceLeadingViolation Violations { get; init; }

Property Value

VoiceLeadingViolation

Methods

HasViolation(VoiceLeadingViolation)

Returns whether the given violation flag is set.

public bool HasViolation(VoiceLeadingViolation v)

Parameters

v VoiceLeadingViolation

Returns

bool