~ubuntu-branches/ubuntu/trusty/csound-manual/trusty-proposed

« back to all changes in this revision

Viewing changes to scoregens/gen49.xml

  • Committer: Bazaar Package Importer
  • Author(s): Felipe Sateler
  • Date: 2011-08-01 22:21:58 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110801222158-90kslkp5ujci2f5d
Tags: 1:5.13~dfsg-1
* New upstream release
 - Add Menno Knevel to the copyright file
 - Refresh patch 2000-stripped-opcodes.diff
 - Update copyright hints file
* Update Vcs-* headers
* Bump Standards-Version

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
 
 
2
<refentry id="GEN49">
 
3
      <indexterm id="IndexGEN49"><primary>GEN49</primary></indexterm>
 
4
  <refmeta>
 
5
    <refentrytitle>GEN49</refentrytitle>
 
6
  </refmeta>
 
7
 
 
8
  <refnamediv>
 
9
    <refname>GEN49</refname>
 
10
    <refpurpose>
 
11
      Transfers data from an MP3 soundfile into a function table.
 
12
    </refpurpose>
 
13
  </refnamediv>
 
14
 
 
15
  <refsect1>
 
16
    <title>Description</title>
 
17
    <para>
 
18
      This subroutine transfers data from an MP3 soundfile into a function table.
 
19
    </para>
 
20
  </refsect1>
 
21
 
 
22
  <refsect1>
 
23
    <title>Syntax</title>
 
24
    <synopsis><command>f</command>#  time  size  49  filcod  skiptime  format</synopsis>
 
25
  </refsect1>
 
26
 
 
27
  <refsect1>
 
28
    <title>Performance</title>
 
29
    <para>
 
30
      <emphasis>size</emphasis> -- number of points in the
 
31
      table. Ordinarily a power of 2 or a power-of-2 plus 1
 
32
      (see <link linkend="f"><citetitle>f
 
33
      statement</citetitle></link>); the maximum tablesize is 16777216
 
34
      (2<superscript>24</superscript>) points. The allocation of table
 
35
      memory can be <emphasis>deferred</emphasis> by setting this
 
36
      parameter to 0; the size allocated is then the number of points
 
37
      in the file (probably not a power-of-2), and the table is not
 
38
      usable by normal oscillators, but it is usable by
 
39
      a <link linkend="loscil"><citetitle>loscil</citetitle></link>
 
40
      unit. The soundfile can also be mono or stereo. 
 
41
    </para>
 
42
 
 
43
    <para>
 
44
      <emphasis>filcod</emphasis> -- integer or character-string
 
45
      denoting the source soundfile name. An integer denotes the
 
46
      file <emphasis>soundin</emphasis>.<emphasis>filcod</emphasis> ;
 
47
      a character-string (in double quotes, spaces permitted) gives
 
48
      the filename itself, optionally a full pathname. If not a full
 
49
      path, the file is sought first in the current directory, then in
 
50
      that given by the environment variable <link linkend="CommandEnvironment"><citetitle>SSDIR</citetitle></link> (if defined) then
 
51
      by <link linkend="CommandEnvironment"><citetitle>SFDIR</citetitle></link>. See
 
52
      also <link linkend="soundin"><citetitle>soundin</citetitle></link>.
 
53
    </para>
 
54
 
 
55
    <para>
 
56
      <emphasis>skiptime</emphasis> -- begin reading at <emphasis>skiptime</emphasis> seconds into the file.
 
57
    </para>
 
58
 
 
59
    <para>
 
60
      <emphasis>format</emphasis> -- specifies the audio data-file format required:
 
61
        <literallayout>
 
62
1 - Mono file                 3 - First channel (left)
 
63
2 - Stereo file               4 - Second channel (right)
 
64
        </literallayout>
 
65
    </para>
 
66
 
 
67
    <para>
 
68
      If <emphasis>format</emphasis> = 0 the sample format is taken from the soundfile header.
 
69
    </para>
 
70
 
 
71
    <note>
 
72
      <title>Note</title>
 
73
      <para>
 
74
        <itemizedlist>
 
75
          <listitem>
 
76
            <para>
 
77
              Reading stops at end-of-file or when the table is full. Table locations not filled will contain zeros.
 
78
            </para>
 
79
          </listitem>
 
80
 
 
81
          <listitem>
 
82
            <para>
 
83
              If p4 is positive, the table will be post-normalized (rescaled to a maximum absolute value of 1 after generation). A negative p4 will cause rescaling to be skipped.
 
84
            </para>
 
85
          </listitem>
 
86
        </itemizedlist>
 
87
      </para>
 
88
    </note>
 
89
  </refsect1>
 
90
 
 
91
  <refsect1>
 
92
    <title>Examples</title>
 
93
    <para>
 
94
            Here is a simple example of the GEN49 routine. It uses the files <ulink url="examples/gen49.csd"><citetitle>gen49.csd</citetitle></ulink>, and <ulink url="examples/beats.mp3"><citetitle>beats.mp3</citetitle></ulink>. It uses the MP3 file <quote>beats.mp3</quote>.
 
95
 
 
96
      <example>
 
97
        <title>A simple example of the GEN49 routine.</title>
 
98
 
 
99
        <xi:include href="examples-xml/gen49.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
100
 
 
101
      </example>
 
102
    </para>
 
103
 
 
104
  </refsect1>
 
105
 
 
106
  <refsect1>
 
107
    <title>Credits</title>
 
108
    <para>Written by &namejohn;</para>
 
109
    <para>February 2009.</para>
 
110
  </refsect1>
 
111
</refentry>