Fred Floberg
Tue, 03 Jul 2001 09:44:43 -0700
Since Dave asked about panning separate channels in an orc,
I went looking through and old orc/sco pair which does panning,
to give an example. It was then that I remembered that this
orc/sco outputs audio with one of the channels offset above
zero. Looking at a WAV file generated by the orc/sco with
an audio file editor you can see one of the channels "floating"
above the zero crossing line. The orc/sco is a complete piece
of music and is pretty complex (for me, anyway), and it has
annoying clicks in the output which I've never been able
to isolate and get rid of. It occured to me just now that
these clicks might be the result of clipping due to the DC offset
of that channel, although I can't prove that.
I thought I'd ask here for help in finding the reason for the
offset, and hence possibly the source of the clicks. However,
the orc/sco is pretty large (over 60k total). Does anyone mind
if I post such a large file to this list?
In the mean time, what I can do is to post the global fader,
global reverb, and global echo section of the orc for your
inspection, because these are the only instruments which would
effect an entire channel. Let me know if you see anything that
I'm doing wrong.
Thanks,
Fred
instr 4 ; Master Fader
; This instrument runs throughout the performance. It provides fade-in and
; fade-out by means of an envelope created with linseg. The fade-in moves
; from a factor of 0 to 1 over a period determined by ifit in seconds.
; The factor is held at 1 for iht seconds (which equates to the perf time
; minus the fade-in and the fade-out times.
; The fade-out factor moves from 1 to 0 over a period of ifot seconds
ifit = 4; fade-in in seconds
ifot = 8; fade-out in seconds
iht = p3 - (ifit+ifot); performance - fade-in and fade-out times
gavol linseg 0, ifit, 1, iht, 1, ifot, 0
endin
instr 99 ; Global Reverb
; Reverb timers (play with these values to get different effects)
irtl1 = 0.75/4
irtr1 = 0.75/4
irtl2 = 0.75
irtr2 = 0.75
; Loop timers for comb reverb (play with these too)
ilptl = 0.05
ilptr = 0.15
; Initialize global buffers on startup
garl init 0
garr init 0
asigl reverb garl, irtl1 ; First reverb for Left channel
asigr reverb garr, irtr1 ; Ditto for Right channel
asigl comb asigl+garl, irtl2, ilptl ; Second reverb mixed from
; first reverb and dry
; signal. Left
asigr comb asigr+garr, irtr2, ilptr ; and Right channels
outs asigl*gavol, asigr*gavol ; Output mixed signals, faded in and out
; using Master Fader from above
garl = 0 ; Clear out global reverb buffers
garr = 0
endin
instr 98 ; Global Echo
ideltimer = .00085
ideltimel = .000053
gadl init 0
gadr init 0
asigl delay gadl, ideltimel
asigr delay gadr, ideltimer
asigl delay gadl+asigl, ideltimel*2
asigr delay gadr+asigr, ideltimer*2
outs asigl*gavol, asigr*gavol
gadl = 0
gadr = 0
endin