<info>
i is ex3-1
ECMC Csound Tutorial example ex3-1
</info>
<tk_interface>
</tk_interface>
<mono>
;  #############################################################
;  soundfile ex3-1  :                    Csound Tutorial
;  #############################################################
; Audio-Rate Amplitude Modulation Instrument :
;p3 Duration   p4 Pitch   p5 Amplitude  p6 Attack time  p7 Decay time
; p8 ratio of modulating freq. to p4
;p9 1st  amplitude modulation %
;p10 2nd  amplitude modulation %
;p11 Function number controlling change in a. m. %
;p12 Function number for modulating oscillator


instr 1
i1 = cpspch(p4)
k1 linen p5,p6,p3,p7            ; amplitude envelope
k2 oscili p10 - p9,1/p3,p11  ; difference between 1st & 2nd a. m. %
k2 = k1 * (k2 + p9)              ; % of signal to be amp. modulated
knomod = k1 - k2                 ; % of signal NOT amp. modulated
ampmod oscili k2,i1 * p8,p12        ; modulating oscillator
a1 oscili ampmod + knomod, i1 ,10   ; carrier oscillator
	out a1
endin

</mono>
<stereo>
</stereo>
<score>

                  SCORE-11, Version 1.4
Copyright (C) 1982, 1990, 1992, 1995 by Alexander R. Brinkman
     Eastman School of Music, University of Rochester

f1 0 1024 10 1.
f2 0 1024 10 0 1. .3 0 .15
f10 0 65 7 0 32 1. 32 0
f11 0 65 7 0 64 1
  i1 0.000 3.000 8.00 10000 0.200 0.500 1.000 0.900 0.100 10 1
  i1 3.000 3.000 8.00 10000 0.200 0.500 1.400 0.200 0.900 11 2
e
</score>
