summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
1711aaa)
'G' : 67,
'A' : 69,
'B' : 71}
'G' : 67,
'A' : 69,
'B' : 71}
+
+FR_NOTES = {'C' : u'Do',
+ 'D' : u'Ré',
+ 'E' : u'Mi',
+ 'F' : u'Fa',
+ 'G' : u'Sol',
+ 'A' : u'La',
+ 'B' : u'Si'}
+
_marker = []
class Part(object) :
_marker = []
class Part(object) :
def iterNotes(self) :
"exécution de la chanson avec l'alternance couplets / refrains"
for verse in self.verses :
def iterNotes(self) :
"exécution de la chanson avec l'alternance couplets / refrains"
for verse in self.verses :
repeats = len(verse[0].lyrics)
if repeats > 1 :
for i in range(repeats) :
# couplet
repeats = len(verse[0].lyrics)
if repeats > 1 :
for i in range(repeats) :
# couplet
+ print "---couplet%d---" % i
for note in verse :
yield note, i
# refrain
for note in verse :
yield note, i
# refrain
for note in self.chorus :
yield note, 0
else :
for note in self.chorus :
yield note, 0
else :
def pprint(self) :
for note, verseIndex in self.iterNotes() :
def pprint(self) :
for note, verseIndex in self.iterNotes() :
- print note.name, note.midi, note.duration, note.lyrics[verseIndex]
+ print note.nom, note.name, note.midi, note.duration, note.lyrics[verseIndex]
name = '%s%s' % (name, abs(self.alter) * alterext)
return name
name = '%s%s' % (name, abs(self.alter) * alterext)
return name
+ @property
+ def nom(self) :
+ name = FR_NOTES[self.step]
+ if self.alter < 0 :
+ alterext = 'b'
+ else :
+ alterext = '#'
+ name = '%s%s' % (name, abs(self.alter) * alterext)
+ return name
+