| 1 | |
| 2 | <refentry id="scaleutility"> |
| 3 | <refentryinfo><title>Utilities</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>scale</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>scale</refname> |
| 10 | <refpurpose> |
| 11 | Scale the amplitude of a sound file. |
| 12 | <indexterm id="IndexScaleUtility"><primary>scale</primary></indexterm> |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Takes a sound file and scales it by applying a gain, either |
| 20 | constant or variable. The scale can be specified as a multiplier, |
| 21 | a maximum or a percentage of 0db. |
| 22 | </para> |
| 23 | |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>scale</command> [OPTIONS ... ] infile</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | Flags: |
| 35 | |
| 36 | <itemizedlist> |
| 37 | <listitem> |
| 38 | <para> |
| 39 | -<emphasis>A</emphasis> |
| 40 | = Generate an AIFF outout file. |
| 41 | </para> |
| 42 | </listitem> |
| 43 | |
| 44 | <listitem> |
| 45 | <para> |
| 46 | -<emphasis>W</emphasis> |
| 47 | = Generate an WAV outout file. |
| 48 | </para> |
| 49 | </listitem> |
| 50 | |
| 51 | <listitem> |
| 52 | <para> |
| 53 | -<emphasis>h</emphasis> |
| 54 | = Generate an outout file with no header. |
| 55 | </para> |
| 56 | </listitem> |
| 57 | |
| 58 | <listitem> |
| 59 | <para> |
| 60 | -<emphasis>c</emphasis> |
| 61 | = Generate 8-bit signed_char sound samples. |
| 62 | </para> |
| 63 | </listitem> |
| 64 | |
| 65 | <listitem> |
| 66 | <para> |
| 67 | -<emphasis>a</emphasis> |
| 68 | = Generate alaw sound samples. |
| 69 | </para> |
| 70 | </listitem> |
| 71 | <listitem> |
| 72 | <para> |
| 73 | -<emphasis>u</emphasis> |
| 74 | = Generate ulaw sound samples. |
| 75 | </para> |
| 76 | </listitem> |
| 77 | |
| 78 | <listitem> |
| 79 | <para> |
| 80 | -<emphasis>s</emphasis> |
| 81 | = Generate short integer sound samples. |
| 82 | </para> |
| 83 | </listitem> |
| 84 | |
| 85 | <listitem> |
| 86 | <para> |
| 87 | -<emphasis>l</emphasis> |
| 88 | = Generate long (32 bit) integer sound samples. |
| 89 | </para> |
| 90 | </listitem> |
| 91 | |
| 92 | <listitem> |
| 93 | <para> |
| 94 | -<emphasis>f</emphasis> |
| 95 | = Generate floating point samples. |
| 96 | </para> |
| 97 | </listitem> |
| 98 | |
| 99 | <listitem> |
| 100 | <para> |
| 101 | -<emphasis>F arg</emphasis> |
| 102 | = Specifies the gain to be applied. If arg is a |
| 103 | floating point number that gain is applied uniformly to |
| 104 | the input. Alternatively it could be a file name which |
| 105 | specifies a breakpoint file for varying the gain for |
| 106 | different periods. |
| 107 | </para> |
| 108 | </listitem> |
| 109 | |
| 110 | <listitem> |
| 111 | <para> |
| 112 | -<emphasis>M fpnum</emphasis> |
| 113 | = Scales the input so the maximum absolute displacement |
| 114 | is the value given. |
| 115 | </para> |
| 116 | </listitem> |
| 117 | |
| 118 | <listitem> |
| 119 | <para> |
| 120 | -<emphasis>P fpnum</emphasis> |
| 121 | = Scales the input so the maximum absolute displacement |
| 122 | is the pencentage given of 0db. |
| 123 | </para> |
| 124 | </listitem> |
| 125 | |
| 126 | <listitem> |
| 127 | <para> |
| 128 | -<emphasis>R</emphasis> |
| 129 | = Continually rewrite the header while writing soundfile |
| 130 | (WAV/AIFF). |
| 131 | </para> |
| 132 | </listitem> |
| 133 | |
| 134 | <listitem> |
| 135 | <para> |
| 136 | -<emphasis>H integer</emphasis> |
| 137 | = Show a "heart-beat" to indicate progress, in style 1, |
| 138 | 2 or 3. </para> |
| 139 | </listitem> |
| 140 | |
| 141 | <listitem> |
| 142 | <para> |
| 143 | -<emphasis>N</emphasis> |
| 144 | = Alert call (usually ringing the bell) when finished. |
| 145 | </para> |
| 146 | </listitem> |
| 147 | |
| 148 | <listitem> |
| 149 | <para> |
| 150 | -<emphasis>o fname</emphasis> |
| 151 | = output file name (default: test.wav) |
| 152 | </para> |
| 153 | </listitem> |
| 154 | </itemizedlist> |
| 155 | |
| 156 | </para> |
| 157 | |
| 158 | </refsect1> |
| 159 | |
| 160 | <refsect1> |
| 161 | <title>Examples</title> |
| 162 | <para> |
| 163 | |
| 164 | <programlisting> |
| 165 | <emphasis>scale</emphasis> -s -W -F 0.96 -o out.wav sound.wav</programlisting> |
| 166 | |
| 167 | |
| 168 | This creates a new sound file with a constant gain of |
| 169 | 0.96. It is particularly useful if the input file is |
| 170 | in floating point format. |
| 171 | </para> |
| 172 | |
| 173 | </refsect1> |
| 174 | |
| 175 | <refsect1> |
| 176 | <title>Credits</title> |
| 177 | <para>Author: &namejohn;</para> |
| 178 | <para>1994</para> |
| 179 | </refsect1> |
| 180 | |
| 181 | </refentry> |