else :\r
label = self.createLabel(key)\r
elif self.file.endswith('.xml') :\r
else :\r
label = self.createLabel(key)\r
elif self.file.endswith('.xml') :\r
- self.song = musicXml2Song(self.file, printNotes=True)\r
+ self.song = musicXml2Song(self.file, printNotes=False)\r
filename = os.path.basename(self.file)\r
label = self.createLabel(filename) \r
self.browseButton = pguGui.Button(label)\r
filename = os.path.basename(self.file)\r
label = self.createLabel(filename) \r
self.browseButton = pguGui.Button(label)\r
note, lyricIndex = self.songIterator.next()\r
self.highlightedNote = note.column\r
self.highlightedNoteNumber = note.midi\r
note, lyricIndex = self.songIterator.next()\r
self.highlightedNote = note.column\r
self.highlightedNoteNumber = note.midi\r
- self.syllabus = str(note.lyrics[lyricIndex])\r
+ self.syllabus = note.lyrics[lyricIndex].syllabus('iso-8859-1')\r
self.nextCascadeLockLengthMultiplier = note.duration\r
self.midiNoteNumbers[self.highlightedNote] = self.highlightedNoteNumber\r
\r
self.nextCascadeLockLengthMultiplier = note.duration\r
self.midiNoteNumbers[self.highlightedNote] = self.highlightedNoteNumber\r
\r
def iterNotes(self) :
"exécution de la chanson avec l'alternance couplets / refrains"
def iterNotes(self) :
"exécution de la chanson avec l'alternance couplets / refrains"
- for verse in self.verses :
+ for verse in cycle(self.verses) :
print "---partie---"
repeats = len(verse[0].lyrics)
if repeats > 1 :
print "---partie---"
repeats = len(verse[0].lyrics)
if repeats > 1 :
self.syllabic = _getNodeValue(node, 'syllabic', 'single')
self.text = _getNodeValue(node, 'text')
self.syllabic = _getNodeValue(node, 'syllabic', 'single')
self.text = _getNodeValue(node, 'text')
+ def syllabus(self, encoding='utf-8'):
text = self._syllabicModifiers[self.syllabic] % self.text
text = self._syllabicModifiers[self.syllabic] % self.text
- return text.encode('utf-8')
+ return text.encode(encoding)
+
+ def __str__(self) :
+ return self.syllabus()