(self, ns, amount, stats)
return ts
Transposes a note sequence by the specified amount.
Transposes a note sequence by the specified amount.
Transposes a note sequence by the specified amount .
def _transpose(self, ns, amount, stats):
    """Transposes a note sequence by the specified amount."""
    ts = copy.deepcopy(ns)
    for note in ts.notes:
      if not note.is_drum:
        note.pitch += amount
        if note.pitch < self._min_pitch or note.pitch > self._max_pitch:
          stats['skipped_due_to_range_exceeded'].increment()
          return None
    return ts
def _transpose ( self , ns , amount , stats ) : ts = copy . deepcopy ( ns ) for note in ts . notes : if not note . is_drum : note . pitch += amount if note . pitch < self . _min_pitch or note . pitch > self . _max_pitch : stats [ 'skipped_due_to_range_exceeded' ] . increment ( ) return None return ts