+
+ @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