Debian Codegraph @

utility/dnoise.xml

raw symbols SCIP
1
2 <refentry id="dnoise">
3 <refentryinfo><title>Utilities</title></refentryinfo>
4 <refmeta>
5 <refentrytitle>dnoise</refentrytitle>
6 </refmeta>
7
8 <refnamediv>
9 <refname>dnoise</refname>
10 <refpurpose>
11 Reduces noise in a file.
12 <indexterm id="IndexDnoise"><primary>dnoise</primary></indexterm>
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 This is a noise reduction scheme using frequency-domain noise-gating.
20 </para>
21 </refsect1>
22
23 <refsect1>
24 <title>Syntax</title>
25 <synopsis><command>dnoise</command> [flags] -i noise_ref_file -o output_soundfile soundfile_format input_soundfile</synopsis>
26 </refsect1>
27
28 <refsect1>
29 <title>Initialization</title>
30 <para>
31 Dnoise specific flags:
32
33 <itemizedlist>
34 <listitem><para><emphasis>(no flag)</emphasis> input soundfile to be denoised</para></listitem>
35 <listitem><para><emphasis>-i fname</emphasis> input reference noise soundfile</para></listitem>
36 <listitem><para><emphasis>-o fname</emphasis> output soundfile</para></listitem>
37 <listitem><para><emphasis>-N fnum</emphasis> # of bandpass filters (default: 1024)</para></listitem>
38 <listitem><para><emphasis>-w fovlp</emphasis> filter overlap factor: {0,1,(2),3} DON'T USE <emphasis>-w</emphasis> AND <emphasis>-M</emphasis></para></listitem>
39 <listitem><para><emphasis>-M awlen</emphasis> analysis window length (default: N-1 unless <emphasis>-w</emphasis> is specified)</para></listitem>
40 <listitem><para><emphasis>-L swlen</emphasis> synthesis window length (default: M)</para></listitem>
41 <listitem><para><emphasis>-D dfac</emphasis> decimation factor (default: M/8)</para></listitem>
42 <listitem><para><emphasis>-b btim</emphasis> begin time in noise reference soundfile (default: 0)</para></listitem>
43 <listitem><para><emphasis>-B smpst</emphasis> starting sample in noise reference soundfile (default: 0)</para></listitem>
44 <listitem><para><emphasis>-e etim</emphasis> end time in noise reference soundfile (default: end of file)</para></listitem>
45 <listitem><para><emphasis>-E smpend</emphasis> final sample in noise reference soundfile (default: end of file)</para></listitem>
46 <listitem><para><emphasis>-t thr</emphasis> threshold above noise reference in dB (default: 30)</para></listitem>
47 <listitem><para><emphasis>-S gfact</emphasis> sharpness of noise-gate turnoff, range: 1 to 5 (default: 1)</para></listitem>
48 <listitem><para><emphasis>-n numfrm</emphasis> number of FFT frames to average over (default: 5)</para></listitem>
49 <listitem><para><emphasis>-m mingain</emphasis> minimum gain of noise-gate when off in dB (default: -40)</para></listitem>
50 </itemizedlist>
51 </para>
52
53 <para>
54 Soundfile format options:
55
56 <itemizedlist>
57 <listitem><para><emphasis>-A</emphasis> AIFF format output</para></listitem>
58 <listitem><para><emphasis>-W</emphasis> WAV format output</para></listitem>
59 <listitem><para><emphasis>-J</emphasis> IRCAM format output</para></listitem>
60 <listitem><para><emphasis>-h</emphasis> skip soundfile header (not valid for AIFF/WAV output)</para></listitem>
61 <listitem><para><emphasis>-8</emphasis> 8-bit unsigned char sound samples</para></listitem>
62 <listitem><para><emphasis>-c</emphasis> 8-bit signed_char sound samples</para></listitem>
63 <listitem><para><emphasis>-a</emphasis> alaw sound samples</para></listitem>
64 <listitem><para><emphasis>-u</emphasis> ulaw sound samples</para></listitem>
65 <listitem><para><emphasis>-s</emphasis> short_int sound samples</para></listitem>
66 <listitem><para><emphasis>-l</emphasis> long_int sound samples</para></listitem>
67 <listitem><para><emphasis>-f</emphasis> float sound samples. Floats also supported for WAV files. (New in Csound 3.47.)</para></listitem>
68 </itemizedlist>
69 </para>
70
71 <para>
72 Additional options:
73
74 <itemizedlist>
75 <listitem><para><emphasis>-R</emphasis> verbose - print status info</para></listitem>
76 <listitem><para><emphasis>-H [N]</emphasis> print a heartbeat character at each soundfile write.</para></listitem>
77 <listitem><para><emphasis>-- fname</emphasis> output to log file fname</para></listitem>
78 <listitem><para><emphasis>-V</emphasis> verbose - print status info</para></listitem>
79 </itemizedlist>
80 </para>
81
82 <note>
83 <title>Note</title>
84 <para>
85 DNOISE also looks at the environment variable SFOUTYP to determine soundfile output format.
86 </para>
87
88 <para>
89 The -i flag is used for a reference noise file (normally created from a short section of the denoised file, where only noise is audible). The input soundfile to be denoised can be given anywhere on the command line, without a flag.
90 </para>
91 </note>
92 </refsect1>
93
94 <refsect1>
95 <title>Performance</title>
96 <para>
97 This is a noise reduction scheme using frequency-domain noise-gating. This should work best in the case of high signal-to-noise with hiss-type noise.
98 </para>
99
100 <para>
101 The algorithm is that suggested by Moorer &amp; Berger in <quote>Linear-Phase Bandsplitting: Theory and Applications</quote> presented at the 76th Convention 1984 October 8-11 New York of the Audio Engineering Society (preprint &num;2132) except that it uses the Weighted Overlap-Add formulation for short-time Fourier analysis-synthesis in place of the recursive formulation suggested by Moorer &amp; Berger. The gain in each frequency bin is computed independently according to
102
103 <literallayout>
104 gain = g0 + (1-g0) * [avg / (avg + th*th*nref)] &circ; sh
105 </literallayout>
106
107 where <emphasis>avg</emphasis> and <emphasis>nref</emphasis> are the mean squared signal and noise respectively for the bin in question. (This is slightly different than in Moorer &amp; Berger.)
108 </para>
109
110 <para>
111 The critical parameters <emphasis>th</emphasis> and <emphasis>g0</emphasis> are specified in dB and internally converted to decimal values. The <emphasis>nref</emphasis> values are computed at the start of the program on the basis of a noise_soundfile (specified in the command line) which contains noise without signal.
112 </para>
113
114 <para>
115 The <emphasis>avg</emphasis> values are computed over a rectangular window of m FFT frames looking both ahead and behind the current time. This corresponds to a temporal extent of m*D/R (which is typically (m*N/8)/R). The default settings of N, M, and D should be appropriate for most uses. A higher sample rate than 16 Khz might indicate a higher N.
116 </para>
117 </refsect1>
118
119 <refsect1>
120 <title>Examples</title>
121 <para>
122 Here is an example of the dnoise utility. It uses the file <ulink url="examples/dnoise.csd"><citetitle>dnoise.csd</citetitle></ulink>, <ulink url="examples/MathewsNoise.wav"><citetitle>MathewsNoise.wav</citetitle></ulink> and <ulink url="examples/MathewsN.wav"><citetitle>MathewsN.wav</citetitle></ulink>.
123 <example>
124 <title>Example of the dnoise utility.</title>
125 <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>
126 <xi:include href="examples-xml/dnoise.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
127 </example>
128 </para>
129 </refsect1>
130
131 <refsect1>
132 <title>Credits</title>
133 <para>Author: Mark Dolson</para>
134 <para>August 26, 1989</para>
135 <para>Author: &namejohn;</para>
136 <para>December 30, 2000</para>
137 <para>Updated by &namerasmus; on March 11, 2002.</para>
138 </refsect1>
139 </refentry>