Scale
public struct Scale
Ordered sequence of pitch intervals.
A Scale
may or may not be octave invariant, and it may or may not be infinitely protracting.
Example Usage
let cMajor: Scale = [0,2,4,5,7,9,11]
let cSharpWholeTone = Scale(1, [2,2,2,2,2,2])
let gHarmonicMinor = Scale(7, .harmonicMinor)
-
The root (lowest) pitch of this
Scale.
Declaration
Swift
public let root: Pitch
-
The intervals which comprise this
Scale
.Declaration
Swift
public let intervals: IntervalPattern
-
The pattern of intervals which defines the quality of a
Scale
.Example Usage
See morelet major: IntervalPattern = [2,2,1,2,2,2] let wholeTone: IntervalPattern = [2,2,2,2,2,2] let octatonic12: IntervalPattern = .octatonic12 let tetrachord = IntervalPattern([2,2,1], isLooping: false)
Declaration
Swift
public struct IntervalPattern
-
Declaration
Swift
public var isOctaveInvariant: Bool { get }
Return Value
true
if the intervals contained herein span 12 semitones. Otherwise,false
.
-
Declaration
Swift
public func makeIterator() -> AnyIterator<Pitch>
-
Declaration
Swift
public init(arrayLiteral pitches: Pitch...)