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
|
<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>MORE_ABOUT_THE_ORCHESTRA</TITLE>
</HEAD>
<BODY>
<CENTER><A NAME="More_about_the_Orchestra"></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="commtut.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="toots.html">Next</A>
<HR></CENTER>
<H4>
A Beginning Tutorial</H4>
<H2>
More about the Orchestra</H2>
Suppose we next wished to introduce a small vibrato, whose rate is 1/50
the frequency of the note (i.e. A440 is to have a vibrato rate of 8.8 Hz.).
To do this we will generate a control signal using a second oscillator,
then add this signal to the basic frequency derived from p5. This might
result in the instrument
<PRE><TT>instr 1
kamp <B>line </B> 0, p3, 10000
kvib <B>oscil </B> 2.75, cpspch(p5)/50, 1
a1 <B>oscil</B> kamp, cpspch(p5)+kvib, 1
<B>out</B> a1
endin</TT></PRE>
Here there are two control signals, one controlling the amplitude and the
other modifying the basic pitch of the audio oscillator. For small vibratos,
this instrument is quite practical; however it does contain a misconception
worth noting. This scheme has added a sine wave deviation to the cps value
of an audio oscillator. The value 2.75 determines the <I>width</I> of vibrato
in cps, and will cause an A440 to be modified about one-tenth of one semitone
in each direction (1/160 of the frequency in cps). In reality, a cps deviation
produces a different musical interval above than it does below. To see
this, consider an exaggerated deviation of 220 cps, which would extend
a perfect 5th above A440 but a whole octave below. To be more correct,
we should first convert p5 into a <I>true decimal octave</I> (not cps),
so that an <I>interval</I> deviation above is equivalent to that below.
In general, pitch modification is best done in true octave units rather
than pitch-class or cps units, and there exists a group of pitch converters
to make this task easier. The modified instrument would be
<PRE><TT> instr 1
ioct <B>=</B> octpch(p5)
kamp <B>line </B> 0, p3, 10000
kvib <B>oscil</B> 1/120, cpspch(p5)/50, 1
asig <B>oscil</B> kamp, cpsoct(ioct+kvib), 1
<B>out</B> asig
endin</TT></PRE>
This instrument is seen to use a third type of orchestra variable, an <I>i-</I>variable.
The variable <I>ioct</I> receives its value at an <I>initialization</I>
pass through the instrument, and does not change during the lifespan of
this note. There may be many such <I>init time</I> calculations in an instrument.
As each note in a score is encountered, the event space is allocated and
the instrument is initialized by a special pre-performance pass. <I>i-variables</I>
receive their values at this time, and any other expressions involving
just constants and <I>i-variables</I> are evaluated. At this time also,
modules such as <B><A HREF="../Generate/line.html">line</A></B> will set
up their target values (such as beginning and end points of the line),
and units such as <B><A HREF="../Generate/oscil.html">oscil</A></B> will
do phase setup and other bookkeeping in preparation for performance. A
full description of init-time and performance-time activities, however,
must be deferred to a <A HREF="../Syntax/SYNTAX.html">general consideration
of the orchestra syntax</A>.
<BR>
<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="commtut.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="toots.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>
|