Compress(input, thresh=-20, ratio=2, risetime=0.01, falltime=0.05, mul=1, add=0)
Reduces the dynamic range of an audio signal.
Parent class : PyoObject
Parameters:
input : PyoObject Input signal to filter. thresh : float or PyoObject, optional Level, expressed in dB, above which the signal is reduced. Reference level is 0dB. Defaults to -20. ratio : float or PyoObject, optional Determines the input/output ratio for signals above the threshold. Defaults to 2. risetime : float or PyoObject, optional Used in amplitude follower, time to reach upward value in seconds. Defaults to 0.005. falltime : float or PyoObject, optional Used in amplitude follower, time to reach downward value in seconds. Defaults to 0.05.
Methods:
setInput(x, fadetime) : Replace the `input` attribute. setThresh(x) : Replace the `thresh` attribute. setRatio(x) : Replace the `ratio` attribute. setRiseTime(x) : Replace the `risetime` attribute. setFallTime(x) : Replace the `falltime` attribute.
Attributes:
input : PyoObject. Input signal to filter. thresh : float or PyoObject. Level above which the signal is reduced. ratio : float or PyoObject. in/out ratio for signals above the threshold. risetime : float or PyoObject. Time to reach upward value in seconds. falltime : float or PyoObject. Time to reach downward value in seconds.
Examples:
>>> s = Server().boot() >>> s.start() >>> a = SfPlayer(SNDS_PATH + '/transparent.aif', loop=True) >>> b = Compress(a, thresh=-30, ratio=4, risetime=.005, falltime=.1).out()
Methods details:
Compress.setInput(x, fadetime=0.05): Replace the `input` attribute. Parameters: x : PyoObject New signal to process. fadetime : float, optional Crossfade time between old and new input. Defaults to 0.05. Compress.setThresh(x): Replace the `thresh` attribute. Parameters: x : float or PyoObject New `thresh` attribute. Compress.setRatio(x): Replace the `ratio` attribute. Parameters: x : float or PyoObject New `ratio` attribute. Compress.setRiseTime(x): Replace the `risetime` attribute. Parameters: x : float or PyoObject New `risetime` attribute. Compress.setFallTime(x): Replace the `falltime` attribute. Parameters: x : float or PyoObject New `falltime` attribute.