From 227a1e46f9141ec80829a432f78edbdab8a39c48 Mon Sep 17 00:00:00 2001 From: Reinhold Kainhofer Date: Fri, 11 Apr 2008 19:46:55 +0200 Subject: [PATCH] MusicXML: The duration of an EventChord is the length of notes and *rests* Signed-off-by: Reinhold Kainhofer --- python/musicexp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/musicexp.py b/python/musicexp.py index 00b288176c..d0fc398f6b 100644 --- a/python/musicexp.py +++ b/python/musicexp.py @@ -722,7 +722,7 @@ class ChordEvent (NestedMusic): def get_duration (self): note_events = [e for e in self.elements if - isinstance (e, NoteEvent)] + isinstance (e, NoteEvent) or isinstance (e, RestEvent)] if note_events: return note_events[0].duration else: -- 2.39.2