from music21 import chord, interval
# Create a Chord object for C major
c_major_chord = chord.Chord("C4 E4 G4")
# Get the root note of the chord
root_note = c_major_chord.root()
# Get the chord tensions
tensions = []
for degree in [2, 4, 6]:
tension_pitch = root_note.transpose(interval.GenericInterval(degree))
tensions.append(tension_pitch.name)
print("Chord Tensions:", tensions)
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter