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
|
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="GENERATOR" CONTENT="Mozilla/4.04 [en] (X11; I; IRIX 6.3 IP32) [Netscape]">
<TITLE>PLAY_ONE_NOTE</TITLE>
</HEAD>
<BODY>
<CENTER><A NAME="Play_One_Note"></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="TUTORIALS.html">Top of this section</A></B> - <A HREF="tootint.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="pftut.html">Next</A>
<HR></CENTER>
<H1>
Toot 1: Play One Note</H1>
For this and all instrument examples , there exist <B>orchestra</B> and
<B>score</B> files in the <B>Csound</B> subdirectory <B><A HREF="#Tutorial_Materials">tutorfiles</A></B>
that the user can run to soundtest each feature introduced. The instrument
code shown below is actually preceded by an <I><A HREF="../Syntax/orches.html">orchestra
header section </A></I>similar to that shown above. If you are running
on a RISC computer, each example will likely run in realtime. During playback
(realtime or otherwise) the audio rate may automatically be modified to
suit the local d-a converters.
<P>The first orchestra file, called <I><A HREF="#Tutorial_Materials">toot1.orc,</A></I>
contains a single instrument which uses an <B><A HREF="../Generate/oscil.html">oscil</A></B>
unit to play a 440Hz sine wave (defined by f1 in the score) at an amplitude
of 10000.
<PRE><TT> instr 1
a1 oscil 10000, 440, 1
out a1
endin</TT></PRE>
Run this with its corresponding score file, <I>toot1.sco</I> :
<PRE><TT> f1 0 4096 10 1 ; use "gen1" to compute a sine wave
i1 0 4 ; run "instr 1" from time 0
; for 4 seconds
e ; indicate the "end" of the score</TT></PRE>
<PRE><TT></TT></PRE>
<CENTER>
<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="TUTORIALS.html">Top of this section</A></B> - <A HREF="tootint.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="pftut.html">Next</A>
<HR></CENTER>
<CENTER><B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>©
Jean Piché & Peter J. Nix, 1994-97</FONT></FONT></I></B></CENTER>
</BODY>
</HTML>
|