mvmfilter
A filter with pronounced resonance and controllable decay time.
Filters the incoming signal with the specified resonance frequency and decay time. This can be used to overlay a specific resonance on to an incoming sound or to model short bursts of sinusoids at a desired frequency. With a sufficiently long decay time it can be used as a sinusoidal oscillator.
Syntax
Initialization
iskip (optional, default=0) -- zero clears the filter history; nonzero keeps it on reinitialization.
Performance
aout -- filtered signal
ain -- signal to filter
xfreq -- resonant frequency in Hz, at control or audio rate. Values above sr/2 are limited to sr/2.
Warning
The filter output can rapidly grow to very large output if the input signal correlates with the output. The worst case is that it grows by the magnitude of the input with every sample. To limit the growth so the filter does not explode, it is best to scale down any continuous input significantly. The required scale is related to the value of the decay-time tau so if you select a maximum decay-time you can calculate the required scaling: factor = 1 / $M_E / (sr*tau)
xTau -- amplitude decay time in seconds, at control or audio rate.
With positive xTau and no further input, the resonance amplitude falls to 1/e (about 0.368) after xTau seconds. For example, xTau = 2 gives about 36.8% of the initial amplitude after two seconds and 13.5% after four seconds.
A zero or negative xTau disables feedback and passes the current input through.
Examples
Here is an example of the mvmfilter opcode. It uses the file mvmfilter.csd.
| Example of the mvmfilter opcode. | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 | |
See also
Specialized Filters: Other filters
References
This filter is based on the work of Max Mathews and Julius O. Smith III. This filter was originally used by Max Mathews in an application which applied a bank of these filters to an incoming sound with live controls over the decay time and frequency parameters. This setup was the basis for collaborative live performance and was referred to as Phasor Filters.
- Max Mathews and Julius O. Smith III, "Very High Q Parametrically WellBehaved Two Pole Filters"
Credits
Original design by Max V. Mathews and Julius O. Smith III
Opcode implementation by Joel Ross
New in version 6.16
May 2021.