def clip(obj, lower=0, upper=127):
    """
    Return a copy of the object with piano-roll(s) clipped by a lower bound
    and an upper bound specified by `lower` and `upper`, respectively.

    Parameters
    ----------
    lower : int or float
        The lower bound to clip the piano-roll. Default to 0.
    upper : int or float
        The upper bound to clip the piano-roll. Default to 127.

    """
    _check_supported(obj)
    copied = deepcopy(obj)
    copied.clip(lower, upper)
    return copied