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
|
<HTML>
<TITLE>ORCHESTRA_HEADER_STATEMENTS</TITLE>
<CENTER><A NAME="ORCHESTRA_HEADER_STATEMENTS"></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="SYNTAX.html">Top of this section</A></B> - <A HREF="./assign.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./instr.html">Next</A>
<HR></CENTER>
<H2>
ORCHESTRA HEADER STATEMENTS</H2>
<PRE> <B>sr</B> = n1
<B>kr</B> = n2
<B>ksmps</B> = n3
<B>nchnls</B> = n4</PRE>
<HR>
<H4>
<U>DESCRIPTION</U></H4>
These statements are global value <I>assignments</I>, made at the beginning
of an orchestra, before any instrument block is defined. Their function
is to set certain <I>reserved symbol variables</I> that are required for
performance. Once set, these reserved symbols can be used in expressions
anywhere in the orchestra.
<P><B>sr</B> = (optional) - set sampling rate to <I>n1</I> samples per
second per channel. The default value is 10000.
<P><B>kr</B> = (optional) - set control rate to <I>n2</I> samples per second.
The default value is 1000.
<P><B>ksmps</B> = (optional) - set the number of samples in a Control Period
to <I>n3</I>. <B>This value must equal sr/kr</B>. The default value is
10.
<P>nchnls = (optional) - set number of channels of audio output to <I>n4</I>.
(1 = mono, 2 = stereo, 4 = quadraphonic.) The default value is 1 (mono).
<P>In addition, any <B><A HREF="./const.html">global variable</A></B>
can be initialized by an <I>init-time assignment</I> anywhere before the
first <B><A HREF="./instr.html">instr statement.</A></B>
<P>All of the above assignments are run as instrument 0 (i - pass only)
at the start of real performance.
<H4>
<U>EXAMPLE</U></H4>
<PRE> sr <B>=</B> 10000
kr = 500
ksmps = 20
gi1 <B>=</B> sr/2.
ga <B>init</B> 0
gitranspose <B>=</B> octpch(.0l)</PRE>
<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="SYNTAX.html">Top of this section</A></B> - <A HREF="./assign.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./instr.html">Next</A>
<HR></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>
|