Csound Csound-dev Csound-tekno Search About

Re: global stereo balancing

Date1998-03-29 19:18
FromMike Berry
SubjectRe: global stereo balancing
tolve wrote:
> 
> if that really is the case, could someone please suggest best way to create
> a single ibalance variable that would control balance of wet to dry -global
> crossfade? (also recalling that there are mathematically different types of
> crossfades).
> 
Try the following

garvbsig  init  0
gwetdry   init  0

instr 1
gwetdry   = p4
endin

instr9
idur      = p3
iamp      = p4
iskiptime = p5
iattack   = p6
irelease  = p7
ibalance  = p8
irvbgain  = p9
kamp    linen      iamp, iattack, idur, irelease
asig    soundin    "soundin.aiff", iskiptime
arampsig  =  kamp * asig
     outs    arampsig * ibalance * gwetdry, arampsig * (1 - ibalance) * gwetdry
garvbsig  =  garvbsig + arampsig * irvbgain
endin

instr99    ; global reverb
irvbtime = p4
asig   reverb  garvbsig, irvbtime
    outs  asig * (1 - gwetdry), asig * (1 - gwetdry)
garvbsig  =  0
endin

	In the score, start a new i-card each time you want to change the wet/dry mix.

i1 0 100 0.5   ;half wet, half dry
i1 100 100 0.0 ;all wet
i1 200 100 1.0 ;all dry

	There is no need with a control of this type to worry about sqr or sine
curves for proper balance, since unlike ibalance, it does not control a stereo position.

-- 
Mike Berry
mikeb@nmol.com
http://www.nmol.com/users/mikeb