def clip(value, minimum=-float('inf'), maximum=float('inf')):
    """Signal hard clipping"""
    if value < minimum:
        return minimum
    if value > maximum:
        return maximum
    return value
