| 1 | |
| 2 | <refentry id="pvscfs"> |
| 3 | <indexterm id="IndexPvscfs"><primary>pvscfs</primary></indexterm> |
| 4 | <refentryinfo><title>Spectral Processing: lpc</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>pvscfs</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>pvscfs</refname> |
| 11 | <refpurpose> |
| 12 | Cepstrum all-pole coefficient analysis. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | This opcode takes in a pvs signal in AMP_* format, applies the |
| 20 | cepstrum transform and computes the coefficients for a |
| 21 | an allpole filter |
| 22 | </para> |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis>kCoef[],krms,kerr <command>pvscfs</command> fsig, iord[,imod]</synopsis> |
| 28 | |
| 29 | |
| 30 | </refsect1> |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>iord</emphasis> -- all-pole filter order. |
| 35 | </para> |
| 36 | <para> |
| 37 | <emphasis>imod</emphasis> -- filter stabilisation mode (0=no |
| 38 | stabilisation; 1= pole reflection; 2 = pole limiting; |
| 39 | defaults to 1). |
| 40 | </para> |
| 41 | |
| 42 | </refsect1> |
| 43 | |
| 44 | <refsect1> |
| 45 | <title>Performance</title> |
| 46 | <para> |
| 47 | <emphasis>kCoef[]</emphasis> -- all-pole filter coefficients |
| 48 | (iord-size array) |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>krms</emphasis> - RMS estimate of source signal. |
| 53 | </para> |
| 54 | |
| 55 | <para> |
| 56 | <emphasis>kerr</emphasis> - error (or residual). |
| 57 | </para> |
| 58 | |
| 59 | |
| 60 | <para> |
| 61 | <emphasis>fsig</emphasis> -- pvs signal input in PV_AMP_* format. |
| 62 | </para> |
| 63 | |
| 64 | </refsect1> |
| 65 | |
| 66 | <refsect1> |
| 67 | <para> |
| 68 | This opcode is part of a suite of streaming linear prediction |
| 69 | opcodes. It takes an fsig, applies a cepstrum transform, |
| 70 | retaining iord coefficients, and computes the coefficient for |
| 71 | an all-pole filter. Unlike in the linear prediction case, the |
| 72 | resulting filter may be unstable. To resolve this, |
| 73 | two stabilisation methods are offered: poles can be |
| 74 | reflected inside the unit circle, or limited to it. This is |
| 75 | somewhat computationally intensive, so there is also |
| 76 | the option of turning it off (if the particular use case allows). |
| 77 | </para> |
| 78 | |
| 79 | </refsect1> |
| 80 | |
| 81 | <refsect1> |
| 82 | <title>Examples</title> |
| 83 | <para> |
| 84 | Here is an example of the pvscfs opcode using an audio input |
| 85 | signal as lpc source. It uses the file <ulink url="examples/pvscfs.csd"><citetitle>pvscfs.csd</citetitle></ulink>. |
| 86 | <example> |
| 87 | <title>Example of the pvscfs opcode.</title> |
| 88 | <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> |
| 89 | <xi:include href="examples-xml/pvscfs.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 90 | </example> |
| 91 | </para> |
| 92 | </refsect1> |
| 93 | |
| 94 | <refsect1> |
| 95 | <title>See also</title> |
| 96 | <para><link linkend="SpectralLpcresyn"><citetitle>Streaming Linear Predictive Coding (SLPC) Resynthesis</citetitle></link></para> |
| 97 | </refsect1> |
| 98 | |
| 99 | </refentry> |