+
+ @property
+ def intervalsHistogram(self) :
+ histogram = {}
+ it = self.iterNotes()
+ previousNote = it.next()[0]
+ for note, _ in it :
+ interval = note.midi - previousNote.midi
+ if histogram.has_key(interval) :
+ histogram[interval] += 1
+ else :
+ 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
+