Chord Symbol Durations?

28 views
Skip to first unread message

Daniel McGillicuddy

unread,
Mar 15, 2024, 12:18:46 AMMar 15
to music21
I am dusting off my Music21 code after updating and can't seem to get chord symbol durations to work like they used to. 

from music21 import *

MyScore = stream.Score()

MySymbol = harmony.ChordSymbol(root="C", kind="min7")
OtherSymbol = harmony.ChordSymbol(root="F", kind="min7")

MySymbol.duration = duration.Duration(type='half')
OtherSymbol.duration =duration.Duration(type='half')

MyMeasure = stream.Measure()
MyMeasure.append(MySymbol)
MyMeasure.append(OtherSymbol)

MyScore.append(MyMeasure)
harmony.realizeChordSymbolDurations(MyScore)
MyScore.show("xml")

this should put two chords in one measure...? Right? But it doesn't seem to honor the durations of the symbols even with realizeChordSymbolDurations turned on.

Using Python 3.11 and Music21 9.1.0 with MuseScore 4 as the xml reader.


See output Screenshot 2024-03-14 at 9.15.24 PM.png
Reply all
Reply to author
Forward
0 new messages