| 1 | <refentry id="pvsmorph"> |
| 2 | <indexterm id="Indexpvsmorph"><primary>pvsmorph</primary></indexterm> |
| 3 | <refentryinfo><title>Spectral Processing:Streaming</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>pvsmorph</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>pvsmorph</refname> |
| 10 | <refpurpose> |
| 11 | Performs morphing (or interpolation) between two source fsigs. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | Performs morphing (or interpolation) between two source fsigs. |
| 19 | </para> |
| 20 | </refsect1> |
| 21 | |
| 22 | <refsect1> |
| 23 | <title>Syntax</title> |
| 24 | <synopsis>fsig <command>pvsmorph</command> fsig1, fsig2, kampint, kfrqint</synopsis> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Performance</title> |
| 29 | <para> |
| 30 | The operation of this opcode is similar to that of <link linkend="pvcross"><citetitle>pvinterp</citetitle></link> (q.v.), |
| 31 | except in using <emphasis>fsig</emphasis>s rather than analysis files, and the absence of spectral envelope preservation. |
| 32 | The amplitudes and frequencies of <emphasis>fsig1</emphasis> are interpolated with those of <emphasis>fsig2</emphasis>, |
| 33 | depending on the values of <emphasis>kampint</emphasis> and <emphasis>kfrqint</emphasis>, respectively. These range |
| 34 | between 0 and 1, where 0 means <emphasis>fsig1</emphasis> and 1, <emphasis>fsig2</emphasis>. Anything in between will |
| 35 | interpolate amps and/or freqs of the two fsigs. |
| 36 | </para> |
| 37 | <para> |
| 38 | With this opcode, morphing can be performed on real-time audio input, by using |
| 39 | <link linkend="pvsanal"><citetitle>pvsanal</citetitle></link> to generate <emphasis>fsig1</emphasis> and <emphasis>fsig2</emphasis>. |
| 40 | These must have the same format. |
| 41 | </para> |
| 42 | <warning> |
| 43 | <para> |
| 44 | It is unsafe to use the same f-variable for both input and output of pvs opcodes. Using the same one might lead to undefined behavior on some opcodes. Use a different one on the left and right sides of the opcode. |
| 45 | </para> |
| 46 | </warning> |
| 47 | </refsect1> |
| 48 | |
| 49 | <refsect1> |
| 50 | <title>Examples</title> |
| 51 | <para> |
| 52 | Here is an example of the pvsmorph opcode. It uses the file <ulink url="examples/pvsmorph.csd"><citetitle>pvsmorph.csd</citetitle></ulink>. |
| 53 | |
| 54 | <example> |
| 55 | <title>Example of the pvsmorph opcode.</title> |
| 56 | <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> |
| 57 | <xi:include href="examples-xml/pvsmorph.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 58 | </example> |
| 59 | </para> |
| 60 | <para> |
| 61 | Here is another example of the pvsmorph opcode. It uses the file <ulink url="examples/pvsmorph2.csd"><citetitle>pvsmorph2.csd</citetitle></ulink>. |
| 62 | |
| 63 | <example> |
| 64 | <title>Example of the pvsmorph opcode.</title> |
| 65 | <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> |
| 66 | <xi:include href="examples-xml/pvsmorph2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 67 | </example> |
| 68 | </para> |
| 69 | </refsect1> |
| 70 | |
| 71 | <refsect1> |
| 72 | <title>See also</title> |
| 73 | <para><link linkend="SpectralRealTime"><citetitle>Tools for Real-time Spectral Processing (pvs opcodes)</citetitle></link></para> |
| 74 | </refsect1> |
| 75 | |
| 76 | <refsect1> |
| 77 | <title>Credits</title> |
| 78 | <para> |
| 79 | <simplelist> |
| 80 | <member>Author: &namevictor;</member> |
| 81 | <member>April 2007 </member> |
| 82 | </simplelist> |
| 83 | New in Csound 5.06 |
| 84 | </para> |
| 85 | |
| 86 | </refsect1> |
| 87 | </refentry> |