(self)
return steps
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.
Returns how many steps long this sequence is.
Returns how many steps long this sequence is .
def num_steps(self):
    """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.
    """
    steps = 0
    for event in self:
      if event.event_type == PolyphonicEvent.STEP_END:
        steps += 1
    return steps
def num_steps ( self ) : steps = 0 for event in self : if event . event_type == PolyphonicEvent . STEP_END : steps += 1 return steps