| 1 | |
| 2 | <refentry id="ATSbufread"> |
| 3 | <indexterm id="IndexATSbufread"><primary>ATSbufread</primary></indexterm> |
| 4 | <refentryinfo><title>Spectral Processing:ATS</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>ATSbufread</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | <refnamediv> |
| 11 | <refname>ATSbufread</refname> |
| 12 | <refpurpose> reads data from and ATS data file and stores it in an internal data table of frequency, amplitude pairs. |
| 13 | </refpurpose> |
| 14 | </refnamediv> |
| 15 | <refsect1> |
| 16 | <title>Description</title> |
| 17 | <para> |
| 18 | <emphasis>ATSbufread</emphasis> reads data from and ATS data file and stores it in an internal data table of frequency, amplitude pairs. |
| 19 | </para> |
| 20 | </refsect1> |
| 21 | <refsect1> |
| 22 | <title>Syntax</title> |
| 23 | <synopsis><command>ATSbufread</command> ktimepnt, kfmod, iatsfile, ipartials[, ipartialoffset, \ |
| 24 | ipartialincr]</synopsis> |
| 25 | </refsect1> |
| 26 | <refsect1> |
| 27 | <title>Initialization</title> |
| 28 | <para> |
| 29 | <emphasis>iatsfile</emphasis> – the ATS number (n in ats.n) or the name in quotes of the analysis file made using <link linkend="UtilityAtsa"><citetitle>ATSA</citetitle></link>. |
| 30 | </para> |
| 31 | <para><emphasis>ipartials</emphasis> – number of partials that will be used in the resynthesis (the noise has a maximum of 25 bands) |
| 32 | </para> |
| 33 | <para><emphasis>ipartialoffset</emphasis> (optional) – is the first partial used (defaults to 0). |
| 34 | </para> |
| 35 | <para><emphasis>ipartialincr</emphasis> (optional) – sets an increment by which these synthesis opcodes counts up from <emphasis>ipartialoffset</emphasis> for ibins components in the re-synthesis (defaults to 1). |
| 36 | </para> |
| 37 | </refsect1> |
| 38 | <refsect1> |
| 39 | <title>Performance</title> |
| 40 | <para><emphasis>ktimepnt</emphasis> – The time pointer in seconds used to index the ATS file. Used for <emphasis>ATSbufread</emphasis> exactly the same as for <link linkend="pvoc"><citetitle>pvoc</citetitle></link>.</para> |
| 41 | <para> |
| 42 | <emphasis>kfmod</emphasis> – an input for performing pitch transposition or frequency modulation on all of the synthesized partials, if no fm or pitch change is desired then use a 1 for this value. |
| 43 | </para> |
| 44 | <para><emphasis>ATSbufread</emphasis> is based on pvbufread by |
| 45 | Richard Karpen. <link |
| 46 | linkend="ATScross"><citetitle>ATScross</citetitle></link>, |
| 47 | <link |
| 48 | linkend="ATSinterpread"><citetitle>ATSinterpread</citetitle></link> |
| 49 | and <link |
| 50 | linkend="ATSpartialtap"><citetitle>ATSpartialtap</citetitle></link> |
| 51 | are all dependent on <emphasis>ATSbufread</emphasis> just as |
| 52 | <link linkend="pvcross"><citetitle>pvcross</citetitle></link> |
| 53 | and <link |
| 54 | linkend="pvinterp"><citetitle>pvinterp</citetitle></link> are |
| 55 | on <link |
| 56 | linkend="pvbufread"><citetitle>pvbufread</citetitle></link>. <emphasis>ATSbufread</emphasis> |
| 57 | reads data from and ATS data file and stores it in an internal |
| 58 | data table of frequency, amplitude pairs. The data stored by |
| 59 | an <emphasis>ATSbufread</emphasis> can only be accessed by |
| 60 | other unit generators, and therefore, due to the architecture |
| 61 | of Csound, an <emphasis>ATSbufread</emphasis> must come |
| 62 | before (but not necessarily directly) any dependent unit |
| 63 | generator. Besides the fact that |
| 64 | <emphasis>ATSbufread</emphasis> does not output any data directly, it works almost exactly as <link linkend="ATSadd"><citetitle>ATSadd</citetitle></link>. The ugen uses a time pointer (<emphasis>ktimepnt</emphasis>) to index the data in time, <emphasis>ipartials</emphasis>, <emphasis>ipartialoffset</emphasis> and <emphasis>ipartialincr</emphasis> to select which partials to store in the table and <emphasis>kfmod</emphasis> to scale partials in frequency. |
| 65 | </para> |
| 66 | </refsect1> |
| 67 | |
| 68 | <refsect1> |
| 69 | <title>Examples</title> |
| 70 | <para> |
| 71 | Here is an example of the ATSbufread opcode. It uses the file <ulink url="examples/ATSbufread.csd"><citetitle>ATSbufread.csd</citetitle></ulink>. |
| 72 | |
| 73 | <example> |
| 74 | <title>Example of the ATSbufread opcode.</title> |
| 75 | |
| 76 | |
| 77 | |
| 78 | <xi:include href="examples-xml/ATSbufread.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 79 | </example> |
| 80 | </para> |
| 81 | <para>See also the examples for <link linkend="ATScross"><citetitle>ATScross</citetitle></link>, <link linkend="ATSinterpread"><citetitle>ATSinterpread</citetitle></link> and <link linkend="ATSpartialtap"><citetitle>ATSpartialtap</citetitle></link></para> |
| 82 | </refsect1> |
| 83 | |
| 84 | <refsect1> |
| 85 | <title>See also</title> |
| 86 | <para><link linkend="SpectralATS"><citetitle>ATS Spectral Processing</citetitle></link></para> |
| 87 | </refsect1> |
| 88 | |
| 89 | <refsect1> |
| 90 | <title>Credits</title> |
| 91 | <para> |
| 92 | <simplelist> |
| 93 | <member>Author: Alex Norman</member> |
| 94 | <member>Seattle,Washington</member> |
| 95 | <member>2004</member> |
| 96 | </simplelist> |
| 97 | </para> |
| 98 | </refsect1> |
| 99 | </refentry> |