| 1 | |
| 2 | <refentry id="ATSread"> |
| 3 | <indexterm id="IndexATSread"><primary>ATSread</primary></indexterm> |
| 4 | <refentryinfo><title>Spectral Processing:ATS</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>ATSread</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>ATSread</refname> |
| 11 | <refpurpose> reads data from an ATS file. |
| 12 | </refpurpose> |
| 13 | </refnamediv> |
| 14 | <refsect1> |
| 15 | <title>Description</title> |
| 16 | <para> |
| 17 | <emphasis>ATSread</emphasis> returns the amplitude (<emphasis>kamp</emphasis>) and frequency (<emphasis>kfreq</emphasis>) information of a user specified partial contained in the ATS analysis file at the time indicated by the time pointer <emphasis>ktimepnt</emphasis>. |
| 18 | </para> |
| 19 | </refsect1> |
| 20 | <refsect1> |
| 21 | <title>Syntax</title> |
| 22 | <synopsis>kfreq, kamp <command>ATSread</command> ktimepnt, iatsfile, ipartial</synopsis> |
| 23 | </refsect1> |
| 24 | <refsect1> |
| 25 | <title>Initialization</title> |
| 26 | <para> |
| 27 | <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>. |
| 28 | </para> |
| 29 | <para> |
| 30 | <emphasis>ipartial</emphasis> – the number of the analysis partial to return the frequency in Hz and amplitude. |
| 31 | </para> |
| 32 | </refsect1> |
| 33 | <refsect1> |
| 34 | <title>Performance</title> |
| 35 | <para> |
| 36 | <emphasis>kfreq, kamp</emphasis> - outputs of the <emphasis>ATSread</emphasis> unit. These values represent the frequency and amplitude of a specific partial selected by the user using <emphasis>ipartial</emphasis>. The partials' informations are derived from an ATS analysis. <emphasis>ATSread</emphasis> linearly interpolates the frequency and amplitude between frames in the ATS analysis file at k-rate. The output is dependent on the data in the analysis file and the pointer <emphasis>ktimepnt</emphasis>. |
| 37 | </para> |
| 38 | <para><emphasis>ktimepnt</emphasis> – The time pointer in seconds used to index the ATS file. Used for <emphasis>ATSread</emphasis> exactly the same as for <link linkend="pvoc"><citetitle>pvoc</citetitle></link> and <link linkend="ATSadd"><citetitle>ATSadd</citetitle></link>.</para> |
| 39 | </refsect1> |
| 40 | |
| 41 | <refsect1> |
| 42 | <title>Examples</title> |
| 43 | <para> |
| 44 | Here is an example of the ATSread opcode. It uses the file <ulink url="examples/ATSread.csd"><citetitle>ATSread.csd</citetitle></ulink>. |
| 45 | <example> |
| 46 | <title>Example of the ATSread opcode.</title> |
| 47 | <xi:include href="examples-xml/ATSread.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 48 | </example> |
| 49 | </para> |
| 50 | <para>Here we are using <emphasis>ATSread</emphasis> to get the |
| 51 | 10th partial's frequency and amplitude data out of the |
| 52 | 'beats.ats' ATS analysis file. We are using that data to drive an oscillator, but we could use it for anything else that can take a k-rate input, like the bandwidth and resonance of a filter etc. |
| 53 | </para> |
| 54 | <para> |
| 55 | Here is a musical example of the ATSread opcode. It uses the file <ulink url="examples/ATSread-musical.csd"><citetitle>ATSread-musical.csd</citetitle></ulink>. |
| 56 | <example> |
| 57 | <title>Example 2 of the ATSread opcode.</title> |
| 58 | <xi:include href="examples-xml/ATSread-musical.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 59 | </example> |
| 60 | </para> |
| 61 | </refsect1> |
| 62 | |
| 63 | <refsect1> |
| 64 | <title>See also</title> |
| 65 | <para><link linkend="SpectralATS"><citetitle>ATS Spectral Processing</citetitle></link></para> |
| 66 | </refsect1> |
| 67 | |
| 68 | <refsect1> |
| 69 | <title>Credits</title> |
| 70 | <para> |
| 71 | <simplelist> |
| 72 | <member>Author: Alex Norman</member> |
| 73 | <member>Seattle,Washington</member> |
| 74 | <member>2004</member> |
| 75 | </simplelist> |
| 76 | </para> |
| 77 | </refsect1> |
| 78 | </refentry> |