'Adds the given chord to the `events` list.
`start_step` is set to the given chord. Everything after `start_step` in
`events` is deleted before the chord is added. `events`\'s length will be
changed so that the last event has index `end_step` - 1.
Args:
figure: Chord symbol figure. A string like "Cm9" representing the chord.
start_step: A non-negative integer step that the chord begins on.
end_step: An integer step that the chord ends on. The chord is considered
to end at the onset of the end step. `end_step` must be greater than
`start_step`.
Raises:
BadChordException: If `start_step` does not precede `end_step`.'

def _add_chord(self, figure, start_step, end_step):

    if (start_step >= end_step):
        raise BadChordException(('Start    step    does    not    precede    end    step:    start=%d,    end=%d' % (start_step, end_step)))
    self.set_length(end_step)
    for i in range(start_step, end_step):
        self._events[i] = figure
