'Transposes a note sequence by the specified amount.'

@staticmethod
def _transpose(ns, amount, stats):

    ts = copy.deepcopy(ns)
    for note in ts.notes:
        note.pitch += amount
        if ((note.pitch < constants.MIN_MIDI_PITCH) or (note.pitch > constants.MAX_MIDI_PITCH)):
            stats['skipped_due_to_range_exceeded'].increment()
            return None
    return ts
