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
Octave
Octave number
public byte Octave { get; }
Property Value
Value
Pitch value
public VocalsPitchValue Value { get; }
Property Value
Methods
Equals(VocalsPitch)
Indicates if two pitches have the same value.
public bool Equals(VocalsPitch other)
Parameters
other
VocalsPitchPitch to compare
Returns
Equals(VocalsPitchValue)
Indicates if a pitch has a value equal to a raw pitch value.
public bool Equals(VocalsPitchValue other)
Parameters
other
VocalsPitchValueValue to compare
Returns
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
objectSource of value
Returns
GetHashCode()
Returns the hash code for the pitch value.
public override int GetHashCode()
Returns
Operators
operator ==(VocalsPitch, VocalsPitch)
Indicates if two pitches have the same value.
public static bool operator ==(VocalsPitch left, VocalsPitch right)
Parameters
left
VocalsPitchright
VocalsPitch
Returns
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
VocalsPitchright
VocalsPitch
Returns
implicit operator VocalsPitchValue(VocalsPitch)
public static implicit operator VocalsPitchValue(VocalsPitch pitch)
Parameters
pitch
VocalsPitch
Returns
implicit operator VocalsPitch(VocalsPitchValue)
Converts a raw pitch value to a matching wrapper.
public static implicit operator VocalsPitch(VocalsPitchValue pitch)
Parameters
pitch
VocalsPitchValuePitch value
Returns
operator !=(VocalsPitch, VocalsPitch)
Indicates if two pitches don't have the same value.
public static bool operator !=(VocalsPitch left, VocalsPitch right)
Parameters
left
VocalsPitchright
VocalsPitch
Returns
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
VocalsPitchright
VocalsPitch