MusicTheory Documentation

Structure Scale

public struct Scale  

A scale.

Note that in this module, scale are specifically constructed from the seven modes. If you are looking for other scales, go to Key.

Initializers

init(_:​_:​)

public init(_ tonic: Note, _ mode: Mode)  

Init a scale by specifying tonic and mode.

Properties

tonic

public let tonic: Note

Tonic of the scale.

mode

public let mode: Mode

Mode of the scale.

notes

public var notes: [Note]  

All notes in the scale starting from the tonic.

all​Triads

public var allTriads: [Chord]  

All triads in the scale ordered from I to VII.

Methods

triad(degree:​)

public func triad(degree: Int) -> Chord  

The triad at a degree.