| 1 | |
| 2 | <refentry id="extractor"> |
| 3 | <refentryinfo><title>Utilities</title></refentryinfo> |
| 4 | <refmeta> |
| 5 | <refentrytitle>extractor</refentrytitle> |
| 6 | </refmeta> |
| 7 | |
| 8 | <refnamediv> |
| 9 | <refname>extractor</refname> |
| 10 | <refpurpose> |
| 11 | Extract a section of audio from an audio file. |
| 12 | <indexterm id="IndexExtractor"><primary>extractor</primary></indexterm> |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Extract a section of audio, by time or sample, from an |
| 20 | existing sound file. |
| 21 | </para> |
| 22 | |
| 23 | </refsect1> |
| 24 | |
| 25 | <refsect1> |
| 26 | <title>Syntax</title> |
| 27 | <synopsis><command>extractor</command> [OPTIONS ... ] infile</synopsis> |
| 28 | </refsect1> |
| 29 | |
| 30 | <refsect1> |
| 31 | <title>Initialization</title> |
| 32 | <para> |
| 33 | Flags: |
| 34 | |
| 35 | <itemizedlist> |
| 36 | <listitem> |
| 37 | <para> |
| 38 | -<emphasis>S integer</emphasis> |
| 39 | = Start the extract at the given sample number. |
| 40 | </para> |
| 41 | </listitem> |
| 42 | |
| 43 | <listitem> |
| 44 | <para> |
| 45 | -<emphasis>Z integer</emphasis> |
| 46 | = End the extract at the given sample number. |
| 47 | </para> |
| 48 | </listitem> |
| 49 | |
| 50 | <listitem> |
| 51 | <para> |
| 52 | - <emphasis>Q integer</emphasis> |
| 53 | = Extract given number of samples. |
| 54 | </para> |
| 55 | </listitem> |
| 56 | |
| 57 | <listitem> |
| 58 | <para> |
| 59 | -<emphasis>T fpnum</emphasis> |
| 60 | = Start the extract at the given time in seconds. |
| 61 | </para> |
| 62 | </listitem> |
| 63 | |
| 64 | <listitem> |
| 65 | <para> |
| 66 | -<emphasis>E fpnum</emphasis> |
| 67 | = End the extract at the given time in seconds. |
| 68 | </para> |
| 69 | </listitem> |
| 70 | |
| 71 | <listitem> |
| 72 | <para> |
| 73 | -<emphasis>D fpnum</emphasis> |
| 74 | = Extract given time in seconds. |
| 75 | </para> |
| 76 | </listitem> |
| 77 | |
| 78 | |
| 79 | <listitem> |
| 80 | <para> |
| 81 | -<emphasis>v</emphasis> |
| 82 | = Verbose mode. |
| 83 | </para> |
| 84 | </listitem> |
| 85 | |
| 86 | <listitem> |
| 87 | <para> |
| 88 | -<emphasis>R</emphasis> |
| 89 | = Continually rewrite the header while writing soundfile |
| 90 | (WAV/AIFF). |
| 91 | </para> |
| 92 | </listitem> |
| 93 | |
| 94 | <listitem> |
| 95 | <para> |
| 96 | -<emphasis>H integer</emphasis> |
| 97 | = Show a "heart-beat" to indicate progress, in style 1, |
| 98 | 2 or 3. </para> |
| 99 | </listitem> |
| 100 | |
| 101 | <listitem> |
| 102 | <para> |
| 103 | -<emphasis>N</emphasis> |
| 104 | = Alert call (usually ringing the bell) when finished. |
| 105 | </para> |
| 106 | </listitem> |
| 107 | |
| 108 | <listitem> |
| 109 | <para> |
| 110 | -<emphasis>v</emphasis> |
| 111 | = Verbose mode. |
| 112 | </para> |
| 113 | </listitem> |
| 114 | |
| 115 | <listitem> |
| 116 | <para> |
| 117 | -<emphasis>o fname</emphasis> |
| 118 | = output file name (default: test.wav) |
| 119 | </para> |
| 120 | </listitem> |
| 121 | </itemizedlist> |
| 122 | |
| 123 | </para> |
| 124 | |
| 125 | </refsect1> |
| 126 | |
| 127 | <refsect1> |
| 128 | <title>Examples</title> |
| 129 | <para> |
| 130 | |
| 131 | The default values are |
| 132 | <programlisting> |
| 133 | <emphasis>extractor</emphasis> -S 0 -Z end-of-file -otest</programlisting> |
| 134 | |
| 135 | For example |
| 136 | <programlisting> |
| 137 | <emphasis>extractor</emphasis> -S 10234 -D 2.13 in.aiff -o out.wav</programlisting> |
| 138 | |
| 139 | |
| 140 | This creates a new sound file taken from sample 10234 |
| 141 | and lasting 2.13 seconds. |
| 142 | </para> |
| 143 | <para> |
| 144 | Here is a complete example of the extractor utility. It uses the file <ulink url="examples/extractor.csd"><citetitle>extractor.csd</citetitle></ulink>. |
| 145 | <example> |
| 146 | <title>Example of the extractor utility.</title> |
| 147 | <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> |
| 148 | <xi:include href="examples-xml/extractor.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 149 | </example> |
| 150 | </para> |
| 151 | <note> |
| 152 | <title>NOTE</title> |
| 153 | <para> |
| 154 | This utility was added before we had waveform editors and DAWs. |
| 155 | </para> |
| 156 | </note> |
| 157 | </refsect1> |
| 158 | |
| 159 | <refsect1> |
| 160 | <title>Credits</title> |
| 161 | <para>Author: &namejohn;</para> |
| 162 | <para>1994</para> |
| 163 | </refsect1> |
| 164 | |
| 165 | </refentry> |