Mystic::Chord
Represents a chord
A chord has a root note, intervals (indicating the intervals above the root in root position), and an array of notes
Some ways to create a Chord:
# Create with root note and quality
Chord.new(Note.new("C4"), "major")
# Create a chord with notes. The lowest will be assumed to be the root
# (C major)
Chord.new([Note.new("C4"), Note.new("E4"), Note.new("G4")])
# Create with root note and notes
# (C major, 1st inversion)
Chord.new(Note.new("C4"), [Note.new("E4"), Note.new("G4"), Note.new("C5")])
# Create chord with custom intervals
Chord.new(Note.new("C4"), [Interval.new("M2"), Interval.new("P5")])
# Shorthand with chord symbols
Chord.new("Cmb9#11")
Constants
Constructors
Instance methods
Return the given member
For example, chord.get(3) will return the 3rd of the chord
Return the member of the chord given a specific interval_from_root.
This is a more specific version of Chord#get(member). This is useful if a chord has multiple notes with the same member number.
For example:
# Split 3rd chord (has 2 "3rds")
chord = Chord.new([Note.new("C4"), Note.new("Eb4"), Note.new("E4"), Note.new("G4")])
chord.get(Interval.new("M3")) # => Note.new("E4")
Returns the result of inverting the chord num times (upwards)
Returns the result of inverting the chord once (upwards). If keep_root is true, will maintain the same root note if inverted back to root position. This will result in all the notes shifting down some number of octave(s). Otherwise, the resulting chord will have a higher root note if inverted back to root position