Csound Csound-dev Csound-tekno Search About

Comb Reverb (newbie question)

Date1998-04-08 05:35
FromWayne Freno
SubjectComb Reverb (newbie question)
Hello list (and the people on it :-)

I'm a newbie so please forgive the following question,
which I'm quite sure probably has a simple solution.  It 
has to do with scaling amplitudes.

When I turn on comb reverb, the first two seconds of it
are always out of range, even if there are no other signals
present. After the reverb is on and then I turn the notes on, 
everything is in range.  Thank you for any help.  (If other 
newbies want to email me privately, perhaps we can help each 
other out and not bother the big wigs around here ;-)

; BEGIN ORCHESTRA

sr = 44100
kr = 4410
ksmps = 10
nchnls = 2

ga1  init 0                            

instr     1                            
    iscale = .5
    ipan = p4

    k2      linseg  1, 2, 10, 2, 20, 2, 30, 2, 40
    k1      linseg  1000, 2, 800, 2, 600, 2, 400, 2, 200
    asig1   foscil  15000*iscale, k1, 2, k2, 2, 1
    asig2   foscil  15000*iscale, k1, 2, k2, 2, 1
    asig3 = asig1 + asig2
    outs asig3 * ipan, asig3 * (1 - ipan)
      
    ga1 = ga1 + (asig3 * .2)            ; reverb gain
endin


instr     99                           
      a3   comb      ga1, 2.5, .1      
           outs a3, a3
      ga1 = 0
endin

; BEGIN SCORE
f1 0 4096 10 1

;instr strt dur pan

i1      0    2      0         ; play 2 notes w/o reverb
i1      3    2      1

i99     5    10               ; turn on reverb

i1      5    2      1         ; play 4 notes w/ reverb
i1      7    2     .7
i1      9    2     .3
i1      11   2      0
e



end soundbite