Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
inmin: float or PyoObject
Minimum input value.
inmax: float or PyoObject
Maximum input value.
outmin: float or PyoObject
Minimum output value.
outmax: float or PyoObject
Maximum output value.
expon: float or PyoObject
Exponent value, specifies the nature of the scaling curve.
Values between 0 and 1 give a logarithmic curve, and values
higher than 1 give an exponential curve.
"""
return EventFilter(self, PYO_EVENT_FILTER_RESCALE, inmin, inmax,
outmin, outmax, expon)
def round(self):
"""
Return an EventFilter computing the nearest integer to its input value.
If two values are equally close, rounding is done toward the even choice.
"""
return EventFilter(self, PYO_EVENT_FILTER_ROUND)
def abs(self):
"""
Return an EventFilter computing the absolute value of its input value.
"""
return EventFilter(self, PYO_EVENT_FILTER_ABS)
def clip(self, mini, maxi):
"""
Return an EventFilter which clips its input value between the limits
`mini` and `maxi`.
:Args:
mini: float or PyoObject
Minimum output value.
maxi: float or PyoObject
Maximum output value.
"""
return EventFilter(self, PYO_EVENT_FILTER_CLIP, mini, maxi)
def ceil(self):
"""
Return an EventFilter computing the smallest integer greater than or
equal to its input value.
"""
return EventFilter(self, PYO_EVENT_FILTER_CEIL)
"""
Return an EventFilter which compares its input value to the value
given to `comp` argument, using the comparison operator `op`. If
the result is True, the input value is sent to the output, otherwise,
the last valid value is sent again.
:Args:
op: string
The comparison operator. Valid operators are:
'<', '<=', '>', '>=', '==', '!='.
comp: float or PyoObject
Comparison value.
"""
return EventFilter(self, PYO_EVENT_FILTER_IFTRUE, op, comp)
def floor(self):
"""
Return an EventFilter computing the largest integer less than or
equal to its input value.
"""
return EventFilter(self, PYO_EVENT_FILTER_FLOOR)