Table of Contents

Struct VocalsPitch

Namespace
ChartTools.Lyrics
Assembly
ChartTools.dll

Wrapper type for VocalsPitchValue with helper properties to get the pitch and key

public readonly struct VocalsPitch : IEquatable<VocalsPitch>, IEquatable<VocalsPitchValue>
Implements
Inherited Members
Extension Methods

Remarks

Creates a pitch from a raw pitch value.

Constructors

VocalsPitch()

public VocalsPitch()

VocalsPitch(VocalsPitchValue)

Wrapper type for VocalsPitchValue with helper properties to get the pitch and key

public VocalsPitch(VocalsPitchValue value)

Parameters

value VocalsPitchValue

Remarks

Creates a pitch from a raw pitch value.

Properties

Key

Key excluding the octave

public VocalsKey Key { get; }

Property Value

VocalsKey

Octave

Octave number

public byte Octave { get; }

Property Value

byte

Value

Pitch value

public VocalsPitchValue Value { get; }

Property Value

VocalsPitchValue

Methods

Equals(VocalsPitch)

Indicates if two pitches have the same value.

public bool Equals(VocalsPitch other)

Parameters

other VocalsPitch

Pitch to compare

Returns

bool

Equals(VocalsPitchValue)

Indicates if a pitch has a value equal to a raw pitch value.

public bool Equals(VocalsPitchValue other)

Parameters

other VocalsPitchValue

Value to compare

Returns

bool

Equals(object?)

Indicates if an object is a raw pitch value or wrapper and the value is equal.

public override bool Equals(object? obj)

Parameters

obj object

Source of value

Returns

bool

GetHashCode()

Returns the hash code for the pitch value.

public override int GetHashCode()

Returns

int

Operators

operator ==(VocalsPitch, VocalsPitch)

Indicates if two pitches have the same value.

public static bool operator ==(VocalsPitch left, VocalsPitch right)

Parameters

left VocalsPitch
right VocalsPitch

Returns

bool

operator >(VocalsPitch, VocalsPitch)

Indicates if the left pitch has a higher value than the right pitch according to music theory.

public static bool operator >(VocalsPitch left, VocalsPitch right)

Parameters

left VocalsPitch
right VocalsPitch

Returns

bool

implicit operator VocalsPitchValue(VocalsPitch)

public static implicit operator VocalsPitchValue(VocalsPitch pitch)

Parameters

pitch VocalsPitch

Returns

VocalsPitchValue

implicit operator VocalsPitch(VocalsPitchValue)

Converts a raw pitch value to a matching wrapper.

public static implicit operator VocalsPitch(VocalsPitchValue pitch)

Parameters

pitch VocalsPitchValue

Pitch value

Returns

VocalsPitch

operator !=(VocalsPitch, VocalsPitch)

Indicates if two pitches don't have the same value.

public static bool operator !=(VocalsPitch left, VocalsPitch right)

Parameters

left VocalsPitch
right VocalsPitch

Returns

bool

operator <(VocalsPitch, VocalsPitch)

Indicates if the left pitch has a lower value than the right pitch according to music theory.

public static bool operator <(VocalsPitch left, VocalsPitch right)

Parameters

left VocalsPitch
right VocalsPitch

Returns

bool