You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
miller-book/node20.html

171 lines
5.5 KiB

<!DOCTYPE html>
<!--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>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<TITLE>Amplitude control in decibels</TITLE>
<META NAME="description" CONTENT="Amplitude control in decibels">
<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="node21.html">
<LINK REL="previous" HREF="node19.html">
<LINK REL="up" HREF="node18.html">
<LINK REL="next" HREF="node21.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A ID="tex2html839"
HREF="node21.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A ID="tex2html833"
HREF="node18.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A ID="tex2html827"
HREF="node19.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A ID="tex2html835"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A ID="tex2html837"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A ID="tex2html840"
HREF="node21.html">Smoothed amplitude control with</A>
<B> Up:</B> <A ID="tex2html834"
HREF="node18.html">Examples</A>
<B> Previous:</B> <A ID="tex2html828"
HREF="node19.html">Constant amplitude scaler</A>
&nbsp; <B> <A ID="tex2html836"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A ID="tex2html838"
HREF="node201.html">Index</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H2><A ID="SECTION00592000000000000000">
Amplitude control in decibels</A>
</H2>
<P>
Example A02.amplitude.pd shows how to make a crude amplitude control;
the active elements
are shown in Figure <A HREF="#fig01.12">1.12</A> (part a). There is one new object class:
<P>
<DIV ALIGN="CENTER"><A ID="fig01.12"></A><A ID="1273"></A>
<TABLE>
<CAPTION ALIGN="BOTTOM"><STRONG>Figure 1.12:</STRONG>
The active ingredients to three patches: (a) A02.amplitude.pd; (b)
A03.line.pd; (c) A05.output.subpatch.pd.</CAPTION>
<TR><TD><IMG
WIDTH="555" HEIGHT="350" BORDER="0"
SRC="img149.png"
ALT="\begin{figure}\psfig{file=figs/fig01.12.ps}\end{figure}"></TD></TR>
</TABLE>
</DIV>
<P>
<BR><!-- MATH
$\fbox{ $ \mathrm{dbtorms} $}$
-->
<IMG
WIDTH="77" HEIGHT="41" ALIGN="MIDDLE" BORDER="0"
SRC="img150.png"
ALT="\fbox{ $ \mathrm{dbtorms} $}"> : Decibels to linear
amplitude conversion. The "RMS" is a misnomer; it should have been named
"dbtoamp",
since it really converts from decibels to any linear amplitude unit, be it
RMS, peak, or other. An input of 100 dB is normalized to an output of 1.
Values greater than 100 are fine (120 will give 10), but values less than or
equal to zero will output zero (a zero input would otherwise have output a
small positive number). This is a control object, i.e., the numbers going in
and out are messages, not signals. (A corresponding object,
<!-- MATH
$\fbox{ $ \mathrm{dbtorms}\sim $}$
-->
<IMG
WIDTH="94" HEIGHT="41" ALIGN="MIDDLE" BORDER="0"
SRC="img151.png"
ALT="\fbox{ $ \mathrm{dbtorms}\sim $}">, is the signal correlate. However, as a
signal object this is expensive in CPU time and most often we'll find
one way or another to avoid using it.)
<P>
The two number boxes are connected to the input and output of the
<TT>dbtorms</TT> object. The input functions as a control; "mouse" on it
(click and drag upward or downward) to change the amplitude. It has been set to range from
0 to 80; this is protection for your speakers and ears, and it's wise to build
such guardrails into your own patches.
<P>
The other number box shows the output of the <TT>dbtorms</TT> object. It is
useless
to mouse on this number box, since its outlet is connected nowhere; it is here
purely to display its input. Number boxes may be useful as controls, displays,
or both, although if you're using it as both there may be some extra work to do.
<P>
<HR>
<!--Navigation Panel-->
<A ID="tex2html839"
HREF="node21.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="next.png"></A>
<A ID="tex2html833"
HREF="node18.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="up.png"></A>
<A ID="tex2html827"
HREF="node19.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="prev.png"></A>
<A ID="tex2html835"
HREF="node4.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="contents.png"></A>
<A ID="tex2html837"
HREF="node201.html">
<IMG WIDTH="43" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="index"
SRC="index.png"></A>
<BR>
<B> Next:</B> <A ID="tex2html840"
HREF="node21.html">Smoothed amplitude control with</A>
<B> Up:</B> <A ID="tex2html834"
HREF="node18.html">Examples</A>
<B> Previous:</B> <A ID="tex2html828"
HREF="node19.html">Constant amplitude scaler</A>
&nbsp; <B> <A ID="tex2html836"
HREF="node4.html">Contents</A></B>
&nbsp; <B> <A ID="tex2html838"
HREF="node201.html">Index</A></B>
<!--End of Navigation Panel-->
<ADDRESS>
Miller Puckette
2006-12-30
</ADDRESS>
</BODY>
</HTML>