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
|
<HTML>
<TITLE>VIBRATO</TITLE>
<CENTER><P><A NAME="Vibrato"></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="./chorus.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./genstut.html">Next</A>
<HR></P></CENTER>
<H2>Toot 5: Vibrato</H2>
<P>To add some delayed vibrato to our chorusing instrument we use another
oscillator for the vibrato and a line segment generator, <B><A HREF="./../Generate/line.html">linseg</A></B>,
as a means of controlling the delay. <B>linseg</B> is a <B>k</B>-rate or
<B>a</B>-rate signal generator which traces a series of straight line segments
between any number of specified points. The Csound manual describes it
as:</P>
<PRE><TT> kr linseg ia, idur1, ib[, idur2, ic[...]]
ar linseg ia, idur1, ib[, idur2, ic[...]]</TT>
</PRE>
<P>Since we intend to use this to slowly scale the amount of signal coming
from our vibrato oscillator, we'll choose the <B>k</B>-rate version. The
<B>i</B>-rate variables: <I>ia</I>, <I>ib</I>, i<I>c</I>, etc., are the
values for the points. The <B>i</B>-rate variables: <I>idur1</I>, <I>idur2</I>,
<I>idur3</I>, etc., set the duration, in seconds, between segments.</P>
<PRE><TT> instr 5 ; toot5.orc
irel = .01 ; set vibrato release time
idel1 = p3 - (p10 * p3) ; calculate initial delay (% of dur)
isus = p3 - (idel1- irel) ; calculate remaining duration
iamp = ampdb(p4)
iscale = iamp * .333 ; p4=amp
inote = cpspch(p5) ; p5=freq
k3 linseg 0, idel1, p9, isus, p9, irel, 0 ; p6=attack time
k2 oscil k3, p8, 1 ; p7=release time
k1 linen iscale, p6, p3, p7 ; p8=vib rate
a3 oscil k1, inote*.995+k2, 1 ; p9=vib depth
a2 oscil k1, inote*1.005+k2, 1 ; p10=vib delay (0-1)
a1 oscil k1, inote+k2, 1
out a1+a2+a3
endin
f 1 0 4096 10 1
; ins strt dur amp frq atk rel vibrt vibdpth vibdel
i5 0 3 86 10.00 .1 .7 7 6 .4
i5 4 3 86 10.02 1 .2 6 6 .4
i5 8 4 86 10.04 2 1 5 6 .4
e</TT>
</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="./TUTORIALS.html">Top of this section</A></B> - <A HREF="./chorus.html">Previous</A>
- <A HREF="../CONTENTS.html">Contents</A> - <A HREF="../INDEX.html">Index</A>
- <A HREF="./genstut.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>
|