| 1 | |
| 2 | <refentry id="ampdb"> |
| 3 | <indexterm id="IndexAmpdb"><primary>ampdb</primary></indexterm> |
| 4 | <refentryinfo><title>Mathematical Operations:Amplitude Functions</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>ampdb</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>ampdb</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Returns the amplitude equivalent of the decibel value x. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para> |
| 22 | Returns the amplitude equivalent of the decibel value x. Thus: |
| 23 | <itemizedlist> |
| 24 | <listitem><para>60 dB = 1000</para></listitem> |
| 25 | <listitem><para>66 dB = 1995.262</para></listitem> |
| 26 | <listitem><para>72 dB = 3891.07</para></listitem> |
| 27 | <listitem><para>78 dB = 7943.279</para></listitem> |
| 28 | <listitem><para>84 dB = 15848.926</para></listitem> |
| 29 | <listitem><para>90 dB = 31622.764</para></listitem> |
| 30 | </itemizedlist> |
| 31 | </para> |
| 32 | </refsect1> |
| 33 | |
| 34 | <refsect1> |
| 35 | <title>Syntax</title> |
| 36 | <synopsis><command>ampdb</command>(x) (no rate restriction)</synopsis> |
| 37 | </refsect1> |
| 38 | |
| 39 | <refsect1> |
| 40 | <title>Examples</title> |
| 41 | <para> |
| 42 | Here is an example of the ampdb opcode. It uses the file <ulink url="examples/ampdb.csd"><citetitle>ampdb.csd</citetitle></ulink>. |
| 43 | |
| 44 | <example> |
| 45 | <title>Example of the ampdb opcode.</title> |
| 46 | |
| 47 | |
| 48 | |
| 49 | <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> |
| 50 | <xi:include href="examples-xml/ampdb.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 51 | </example> |
| 52 | |
| 53 | Its output should include lines like: |
| 54 | <screen> |
| 55 | instr 1: iamp = 316.228 |
| 56 | instr 1: iamp = 31622.763 |
| 57 | instr 1: iamp = 2511.886 |
| 58 | instr 1: iamp = 9999.996 |
| 59 | </screen> |
| 60 | </para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>See also</title> |
| 65 | <para><link linkend="MathAmp"><citetitle>Amplitude Converters</citetitle></link></para> |
| 66 | </refsect1> |
| 67 | |
| 68 | </refentry> |