File: note.html

package info (click to toggle)
csound-doc 3.47b2-2
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 1,492 kB
  • ctags: 272
  • sloc: makefile: 36
file content (54 lines) | stat: -rw-r--r-- 3,063 bytes parent folder | download | duplicates (3)
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>&nbsp;
<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>&nbsp; instr 1
&nbsp;&nbsp;&nbsp; a1&nbsp;&nbsp;&nbsp;&nbsp; oscil&nbsp;&nbsp;&nbsp;&nbsp; 10000, 440, 1
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; out&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; a1
&nbsp;&nbsp; endin</TT></PRE>
Run this with its corresponding score file, <I>toot1.sco</I> :
<PRE><TT>&nbsp; f1&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; 4096 10&nbsp;&nbsp; 1&nbsp;&nbsp;&nbsp; ; use "gen1" to compute a sine wave
&nbsp; i1&nbsp;&nbsp;&nbsp;&nbsp; 0&nbsp;&nbsp;&nbsp; 4&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; run "instr 1" from time 0&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; for 4 seconds
&nbsp; e&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ; 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>&nbsp;
<HR></CENTER>

<CENTER><B><I><FONT COLOR="#006600">HTML Csound Manual - <FONT SIZE=-1>&copy;
Jean Pich&eacute; &amp; Peter J. Nix, 1994-97</FONT></FONT></I></B></CENTER>

</BODY>
</HTML>