'Returns how many steps long this sequence is.
Does not count incomplete steps (i.e., steps that do not have a terminating
STEP_END event).
Returns:
Length of the sequence in quantized steps.'

@property
def num_steps(self):

    steps = 0
    for event in self:
        if (event.event_type == PolyphonicEvent.STEP_END):
            steps += 1
    return steps
