| Hello,
I have an instrument which worked fine in version 3.47 but has problems
in 3.48 and later versions.
The instrument is a vocoder using a bank of "butterbp" filters to analyze
a sampled soundfile. I use "rms" to get the power of each band and use
this to scale the amplitudes of a bank of sine tone oscillators. The input
soundfile is 46 seconds of a normal speaking voice.
The result is clean in 3.47, but in later versions I get crackles and
resonant distortion after the first 6-7 seconds of the output.
The distortion seems to appear in the output of the bandpass filters
before resynthesis. I tried using "reson" instead, but the same thing
happens. The output samples all well within range.
Chopping up the long input file into shorter segments ( <10 secs ) helps
a little, but the sound still breaks up at the end of each segment.
I tried this out on two different G3s, one of which has a ProTools card.
The same problem comes up with versions 3.48 and later. Version 3.47 gives
clean results.
For now, I've reinstalled the earlier version, but I'm hoping one of you can
give me some advice. I've attached the offending orc and score (too long to
post as part of this message). Any suggestions would be much appreciated!
Scott Lindroth Duke University Music Department
(919) 660-3307 (office) Box 90665
(919) 660-3301 (fax) Durham, NC 27708-0665
sr = 44100
kr = 4410
ksmps = 10
nchnls = 2
instr 1 ;separate even and odd harmonics
;Take an input signal and pass it through a bank of bandpass filters.
;Use the amplitude envelopes of these filters to scale the amplitudes
;of a bank of sinusoids.
;Place the odd harmonics in the left channel and the even harmonics
;in the right channel. Apply independent pan motions.
icpsin = cpspch(p4) ;input anlaysis fundamental freq.
ibndbeg = p5 ;starting bandwidth of bandpass filter
ibndend = p6 ;destination bandwidth of bandpass filter
icpsout = cpspch(p7) ;output fundamental frequency
ivibfreq = p8
ivibdpth = p9
idel = p10 ;delay multiplier for harmonics
ipanleft = p11 ;pan frequency for odd harmonics
ipanright = p12 ;pan frequency for even harmonics
iamp = p13
iskip = p14
iglissoffset = cpspch( p4 + p15)
iglisstime = p16
;--------overall envelope
kenv linen iamp, .5, p3, .5
;--------input signals
ainput diskin "mor2Str.aiff", 1, iskip
;---------bandwidth changes
kbnd linseg ibndbeg, p3 * .7, ibndend
;---------vibrato on cf
kvibcf oscili 200, 1.4, 1
kcpsin linseg icpsin, p3*.2, icpsin, p3*iglisstime, iglissoffset
;---------band pass filter bank
a1 butterbp ainput, kcpsin + kvibcf, kbnd
a2 butterbp ainput, kcpsin*2+kvibcf, kbnd
a3 butterbp ainput, kcpsin*3+kvibcf, kbnd
a4 butterbp ainput, kcpsin*4+kvibcf, kbnd
a5 butterbp ainput, kcpsin*5+kvibcf, kbnd
a6 butterbp ainput, kcpsin*6+kvibcf, kbnd
a7 butterbp ainput, kcpsin*7+kvibcf, kbnd
a8 butterbp ainput, kcpsin*8+kvibcf, kbnd
a9 butterbp ainput, kcpsin*9+kvibcf, kbnd
a10 butterbp ainput, kcpsin*10+kvibcf, kbnd
a11 butterbp ainput, kcpsin*11+kvibcf, kbnd
a12 butterbp ainput, kcpsin*12+kvibcf, kbnd
a13 butterbp ainput, kcpsin*13+kvibcf, kbnd
a14 butterbp ainput, kcpsin*14+kvibcf, kbnd
a15 butterbp ainput, kcpsin*15+kvibcf, kbnd
a16 butterbp ainput, kcpsin*16+kvibcf, kbnd
;---------get RMS power of each band
krms1 rms a1, 5
krms2 rms a2, 5
krms3 rms a3, 5
krms4 rms a4, 5
krms5 rms a5, 5
krms6 rms a6, 5
krms7 rms a7, 5
krms8 rms a8, 5
krms9 rms a9, 5
krms10 rms a10, 5
krms11 rms a11, 5
krms12 rms a12, 5
krms13 rms a13, 5
krms14 rms a14, 5
krms15 rms a15, 5
krms16 rms a16, 5
;---------apply gliss to the carrier
kglis1 linseg icpsout, p3*.2, icpsout, p3*iglisstime, iglissoffset
;---------apply vibrato to carrier
kvib1 oscil ivibdpth, ivibfreq, 1 ;f1 = sine vibrato
kcpsout = kglis1 + kvib1
;kcpsout = icpsout + kvib1
acar1 oscili krms1, kcpsout, 1
acar2 oscili krms2, kcpsout*2, 1
acar3 oscili krms3, kcpsout*3, 1
acar4 oscili krms4, kcpsout*4, 1
acar5 oscili krms5, kcpsout*5, 1
acar6 oscili krms6, kcpsout*6, 1
acar7 oscili krms7, kcpsout*7, 1
acar8 oscili krms8, kcpsout*8, 1
acar9 oscili krms9, kcpsout*9, 1
acar10 oscili krms10, kcpsout*10, 1
acar11 oscili krms11, kcpsout*11, 1
acar12 oscili krms12, kcpsout*12, 1
acar13 oscili krms13, kcpsout*13, 1
acar14 oscili krms14, kcpsout*14, 1
acar15 oscili krms15, kcpsout*15, 1
acar16 oscili krms16, kcpsout*16, 1
if (idel == 0) goto output
acar2 delay acar2, idel
acar3 delay acar3, idel*2
acar4 delay acar4, idel*3
acar5 delay acar5, idel*4
acar6 delay acar6, idel*5
acar7 delay acar7, idel*6
acar8 delay acar8, idel*7
acar9 delay acar9, idel*8
acar10 delay acar10, idel*9
acar11 delay acar11, idel*10
acar12 delay acar12, idel*11
acar13 delay acar13, idel*12
acar14 delay acar14, idel*13
acar15 delay acar15, idel*14
acar16 delay acar16, idel*15
output:
;---------assemble output
kpan1 oscil 1, ipanleft, 2
kpan2 oscil 1, ipanright, 2
;bp audio signals
;aleft1 = a1+a3+a5+a7+a9+a11+a13+a15
;aright1 = a2+a4+a6+a8+a10+a12+a14+a16
;sine tone carriers with either delayed or synchronized harmonics
aleft1 = acar1+acar3+acar5+acar7+acar9+acar11+acar13+acar15
aright1 = acar2+acar4+acar6+acar8+acar10+acar12+acar14+acar16
aleft butterlp aleft1, sr * 0.5
aright butterlp aright1, sr * 0.5
;odd harmonics start left and move right
;even harmonics start right and move left
outs1 (aleft * kenv * kpan1) + (aright * kenv * (1-kpan2))
outs2 (aright * kenv * kpan2) + (aleft * kenv * (1-kpan1))
endin
;vocoderRMS.sco
f1 0 8192 10 1 ;sine function
f2 0 8192 -19 1 .5 0 .5 ;sine pan function
;in str dur pchIn bndBeg bndEnd pchOut vibFrq vibDpt harmDel PanL PanR Amp Skip
;GlissOffset Glisstime
i1 0 48 7.10 1 1 7.10 3 3 .00 .7 .7 15 0 0 1
i1 . . 8.00 . . 8.00 4 . . . . . . . .
i1 . . 8.03 . . 8.03 5 . . . . . . . .
i1 . . 8.05 . . 8.05 3 . . . . . . . .
i1 . . 8.07 . . 8.07 4 . . . . . . . .
i1 . . 8.08 . . 8.08 5 . . . . . . . .
i1 . . 8.10 . . 8.10 3 . . . . . . . .
i1 . . 9.02 . . 9.02 4 . . . . . . . .
e |