'Expands a zero-based index value to its equivalent melody event value.
Args:
index: An int in the range [0, self._num_model_events).
0 = no event, 1 = note-off event,
[2, self._num_model_events) = note-on event for that pitch relative
to the [self._min_note, self._max_note) range.
Returns:
A Melody event value. -2 = no event, -1 = note-off event,
[0, 127] = note-on event for that midi pitch.'

def decode_event(self, index):

    if (index < NUM_SPECIAL_MELODY_EVENTS):
        return (index - NUM_SPECIAL_MELODY_EVENTS)
    return ((index - NUM_SPECIAL_MELODY_EVENTS) + self._min_note)
