UnorderedDiatonicInterval
public struct UnorderedDiatonicInterval : DiatonicIntervalProtocol
Descriptor for unordered intervals between two Pitch.Class
values.
-
Quality of an
UnorderedIntervalDescriptor
.diminished
minor
perfect
major
augmented
Declaration
Swift
public let quality: Quality
-
Declaration
Swift
public var semitones: Double { get }
Return Value
The amount of semitones in this
UnorderedIntervalDescriptor
. -
Declaration
Swift
public var steps: Int { get }
Return Value
The amount of letter name steps in this
UnorderedIntervalDescriptor
.
-
The number of a
See moreUnorderedDiatonicInterval
.Declaration
Swift
public enum Number : DiatonicIntervalNumber
-
Diminished unison.
Declaration
Swift
public static let d1: UnorderedDiatonicInterval
-
Unison.
Declaration
Swift
public static let unison: UnorderedDiatonicInterval
-
Diminished second.
Declaration
Swift
public static let d2: UnorderedDiatonicInterval
-
Augmented unison.
Declaration
Swift
public static let A1: UnorderedDiatonicInterval
-
Minor second.
Declaration
Swift
public static let m2: UnorderedDiatonicInterval
-
Major second.
Declaration
Swift
public static let M2: UnorderedDiatonicInterval
-
Diminished third.
Declaration
Swift
public static let d3: UnorderedDiatonicInterval
-
Augmented second.
Declaration
Swift
public static let A2: UnorderedDiatonicInterval
-
Minor third.
Declaration
Swift
public static let m3: UnorderedDiatonicInterval
-
Major third.
Declaration
Swift
public static let M3: UnorderedDiatonicInterval
-
Diminished fourth.
Declaration
Swift
public static let d4: UnorderedDiatonicInterval
-
Augmented third.
Declaration
Swift
public static let A3: UnorderedDiatonicInterval
-
Perfect fourth.
Declaration
Swift
public static let P4: UnorderedDiatonicInterval
-
Augmented fourth.
Declaration
Swift
public static let A4: UnorderedDiatonicInterval
-
Creates a perfect
UnorderedDiatonicInterval
.let perfectUnison = UnorderedDiatonicInterval(.perfect, .unison) let perfectFourth = UnorderedDiatonicInterval(.perfect, .fourth)
Declaration
Swift
public init(_ quality: Quality.Perfect, _ ordinal: Number.Perfect)
-
Creates an imperfect
UnorderedDiatonicInterval
.let majorSecond = UnorderedDiatonicInterval(.major, .second) let minorThird = UnorderedDiatonicInterval(.minor, .third)
Declaration
Swift
public init(_ quality: Quality.Imperfect, _ ordinal: Number.Imperfect)
-
Creates an augmented or diminished
UnorderedDiatonicInterval
with an imperfect number.let doubleDiminishedSecond = UnorderedDiatonicInterval(.diminished, .second) let tripleAugmentedThird = UnorderedDiatonicInterval(.augmented, .third)
Declaration
Swift
public init(_ quality: Quality.Extended.AugmentedOrDiminished, _ ordinal: Number.Imperfect)
-
Creates an augmented or diminished
UnorderedDiatonicInterval
with a perfect number.let doubleAugmentedUnison = UnorderedDiatonicInterval(.augmented, .unison) let tripleDiminishedFourth = UnorderedDiatonicInterval(.diminished, .fourth)
Declaration
Swift
public init(_ quality: Quality.Extended.AugmentedOrDiminished, _ ordinal: Number.Perfect)
-
Creates an augmented or diminished
UnorderedDiatonicInterval
with an imperfect number. These intervals can be up to quintuple augmented or diminished.let doubleAugmentedUnison = OrderedSpelledInterval(.double, .augmented, .unison) let tripleDiminishedFourth = OrderedSpelledInterval(.triple, .diminished, .fourth)
Declaration
Swift
public init( _ degree: Quality.Extended.Degree, _ quality: Quality.Extended.AugmentedOrDiminished, _ ordinal: Number.Imperfect )
-
Creates an augmented or diminished
OrderedSpelledInterval
with a perfect number. These intervals can be up to quintuple augmented or diminished.let doubleAugmentedUnison = OrderedSpelledInterval(.double, .augmented, .unison) let tripleDiminishedFourth = OrderedSpelledInterval(.triple, .diminished, .fourth)
Declaration
Swift
public init( _ degree: Quality.Extended.Degree, _ quality: Quality.Extended.AugmentedOrDiminished, _ ordinal: Number.Perfect )
-
Creates an
UnorderedDiatonicInterval
from an ordered one. This inverts intervals with ordinals larger than a.fourth
.Declaration
Swift
public init(_ ordered: DiatonicInterval)
-
Printable description of UnorderedIntervalDescriptor.
Declaration
Swift
public var description: String { get }
-
The unison identity element.
Declaration
Swift
public static var zero: UnorderedDiatonicInterval
-
Declaration
Swift
public static func + (lhs: UnorderedDiatonicInterval, rhs: UnorderedDiatonicInterval) -> UnorderedDiatonicInterval
Return Value
The sum of two
UnorderedDiatonicInterval
values.