LetterName

public enum LetterName : String, CaseIterable

Letter name component of a Pitch.Spelling

  • a

    A, la.

    Declaration

    Swift

    case a
  • b

    B, si.

    Declaration

    Swift

    case b
  • c

    C, do.

    Declaration

    Swift

    case c
  • d

    D, re.

    Declaration

    Swift

    case d
  • e

    E, mi.

    Declaration

    Swift

    case e
  • f

    F, fa.

    Declaration

    Swift

    case f
  • g

    G, sol.

    Declaration

    Swift

    case g
  • Amount of steps from c

    Declaration

    Swift

    public var steps: Int { get }
  • Default pitch class for a given LetterName.

    Declaration

    Swift

    public var pitchClass: Double { get }
  • Creates a LetterName with the amount of diatonic steps from c.

    Declaration

    Swift

    public init(steps: Int)
  • Creates a LetterName with a given string value. Uppercase and lowercase values are accepted here.

    Declaration

    Swift

    public init?(string: String)
  • Declaration

    Swift

    public func displaced(by steps: Int) -> LetterName

    Return Value

    The LetterName value displaced by the given amount of steps.

  • Todo

    Refactor out into CircularEnum

    Declaration

    Swift

    public var predecessor: LetterName { get }

    Return Value

    The next-lower LetterName value.

  • Todo

    Refactor out into CircularEnum

    Declaration

    Swift

    public var successor: LetterName { get }

    Return Value

    The next-higher LetterName value.