'Appends the event to the end of the sequence.
Args:
event: The polyphonic event to append to the end.
shift_range: If True, assume that the given event is in the full MIDI
pitch range and needs to be shifted and filtered based on `min_pitch`
and `max_pitch`.
Raises:
ValueError: If `event` is not a valid polyphonic event.'

def append(self, event, shift_range=False):

    if shift_range:
        event = tuple(((p - self._min_pitch) for p in event if (self._min_pitch <= p <= self._max_pitch)))
    self._events.append(event)
