stereo global comb

i'm trying to make an instrument with a stereo wav file played by loscil sent to a global comb filter. i cant figure out the syntax (as described by pete moss) gamix = gamix + a1

as i'm using a stereo file, i have to use the input argument a1 a2, and output a1, a2.... gamix doesn't seem to understand any configuration i've tried, nor does it understand if i only send one channel (gamix = gamix + a1)........ anybody know how i can handle this? is there a rule of thumb or a good reference for using stereo sources in csound? i noticed it isn't usually addressed in the examples i find online.

re: stereo global comb

gamix is a variable just like a1 and a2, only it is global and can be accessed by all instruments in the orchestra. One variable can't hold a stereo signal. So it would have to be something like:

gamix1 = gamix1 + a1
gamix2 = gamix2 + a2

Also, make sure to clear the variables at the end of the processing chain:

gamix1 = 0
gamix2 = 0

Otherwise, they'll just keep adding up instead of working with the next sample exclusively.

If this doesn't help, go ahead and post a .csd with the relevant instruments, and we can get a better idea of what the problem is.