| 1 | |
| 2 | <refentry id="mp3in"> |
| 3 | <indexterm id="IndexMp3in"><primary>mp3in</primary></indexterm> |
| 4 | <refentryinfo><title>Signal I/O:Signal Input</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>mp3in</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>mp3in</refname> |
| 11 | <refpurpose> |
| 12 | Reads mono or stereo audio data from an external MP3 file. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | |
| 16 | <refsect1> |
| 17 | <title>Description</title> |
| 18 | <para> |
| 19 | Reads mono or stereo audio data from an external MP3 file. |
| 20 | </para> |
| 21 | </refsect1> |
| 22 | |
| 23 | <refsect1> |
| 24 | <title>Syntax</title> |
| 25 | <synopsis>ar1, ar2 <command>mp3in</command> ifilcod[, iskptim, iformat, iskipinit, ibufsize]</synopsis> |
| 26 | <synopsis>ar1 <command>mp3in</command> ifilcod[, iskptim, iformat, iskipinit, ibufsize]</synopsis> |
| 27 | </refsect1> |
| 28 | |
| 29 | <refsect1> |
| 30 | <title>Initialization</title> |
| 31 | <para> |
| 32 | <emphasis>ifilcod</emphasis> -- integer or character-string |
| 33 | denoting the source soundfile name. An integer denotes the file |
| 34 | soundin.filcod ; a character-string (in double quotes, spaces |
| 35 | permitted) gives the filename itself, optionally a full |
| 36 | pathname. If not a full path, the named file is sought first in |
| 37 | the current directory, then in that given by the environment |
| 38 | variable <link linkend="CommandEnvironment"><citetitle>SSDIR</citetitle></link> (if defined) then by <link linkend="CommandEnvironment"><citetitle>SFDIR</citetitle></link>. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>iskptim</emphasis> (optional) -- time in seconds of input sound to be skipped. The default value is 0. |
| 43 | </para> |
| 44 | |
| 45 | <para> |
| 46 | <emphasis>iformat</emphasis> (optional) -- specifies the audio |
| 47 | data file format: currently not implemented and always defaults |
| 48 | to stereo. |
| 49 | </para> |
| 50 | |
| 51 | <para> |
| 52 | <emphasis>iskipinit</emphasis> (optional) -- switches off all |
| 53 | initialisation if non zero (default =0). |
| 54 | </para> |
| 55 | |
| 56 | <para> |
| 57 | <emphasis>ibuffersize</emphasis> (optional) -- sets the internal buffer size |
| 58 | for reading. If the value is omitted, zero or negative it defaults to |
| 59 | 4096 bytes. |
| 60 | </para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>Performance</title> |
| 65 | <para> |
| 66 | Reads audio data from an external MP3 file. |
| 67 | </para> |
| 68 | </refsect1> |
| 69 | |
| 70 | <refsect1> |
| 71 | <title>Examples</title> |
| 72 | <para> |
| 73 | Here is an example of the mp3in opcode. It uses the file <ulink url="examples/mp3in.csd"><citetitle>mp3in.csd</citetitle></ulink>. |
| 74 | |
| 75 | <example> |
| 76 | <title>Example of the mp3in opcode.</title> |
| 77 | <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> |
| 78 | <xi:include href="examples-xml/mp3in.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 79 | </example> |
| 80 | </para> |
| 81 | </refsect1> |
| 82 | |
| 83 | <refsect1> |
| 84 | <title>See also</title> |
| 85 | <para><link linkend="SigioInput"><citetitle>Signal Input</citetitle></link></para> |
| 86 | </refsect1> |
| 87 | |
| 88 | <refsect1> |
| 89 | <title>Credits</title> |
| 90 | <para> |
| 91 | <simplelist> |
| 92 | <member>Author: &namejohn;</member> |
| 93 | <member>Codemist Ltd</member> |
| 94 | <member>2009</member> |
| 95 | </simplelist> |
| 96 | </para> |
| 97 | <para>New in version 5.11</para> |
| 98 | <para>Mono added in 6.05</para> |
| 99 | </refsect1> |
| 100 | </refentry> |