summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6887a8f)
songFile = self.getSongFile()
song = musicXml2Song(songFile)
songFile = self.getSongFile()
song = musicXml2Song(songFile)
- duration = 0
- for note, verseIndex in song.iterNotes() :
- duration = duration + note.duration
- duration = duration * song.quarterNoteDuration # en milisecondes
+ duration = song.duration
return self._toTimeDelta(duration)
@statsresults
return self._toTimeDelta(duration)
@statsresults
histogram[interval] = 1
previousNote = note
return histogram
histogram[interval] = 1
previousNote = note
return histogram
+
+ @property
+ def duration(self) :
+ 'Durée de référence du morceau en milisecondes'
+ it = self.iterNotes()
+ duration = 0
+ for note, verseIndex in it :
+ duration = duration + note.duration
+ duration = duration * self.quarterNoteDuration # en milisecondes
+ return duration
+
def pprint(self) :
for note, verseIndex in self.iterNotes(indefinitely=False) :
def pprint(self) :
for note, verseIndex in self.iterNotes(indefinitely=False) :
printNotes=options.printNotes)
from pprint import pprint
pprint(song.intervalsHistogram)
printNotes=options.printNotes)
from pprint import pprint
pprint(song.intervalsHistogram)
if __name__ == '__main__' :
if __name__ == '__main__' :