| 1 | <refentry id="mvmfilter"> |
| 2 | <indexterm id="IndexMvmfilter"><primary>mvmfilter</primary></indexterm> |
| 3 | <refentryinfo><title>Signal Modifiers:Specialized Filters</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>mvmfilter</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>mvmfilter</refname> |
| 10 | <refpurpose> |
| 11 | A filter with pronounced resonance and controllable decay time. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | Filters the incoming signal with the specified resonance |
| 19 | frequency and decay time. This can be used to overlay a specific |
| 20 | resonance on to an incoming sound or to model short bursts of |
| 21 | sinusoids at a desired frequency. With a sufficiently long decay |
| 22 | time it can be used as a sinusoidal oscillator. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis>aout <command>mvmfilter</command> ain, xfreq, xTau [, iskip]</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>iskip</emphasis> |
| 35 | (optional, default=0) -- if non zero skip the initialisation of the |
| 36 | filter. |
| 37 | </para> |
| 38 | </refsect1> |
| 39 | |
| 40 | <refsect1> |
| 41 | <title>Performance</title> |
| 42 | <para> |
| 43 | <emphasis>aout</emphasis> -- filtered signal |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>ain</emphasis> -- signal to filter |
| 48 | </para> |
| 49 | |
| 50 | <para> |
| 51 | <emphasis>xfreq</emphasis> -- resonant frequency of the filter |
| 52 | <warning> |
| 53 | <title>Warning</title> |
| 54 | <para> |
| 55 | The filter output can rapidly grow to very large output if |
| 56 | the input signal correlates with the output. The worst case |
| 57 | is that it grows by the magnitude of the input with every |
| 58 | sample. To limit the growth so the filter does not explode, |
| 59 | it is best to scale down any continuous input significantly. |
| 60 | |
| 61 | The required scale is related to the value of the decay-time |
| 62 | tau so if you select a maximum decay-time you can calculate |
| 63 | the required scaling: factor = 1 / $M_E / |
| 64 | (<emphasis>sr</emphasis>*tau) |
| 65 | </para> |
| 66 | </warning> |
| 67 | </para> |
| 68 | |
| 69 | <para> |
| 70 | <emphasis>xTau</emphasis> -- Decay time of the filter in seconds |
| 71 | </para> |
| 72 | <para>The decay time is the time in seconds for filter to decay to 1/<emphasis>e</emphasis></para> |
| 73 | </refsect1> |
| 74 | |
| 75 | <refsect1> |
| 76 | <title>Examples</title> |
| 77 | <para> |
| 78 | Here is an example of the mvmfilter opcode. It uses the file <ulink url="examples/mvmfilter.csd"><citetitle>mvmfilter.csd</citetitle></ulink>. |
| 79 | <example> |
| 80 | <title>Example of the mvmfilter opcode.</title> |
| 81 | <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para> |
| 82 | <xi:include href="examples-xml/mvmfilter.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 83 | </example> |
| 84 | </para> |
| 85 | </refsect1> |
| 86 | |
| 87 | <refsect1> |
| 88 | <title>See also</title> |
| 89 | <para><link linkend="SigmodSpeciali"><citetitle>Specialized Filters: Other filters</citetitle></link></para> |
| 90 | </refsect1> |
| 91 | |
| 92 | <refsect1> |
| 93 | <title>References</title> |
| 94 | <para> This filter is based on the work of Max Mathews and Julius |
| 95 | O. Smith III. This filter was originally used by Max Mathews in an |
| 96 | application which applied a bank of these filters to an incoming |
| 97 | sound with live controls over the decay time and frequency |
| 98 | parameters. This setup was the basis for collaborative live |
| 99 | performance and was referred to as Phasor Filters. </para> |
| 100 | |
| 101 | <para> |
| 102 | <orderedlist> |
| 103 | <listitem> |
| 104 | <para> |
| 105 | Max Mathews and Julius O. Smith III, |
| 106 | <ulink url="https://ccrma.stanford.edu/~jos/smac03maxjos/smac03maxjos.pdf"><citetitle>"Very High Q Parametrically WellBehaved Two Pole Filters"</citetitle></ulink> |
| 107 | </para> |
| 108 | </listitem> |
| 109 | </orderedlist> |
| 110 | </para> |
| 111 | </refsect1> |
| 112 | |
| 113 | <refsect1> |
| 114 | <title>Credits</title> |
| 115 | <para></para> |
| 116 | <para>Original design by Max V. Mathews and Julius O. Smith III</para> |
| 117 | <para>Opcode implementation by Joel Ross</para> |
| 118 | <para>New in version 6.16</para> |
| 119 | <para>May 2021.</para> |
| 120 | </refsect1> |
| 121 | </refentry> |