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
  • Ordinal of an UnorderedIntervalDescriptor.

    Declaration

    Swift

    public let ordinal: Number
  • 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.

  • d1

    Diminished unison.

    Declaration

    Swift

    public static let d1: UnorderedDiatonicInterval
  • Unison.

    Declaration

    Swift

    public static let unison: UnorderedDiatonicInterval
  • d2

    Diminished second.

    Declaration

    Swift

    public static let d2: UnorderedDiatonicInterval
  • A1

    Augmented unison.

    Declaration

    Swift

    public static let A1: UnorderedDiatonicInterval
  • m2

    Minor second.

    Declaration

    Swift

    public static let m2: UnorderedDiatonicInterval
  • M2

    Major second.

    Declaration

    Swift

    public static let M2: UnorderedDiatonicInterval
  • d3

    Diminished third.

    Declaration

    Swift

    public static let d3: UnorderedDiatonicInterval
  • A2

    Augmented second.

    Declaration

    Swift

    public static let A2: UnorderedDiatonicInterval
  • m3

    Minor third.

    Declaration

    Swift

    public static let m3: UnorderedDiatonicInterval
  • M3

    Major third.

    Declaration

    Swift

    public static let M3: UnorderedDiatonicInterval
  • d4

    Diminished fourth.

    Declaration

    Swift

    public static let d4: UnorderedDiatonicInterval
  • A3

    Augmented third.

    Declaration

    Swift

    public static let A3: UnorderedDiatonicInterval
  • P4

    Perfect fourth.

    Declaration

    Swift

    public static let P4: UnorderedDiatonicInterval
  • A4

    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 with a given quality and number.

    let minorSecond = UnorderedDiatonicInterval(.minor, .second)
    let augmentedSixth = UnorderedDiatonicInterval(.augmented, .sixth)
    

    Declaration

    Swift

    public init(_ quality: Quality, _ ordinal: Number)
  • 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.