Debian Codegraph @

opcodes/doppler.xml

raw symbols SCIP
1
2 <refentry id="doppler">
3 <indexterm id="IndexDoppler"><primary>doppler</primary></indexterm>
4 <refentryinfo><title>Signal Modifiers: Special Effects</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>doppler</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>doppler</refname>
11 <refpurpose>
12 A fast and robust method for approximating sound propagation, achieving convincing Doppler shifts without having to solve equations.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>Plugin opcode in doppler.</para>
19 <para>
20 A fast and robust method for approximating sound propagation, achieving convincing Doppler shifts without having to solve equations. The method computes frequency shifts based on reading an input delay line at a delay time computed from the distance between source and mic and the speed of sound. One instance of the opcode is required for each dimension of space through which the sound source moves. If the source sound moves at a constant speed from in front of the microphone, through the microphone, to behind the microphone, then the output will be frequency shifted above the source frequency at a constant frequency while the source approaches, then discontinuously will be shifted below the source frequency at a constant frequency as the source recedes from the microphone. If the source sound moves at a constant speed through a point to one side of the microphone, then the rate of change of position will not be constant, and the familiar Doppler frequency shift typical of a siren or engine approaching and receding along a road beside a listener will be heard.
21 </para>
22 </refsect1>
23
24 <refsect1>
25 <title>Syntax</title>
26 <synopsis>ashifted <command>doppler</command> asource, ksourceposition, kmicposition [, isoundspeed, ifiltercutoff]</synopsis>
27 </refsect1>
28
29 <refsect1>
30 <title>Initialization</title>
31 <para>
32 <emphasis>isoundspeed</emphasis> (optional, default=340.29) -- Speed of sound in meters/second.
33 </para>
34 <para>
35 <emphasis>ifiltercutoff</emphasis> (optional, default=6) -- Rate of updating the position smoothing filter, in cycles/second.
36 </para>
37 </refsect1>
38
39 <refsect1>
40 <title>Performance</title>
41 <para>
42 <emphasis>asource</emphasis> -- Input signal at the sound source.
43 </para>
44 <para>
45 <emphasis>ksourceposition</emphasis> -- Position of the source sound in meters. The distance between source and mic should not be changed faster than about 3/4 the speed of sound.
46 </para>
47 <para>
48 <emphasis>kmicposition</emphasis> -- Position of the recording microphone in meters. The distance between source and mic should not be changed faster than about 3/4 the speed of sound.
49 </para>
50
51 </refsect1>
52
53 <refsect1>
54 <title>Examples</title>
55 <para>
56 Here is an example of the doppler opcode. It uses the file <ulink url="examples/doppler.csd"><citetitle>doppler.csd</citetitle></ulink>.
57
58 <example>
59 <title>Example of the doppler opcode.</title>
60
61 <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>
62 <xi:include href="examples-xml/doppler.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
63 </example>
64 </para>
65 </refsect1>
66
67 <refsect1>
68 <title>See also</title>
69 <para><link linkend="SigmodSpeciale"><citetitle>Special Effects</citetitle></link></para>
70 </refsect1>
71
72 <refsect1>
73 <title>Credits</title>
74 <para>
75 <simplelist>
76 <member>Author of algorithm: &namepeter;</member>
77 <member>Author of opcode: &namemichael;</member>
78 <member>January 2010</member>
79 </simplelist>
80 </para>
81
82 <para>New in Csound version 5.11</para>
83 </refsect1>
84 </refentry>