# reson~

## Description

Use the reson~ object when you need a resonant bandpass filter.

## Examples

## Discussion

reson~ implements the following filter equation:

y[n] = a0 * (x[n] - r * x[n-2]) + b1 * y[n-1] + b2 * y[n-2]

where r, b1, and b2 are parameters calculated from the input center frequency fc and Q.

Q = fc/bandwidth.

Inputs can be floats or signals.

## Arguments

### initial-gain [float]

Optional

Sets the initial gain. The default value is 0.

### center-frequency [float]

Optional

Unitshz

Sets the initial center frequency for the filter. The default value is 0.

### Q [float]

Optional

Sets the initial Q value for the filter. The default value is 0.01.

## Attributes

### Common Box Attributes

## Messages

### int

#### Arguments

initial-gain
[int]

center-frequency [int]

Q [int]

center-frequency [int]

Q [int]

An

can be sent in the three right inlets to change the filter-gain, center-frequency, and Q. If a signal is connected to one of the inlets, a number received in that inlet is ignored. ### float

#### Arguments

initial-gain
[float]

center-frequency [float]

Q [float]

center-frequency [float]

Q [float]

### list

#### Arguments

initial-gain
[number]

center-frequency [number]

Q [number]

center-frequency [number]

Q [number]

In left inlet: The first number sets the filter-gain. The second number sets the filter center-frequency. The third number sets the filter-Q. If any of the inlets corresponding to these parameters have signals connected, the corresponding value in the list is ignored.

### clear

Clears the filter's memory. Since reson~ is a recursive filter, this message may be necessary to recover from blowups.

### signal

In left inlet: Any signal to be filtered.

In left-middle inlet: Sets the bandpass filter gain. This value should generally be less than 1.

In right-middle inlet: Sets the bandpass filter center frequency in hertz.

In right inlet: Sets the bandpass filter "Q"-roughly, the sharpness of the filter - where Q is defined by the center-frequency divided by the filter-bandwidth. Useful Q values are typically between 0.01 and 500.

In left-middle inlet: Sets the bandpass filter gain. This value should generally be less than 1.

In right-middle inlet: Sets the bandpass filter center frequency in hertz.

In right inlet: Sets the bandpass filter "Q"-roughly, the sharpness of the filter - where Q is defined by the center-frequency divided by the filter-bandwidth. Useful Q values are typically between 0.01 and 500.

## Output

### signal

The filtered input signal.

## See Also

Name | Description |
---|---|

Sound Processing Techniques | Sound Processing Techniques |

biquad~ | |

comb~ | |

cross~ | |

onepole~ | |

lores~ | |

svf~ | |

Audio Filtering | Audio Filtering |