ChordProgression
public struct ChordProgression: CustomStringConvertible, Codable, Equatable
Chord progression enum that you can create hard-coded and custom progressions.
-
Initilizes the chord progression with its nodes.
Declaration
Swift
public init(nodes: [ChordProgressionNode])Parameters
nodesNodes of the chord progression.
-
All hard-coded chord progressions.
Declaration
Swift
public static var all: [ChordProgression] -
Generates chord progression for a
ScalewithScale.HarmonicFieldand optionally inverted chords.Declaration
Parameters
scaleScale of the chords going to be generated.
harmonicFieldHarmonic field of the chords going to be generated.
inversionInversion of the chords going to be generated.
Return Value
Returns all possible chords for a scale. Returns nil if the chord is not generated for particular
ChordProgressionNode.
-
Returns the chord progression name.
Declaration
Swift
public var description: String
-
Initilizes chord progression with a
Decoder.Throws
Throws error if can not decodes.Declaration
Swift
public init(from decoder: Decoder) throwsParameters
decoderThe decoder.
-
Encodes the chord progression.
Throws
Throws error if can not encodes.Declaration
Swift
public func encode(to encoder: Encoder) throwsParameters
encoderThe encoder.
View on GitHub
ChordProgression Structure Reference