'Gets a histogram of the note occurrences in a melody.
Returns:
A list of 12 ints, one for each note value (C at index 0 through B at
index 11). Each int is the total number of times that note occurred in
the melody.'

def get_note_histogram(self):

    np_melody = np.array(self._events, dtype=int)
    return np.bincount((np_melody[(np_melody >= MIN_MIDI_PITCH)] % NOTES_PER_OCTAVE), minlength=NOTES_PER_OCTAVE)
