Csound Csound-dev Csound-tekno Search About

Re: Mono files in Stereo

Date1998-12-17 04:12
FromHans Mikelson
SubjectRe: Mono files in Stereo
Wayne Freno wrote:
>How do I go about using soundin to input mono aif files
>and pan them in stereo

isndin =      p4            ; Soundfile number
irate  =      p5            ; Soundfile read rate

kpan   linseg 1, p3, 0      ; Pans left to right over duration of input
ain    diskin isndin, irate ; Read soundfile
       outs   ain*sqrt(kpan), ain*sqrt(1-kpan) ; Approx. equal power panning

Bye,
Hans Mikelson