- print note.nom, note.name, note.midi, note.duration, note.lyrics[verseIndex]
+ print note, note.lyrics[verseIndex]
+
+
+ def assignNotesFromMidiNoteNumbers(self):
+ # TODO faire le mapping bande hauteur midi
+ for i in range(len(self.midiNoteNumbers)):
+ noteInExtendedScale = 0
+ while self.midiNoteNumbers[i] > self.scale[noteInExtendedScale] and noteInExtendedScale < len(self.scale)-1:
+ noteInExtendedScale += 1
+ if self.midiNoteNumbers[i]<self.scale[noteInExtendedScale]:
+ noteInExtendedScale -= 1
+ self.notes.append(noteInExtendedScale)
+
+
+class Barline(object) :
+
+ def __init__(self, node) :
+ self.node = node
+ self.location = node.getAttribute('location')
+ try :
+ repeat = node.getElementsByTagName('repeat')[0]
+ repeat = {'direction' : repeat.getAttribute('direction'),
+ 'times' : int(repeat.getAttribute('times') or 1)}
+ self.repeat = repeat
+ except IndexError :
+ self.repeat = None