A chord type describes the factors contained in a chord, with no specific root pitch class. E.g. a "dominant seventh" chord.
Chord factors (such as the "third", "fifth", etc. of a chord) are represented as Intervals.
Get the factors contained in a chord type:
factors minor
== [ Interval.perfectUnison
, Interval.minorThird
, Interval.perfectFifth
]Determine whether a chord type contains a given factor:
contains Interval.diminishedFifth halfDiminishedSeventh == TrueCategorize factors into certain useful data structures. Helpful when creating custom voicing methods.
Categorize the factors in a chord type:
categorizeFactors minorSix
== { third = Interval.minorThird
, fifth = Interval.perfectFifth
, sixthOrSeventh = Just Interval.majorSixth
, ninth = []
, eleventh = Nothing
, thirteenth = Nothing
}Organize the factors in a chord type into their jazz-theory category and their possible substitutes, often known referred to as "available tensions".
availableTensions majorSeventh =
{ root =
{ true = Interval.perfectUnison
, substitutes = [ Interval.majorSecond ]
}
, third =
{ true = Interval.majorThird
, substitutes = []
}
, fifth =
{ true = Interval.perfectFifth
, substitutes = []
}
, seventh =
{ true = Interval.majorSeventh
, substitutes = []
}
}Get the chord symbol for a chord type:
toString majorSeventh == "M7"Want more control over chord symbols? See the classify function.
Lists of commonly-grouped chord types. Note that these are incomplete, and only represent the chord types contained in this module, since there is no exhaustive list of all valid chord types in tonal music.
All the chord types listed in this module.
All chord types with only a root, third (or suspension), and fifth.
All chord types with a sixth or seventh added to a triad.
All chord types with a major quality.
All chord types with a minor quality.
All chord types with a dominant quality.
All chord types with a dominant quality that also have altered extensions.
Define a custom chord type. Start with custom and apply the chord factor functions below:
custom
|> withMinorThird
|> withDiminishedFifth
|> withMinorSeventh
-- equivalent to `halfDiminishedSeventh`Note: because there is no unified model for naming any given chord, your custom chord may not work with the toString function in this module.
Get a chord type's classification:
classify dominantNinthFlatThirteen
== Classification MajorTriad (Just MinorSeventh) Ninth [ MinorThirteenth ]You can read more about how to use the Classification type in the Chord.Classification module.