2022-04-12 22:02:59 -03:00
|
|
|
<!DOCTYPE html>
|
2022-04-12 21:54:18 -03:00
|
|
|
|
|
|
|
<!--Converted with LaTeX2HTML 2002-2-1 (1.71)
|
|
|
|
original version by: Nikos Drakos, CBLU, University of Leeds
|
|
|
|
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
|
|
|
|
* with significant contributions from:
|
|
|
|
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
|
|
|
|
<HTML>
|
|
|
|
<HEAD>
|
2022-04-12 22:02:59 -03:00
|
|
|
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
|
|
|
|
2022-04-12 21:54:18 -03:00
|
|
|
<TITLE>Narrow-band companding: noise suppression</TITLE>
|
|
|
|
<META NAME="description" CONTENT="Narrow-band companding: noise suppression">
|
|
|
|
<META NAME="keywords" CONTENT="book">
|
|
|
|
<META NAME="resource-type" CONTENT="document">
|
|
|
|
<META NAME="distribution" CONTENT="global">
|
|
|
|
|
|
|
|
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
|
|
|
|
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
|
|
|
|
|
|
|
|
<LINK REL="STYLESHEET" HREF="book.css">
|
|
|
|
|
|
|
|
<LINK REL="next" HREF="node181.html">
|
|
|
|
<LINK REL="previous" HREF="node179.html">
|
|
|
|
<LINK REL="up" HREF="node178.html">
|
|
|
|
<LINK REL="next" HREF="node181.html">
|
|
|
|
</HEAD>
|
|
|
|
|
|
|
|
<BODY >
|
|
|
|
<!--Navigation Panel-->
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3259"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node181.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="next.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3253"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node178.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="up.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3247"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node179.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="prev.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3255"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">
|
|
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="contents.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3257"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">
|
|
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="index.png"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<BR>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Next:</B> <A ID="tex2html3260"
|
2022-04-12 23:17:03 -03:00
|
|
|
HREF="node181.html">Timbre stamp ("vocoder")</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Up:</B> <A ID="tex2html3254"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node178.html">Examples</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Previous:</B> <A ID="tex2html3248"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node179.html">Fourier analysis and resynthesis</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html3256"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">Contents</A></B>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html3258"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">Index</A></B>
|
|
|
|
<BR>
|
|
|
|
<BR>
|
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
|
2022-04-12 23:32:40 -03:00
|
|
|
<H2><A ID="SECTION001372000000000000000">
|
2022-04-12 21:54:18 -03:00
|
|
|
Narrow-band companding: noise suppression</A>
|
|
|
|
</H2>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
|
2022-04-12 23:32:40 -03:00
|
|
|
<DIV ALIGN="CENTER"><A ID="fig09.16"></A><A ID="12719"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<TABLE>
|
|
|
|
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 9.16:</STRONG>
|
|
|
|
Noise suppression as an example of narrow-band companding: (a)
|
|
|
|
analysis and reconstruction of the signal; (b) computation of the
|
2022-04-12 23:17:03 -03:00
|
|
|
"mask".</CAPTION>
|
2022-04-12 21:54:18 -03:00
|
|
|
<TR><TD><IMG
|
|
|
|
WIDTH="663" HEIGHT="477" BORDER="0"
|
|
|
|
SRC="img1227.png"
|
|
|
|
ALT="\begin{figure}\psfig{file=figs/fig09.16.ps}\end{figure}"></TD></TR>
|
|
|
|
</TABLE>
|
|
|
|
</DIV>
|
|
|
|
|
|
|
|
<P>
|
|
|
|
Example I04.noisegate.pd (Figure <A HREF="#fig09.16">9.16</A>) shows an example of narrow-band
|
|
|
|
companding using Fourier analysis/resynthesis. (This is a realization of the
|
|
|
|
block diagram of Figure <A HREF="node173.html#fig09.08">9.8</A>.) Part (a) of the figure shows a filter
|
|
|
|
configuration similar to the previous example, except that the gain for each
|
|
|
|
channel is now a function of the channel magnitude.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
For each <IMG
|
|
|
|
WIDTH="12" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img58.png"
|
|
|
|
ALT="$k$">, if we let <IMG
|
|
|
|
WIDTH="28" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
|
|
|
|
SRC="img1228.png"
|
|
|
|
ALT="$s[k]$"> denote the power in channel <IMG
|
|
|
|
WIDTH="12" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img58.png"
|
|
|
|
ALT="$k$">, and let
|
|
|
|
<IMG
|
|
|
|
WIDTH="35" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
|
|
|
|
SRC="img1229.png"
|
|
|
|
ALT="$m[k]$"> be a mask level (a level presumably somewhat higher than the noise
|
|
|
|
power for channel <IMG
|
|
|
|
WIDTH="12" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img58.png"
|
|
|
|
ALT="$k$">), then the gain in channel <IMG
|
|
|
|
WIDTH="12" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img58.png"
|
|
|
|
ALT="$k$"> is given by
|
|
|
|
<BR><P></P>
|
|
|
|
<DIV ALIGN="CENTER">
|
|
|
|
<!-- MATH
|
|
|
|
\begin{displaymath}
|
|
|
|
\left \{
|
|
|
|
\begin{array}{ll}
|
|
|
|
{\sqrt{{s[k]-m[k]}\over {s[k]}}} & {s[k] > m[k]} \\
|
|
|
|
0 & \mbox{otherwise}
|
|
|
|
\end{array}
|
|
|
|
\right .
|
|
|
|
\end{displaymath}
|
|
|
|
-->
|
|
|
|
|
|
|
|
<IMG
|
|
|
|
WIDTH="186" HEIGHT="55" BORDER="0"
|
|
|
|
SRC="img1230.png"
|
|
|
|
ALT="\begin{displaymath}
|
|
|
|
\left \{
|
|
|
|
\begin{array}{ll}
|
|
|
|
{\sqrt{{s[k]-m[k]}\over {s[k]}...
|
|
|
|
... {s[k] > m[k]} \\
|
|
|
|
0 & \mbox{otherwise}
|
|
|
|
\end{array} \right .
|
|
|
|
\end{displaymath}">
|
|
|
|
</DIV>
|
|
|
|
<BR CLEAR="ALL">
|
|
|
|
<P></P>
|
|
|
|
The power in the <IMG
|
|
|
|
WIDTH="12" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img58.png"
|
|
|
|
ALT="$k$">th channel is thus reduced by <IMG
|
|
|
|
WIDTH="35" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
|
|
|
|
SRC="img1229.png"
|
|
|
|
ALT="$m[k]$"> if possible,
|
|
|
|
and otherwise replaced by zero.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The mask itself is the product of the measured average noise in each channel,
|
2022-04-12 23:17:03 -03:00
|
|
|
which is contained in the table "$0-mask", multiplied by a value named
|
|
|
|
"mask-level". The average noise is measured in a subpatch
|
2022-04-12 21:54:18 -03:00
|
|
|
(<TT>pd calculate-mask</TT>), whose contents are shown in part (b) of the
|
|
|
|
figure. To compute the mask we are using two new new objects:
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<BR><!-- MATH
|
|
|
|
$\fbox{\texttt{bang\~}}$
|
|
|
|
-->
|
|
|
|
<IMG
|
|
|
|
WIDTH="56" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
|
|
|
|
SRC="img1231.png"
|
|
|
|
ALT="\fbox{\texttt{bang\~}}">:
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="12903"></A>send a bang in advance of each block of computation. The bang appears at the
|
2022-04-12 21:54:18 -03:00
|
|
|
logical time of the first sample in each block (the earliest logical time whose
|
|
|
|
control computation affects that block and not the previous one), following
|
|
|
|
the scheme shown
|
|
|
|
in Figure <A HREF="node42.html#fig03.02">3.2</A>.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<BR><!-- MATH
|
|
|
|
$\fbox{\texttt{tabsend\~}}$
|
|
|
|
-->
|
|
|
|
<IMG
|
|
|
|
WIDTH="81" HEIGHT="39" ALIGN="MIDDLE" BORDER="0"
|
|
|
|
SRC="img1233.png"
|
|
|
|
ALT="\fbox{\texttt{tabsend\~}}">:
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="12904"></A>the companion object for <TT>tabreceive~</TT>, repeatedly copies its input to
|
2022-04-12 21:54:18 -03:00
|
|
|
the contents of a table, affecting up to the first <IMG
|
|
|
|
WIDTH="18" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img3.png"
|
|
|
|
ALT="$N$"> samples of the table.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
The power averaging process is begun by sending a time duration in milliseconds
|
2022-04-12 23:17:03 -03:00
|
|
|
to "make-mask". The patch computes the equivalent number of blocks <IMG
|
2022-04-12 21:54:18 -03:00
|
|
|
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img21.png"
|
|
|
|
ALT="$b$">
|
|
|
|
and generates a sequence of weights: <!-- MATH
|
|
|
|
$1, 1/2, 1/3, \ldots, 1/b$
|
|
|
|
-->
|
|
|
|
<IMG
|
|
|
|
WIDTH="131" HEIGHT="32" ALIGN="MIDDLE" BORDER="0"
|
|
|
|
SRC="img1235.png"
|
|
|
|
ALT="$1, 1/2, 1/3, \ldots, 1/b$">,
|
|
|
|
by which each of the <IMG
|
|
|
|
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img21.png"
|
|
|
|
ALT="$b$"> following blocks' power is averaged into whatever the
|
|
|
|
mask table held at the previous block. At the end of <IMG
|
|
|
|
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img21.png"
|
|
|
|
ALT="$b$"> blocks the table holds
|
|
|
|
the equally-weighted average of all <IMG
|
|
|
|
WIDTH="10" HEIGHT="14" ALIGN="BOTTOM" BORDER="0"
|
|
|
|
SRC="img21.png"
|
|
|
|
ALT="$b$"> power measurements. Thereafter, the
|
|
|
|
weight for averaging new power measurements is zero, so the measured average
|
|
|
|
stops evolving.
|
|
|
|
|
|
|
|
<P>
|
|
|
|
To use this patch for classical noise suppression requires at least a few
|
2022-04-12 23:17:03 -03:00
|
|
|
seconds of recorded noise without the "signal" present. This is played into
|
|
|
|
the patch, and its duration sent to "make-mask", so that the
|
|
|
|
"$0-mask" table holds the average measured noise power for each channel.
|
2022-04-12 21:54:18 -03:00
|
|
|
Then, making the assumption that the noisy part of the signal rarely exceeds 10
|
2022-04-12 23:17:03 -03:00
|
|
|
times its average power (for example), "mask-level" is set to 10, and the
|
2022-04-12 21:54:18 -03:00
|
|
|
signal to be noise-suppressed is sent through part (a) of the patch. The noise
|
|
|
|
will be almost all gone, but those channels in which the signal exceeds 20
|
|
|
|
times the noise power will only be attenuated by 3dB, and higher-power channels
|
|
|
|
progressively less. (Of course, actual noise suppression might not be the
|
|
|
|
most interesting application of the patch; one could try masking any signal
|
|
|
|
from any other one.)
|
|
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
|
|
<!--Navigation Panel-->
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3259"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node181.html">
|
|
|
|
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="next.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3253"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node178.html">
|
|
|
|
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="up.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3247"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node179.html">
|
|
|
|
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="prev.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3255"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">
|
|
|
|
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="contents.png"></A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<A ID="tex2html3257"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">
|
|
|
|
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
|
2022-04-12 22:02:59 -03:00
|
|
|
SRC="index.png"></A>
|
2022-04-12 21:54:18 -03:00
|
|
|
<BR>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Next:</B> <A ID="tex2html3260"
|
2022-04-12 23:17:03 -03:00
|
|
|
HREF="node181.html">Timbre stamp ("vocoder")</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Up:</B> <A ID="tex2html3254"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node178.html">Examples</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> Previous:</B> <A ID="tex2html3248"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node179.html">Fourier analysis and resynthesis</A>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html3256"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node4.html">Contents</A></B>
|
2022-04-12 23:32:40 -03:00
|
|
|
<B> <A ID="tex2html3258"
|
2022-04-12 21:54:18 -03:00
|
|
|
HREF="node201.html">Index</A></B>
|
|
|
|
<!--End of Navigation Panel-->
|
|
|
|
<ADDRESS>
|
|
|
|
Miller Puckette
|
|
|
|
2006-12-30
|
|
|
|
</ADDRESS>
|
|
|
|
</BODY>
|
|
|
|
</HTML>
|