<info>
i is ex6-3
ECMC Csound Tutorial example ex6-3
</info>
<tk_interface>
</tk_interface>
<mono>
;  ###########################################
;  orchestra file for examples ex6-3
;  amplitude compression/expansion with dam
;  ##########################################
    ; csound header
sr=44100
kr=2205
ksmps=20
nchnls=1

instr 1
asig  soundin  p4, p6    ; read in soundfile
; input amplitude scaling and optional fade-in and fade-out
	iamp = p5
	irise = (p7 = 0 ? .001 : p7)
	idecay = (p8 = 0 ? .001 : p8)
kamp expseg .005, irise, iamp, p3 - (irise + idecay), iamp, idecay, .005
asig = kamp * asig
 ; apply amplitude compression/expansion:
asig  dam  asig, p9, p10, p11, p12, p13
out asig
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

  i1 0.000 1.630 17 1.000 0 0 0 10000 1.000 1.000 0.100 0.100
  i1 3.000 1.630 17 0.005 0 0 0 10000 0.002 12.000 0.100 0.100
  i1 6.000 1.630 17 2.400 0 0 0 10000 1.500 0.200 0.100 0.100
  i1 9.000 4.000 16 2.400 0 0 0.300 8000 1.700 0.150 0.030 0.030
e
</score>
