| >I however wanted to create "from scratch" those things (i.e.
>pitch and freq shift algs...)
Here is a crude harmonizer made way back when I was using Csound Ver. 1.0
to "tune" sampled soundfiles. It is tedious to work with and you
have to trim out the silences the delay line puts in, but it was all
I had at the time and it got the job done.
(Supply your own soundfiles!)
-Tom
;;;;;;;;;;;;;;; hrmnzr.orc
sr = 48000
kr = 24000
ksmps = 2
nchnls = 1
instr 1 ;sample pitch shifter
idur = p3
ifilno = p4
a1 soundin ifilno
k2 line p5,p3,p6
k3 linen p7,0,p3,.02
a2 delayr 1
a3 deltapi k2
delayw a1
out a3*k3
endin
instr 2 ;sine ref freq
i1 = cpspch(p5)
i2 = ampdb(p4)
k1 linen i2,.04,p3,.02
a1 oscil k1,i1,1
out a1
endin
instr 3 ;playback
idur = p3
ifilno = p4
a1 soundin ifilno
k3 linen p5,0,p3,.02
out a1*k3
endin
;;;;;;;;;;;;;;;;;;; hrmnzr.sco
f1 0 1024 10 1
;tuning: t1 > t2 sharps pitch
;tuning: t1 < t2 flats pitch
sf# t1 t1 amp
i1 0 11.78 17 .9 .2 1
i2 0 4 72 7.02 ;reference tone
e |