1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
<HTML>
<TITLE>GEN01</TITLE>
<CENTER><P><A NAME="GEN01"></A>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="./GENS.html">Top of this section</A></B> - <A HREF="./GENS.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen02.html">Next</A>
<HR></P></CENTER>
<H2>GEN01</H2>
<PRE><TT> <B>f</B> # time size 1 filcod skiptime format channel</TT>
</PRE>
<P>
<HR></P>
<H4><U>DESCRIPTION</U></H4>
<P>This subroutine transfers data from a soundfile into a function table.
</P>
<H4><U>INIALIZATION</U></H4>
<P><I>size</I> - number of points in the table. Ordinarily a power of 2
or a power-of-2 plus 1 (see f statement); the maximum tablesize is 16777216
(2**24) points. If the source soundfile is of type AIFF, allocation of
table memory can be <I>deferred</I> by setting this parameter to 0; the
size allocated is then the number of points in the file (probably not a
power-of-2), and the table is not usable by normal oscillators, but it
is usable by a <B><A HREF="./../Generate/loscil.html">loscil</A></B> unit.
An AIFF source can also be mono or stereo. </P>
<P><I>filcod</I> - integer or character-string denoting the source soundfile
name. An integer denotes the file <B>soundin</B>.<I>filcod</I> ; a character-string
(in double quotes, spaces permitted) gives the filename itself, optionally
a full pathname. If not a full path, the file is sought first in the current
directory, then in that given by the environment variable SSDIR (if defined)
then by SFDIR. <A HREF="./../In+Out/in.html">See also soundin</A>. </P>
<P><I>skiptime</I> - begin reading at <I>skiptime</I> seconds into the
file. </P>
<P><I>channel</I> - channel number to read in. 0 denotes read all channels.
</P>
<P><I>format</I> - specifies the audio data-file format:</P>
<PRE><TT> 1 - 8-bit signed character 4 - 16-bit short integers
2 - 8-bit A-law bytes 5 - 32-bit long integers
3 - 8-bit U-law bytes 6 - 32-bit floats</TT>
</PRE>
<P>If <I>format</I> = 0 the sample format is taken from the soundfile header,
or by default from the <B><A HREF="./../Command/CSCOMM.html">csound
-o</A></B> command flag. </P>
<P><B>Note:</B> </P>
<P>Reading stops at end-of-file or when the table is full. Table locations
not filled will contain zeros. </P>
<P>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. </P>
<H4><B><U>EXAMPLES:</U></B></H4>
<PRE><TT> f 1 0 8192 1 23 0 4
f 2 0 0 -1 "trumpet A#5" 0 4 </TT>
</PRE>
<P>The tables are filled from 2 files, "soundin.23" and "trumpet
A#5", expected in <A HREF="./../Syntax/dir.html">SSDIR</A>
or <A HREF="./../Syntax/dir.html">SFDIR</A>. The first
table is pre-allocated; the second is allocated dynamically, and its rescaling
is inhibited. </P>
<CENTER><P>
<HR><B><A HREF="../REFER.html">QUICK-REF</A></B> - <B><A HREF="../TITLE.html"><FONT SIZE=+1>C</FONT>soundManual</A></B>
- <B><A HREF="./GENS.html">Top of this section</A></B> - <A HREF="./GENS.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./gen02.html">Next</A>
<HR></P></CENTER>
<P><CENTER>
<B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>©
Jean Piché & Peter J. Nix, 1994-97</FONT></FONT></I></B>
</CENTER>
</HTML>
|