return self._lyrics
-
class Part (Music_xml_node):
def __init__ (self):
Music_xml_node.__init__ (self)
- self._voices = []
+ self._voices = {}
+ self._staff_attributes_dict = {}
def get_part_list (self):
n = self
def interpret (self):
"""Set durations and starting points."""
+ """The starting point of the very first note is 0!"""
part_list = self.get_part_list ()
measure_position = Rational (0)
measure_start_moment = now
is_first_measure = True
- prvious_measure = None
+ previous_measure = None
for m in measures:
# implicit measures are used for artificial measures, e.g. when
# a repeat bar line splits a bar into two halves. In this case,
# know if the next measure is implicit and continues that measure)
if not m.is_implicit ():
# Warn about possibly overfull measures and reset the position
- if attributes_object:
+ if attributes_object and previous_measure and previous_measure.partial == 0:
length = attributes_object.get_measure_length ()
new_now = measure_start_moment + length
if now <> new_now:
for (s, vids) in staff_to_voice_dict.items ():
staff_attributes = part.extract_attributes_for_staff (start_attr, s)
staff_attributes.read_self ()
+ part._staff_attributes_dict[s] = staff_attributes
for v in vids:
voices[v].insert (0, staff_attributes)
voices[v]._elements[0].read_self()
def get_voices (self):
return self._voices
+ def get_staff_attributes (self):
+ return self._staff_attributes_dict
class Notations (Music_xml_node):
def get_tie (self):