Hi Andrea, On 5/22/06, andrea valle wrote: > where can it be downloaded? ... from your quoted text [0] ! Or in other words, this very email. Soon to be added to the repository at http://csounds.com/udo/ . An additional example [1] from the originally posted one [2] follows the quoted UDO text. -David [0] > > opcode GutoPitchTracker, kk, a > > > > /* > > Guto Caminhoto > > guto@sercomtel.com.br > > http://members.tripod.com/Guto001/index.html > > Guto 03/2000 > > -- UDOization by David Akbari - May 2006 > > */ > > > > ain xin > > ain dcblock ain ; adjust DC > > > > iocts = 8 > > iprd = 0.002 > > ifrqs = 24 > > iq = 32 > > ihann = 0 > > idbout = 3 > > idsprd = 0 > > idsines = 0 > > > > wsig spectrum ain, iprd, iocts, ifrqs , iq, ihann, idbout, idsprd, > > idsines > > krms rms ain, 20 ; find a monaural rms value > > kvar = 0.6 + krms/8000 ; & use to gate the pitch variance > > > > ilo = 7.0 > > ihi = 10.0 > > istrt = 8.0 > > idbthres = 10 > > inptls = 4 > > irolof = 0.75 > > iodd = 1 > > iconf = 12 > > intrp = 1 > > ifprd = 0 > > iwtflg = 0 > > > > koct, kamp specptrk wsig, kvar, ilo, ihi, istrt, idbthres, inptls, > > irolof, iodd, iconf, intrp, ifprd,iwtflg > > > > /* > > ; use extracted pitch and amplitude to control foscili > > kcps = cpsoct(koct) ; transpose > > kcar = 1 > > kmod = 1 > > kamp1 = kamp*120 ; scale amplitude > > kamp2 port kamp1, 0.001 ; declick > > kndx = kamp*0.12 ; changes kndx with amplitude > > ifn = 1 ; > > iphs = 0 > > > > afm1 foscili kamp2, kcps, kcar, kmod, kndx, ifn, iphs ; fm > > aind delay ain, 0.245 ; adjust to pitch tracker delay > > aenv linen 1, 0.01, p3, 0.246 > > > > aout1 = afm1*aenv > > aout2 = afm1*aenv > > > > outs aout1, aout2 > > */ > > > > xout koct, kamp > > > > endop [1] sr = 48000 kr = 4800 ksmps = 10 nchnls = 2 ;// opcode GutoPitchTracker, kk, a /* Guto Caminhoto guto@sercomtel.com.br http://members.tripod.com/Guto001/index.html Guto 03/2000 -- UDOization by David Akbari - May 2006 */ ain xin ain dcblock ain ; adjust DC iocts = 8 iprd = 0.002 ifrqs = 24 iq = 32 ihann = 0 idbout = 3 idsprd = 0 idsines = 0 wsig spectrum ain, iprd, iocts, ifrqs , iq, ihann, idbout, idsprd, idsines krms rms ain, 20 ; find a monaural rms value kvar = 0.6 + krms/8000 ; & use to gate the pitch variance ilo = 7.0 ihi = 10.0 istrt = 8.0 idbthres = 10 inptls = 4 irolof = 0.75 iodd = 1 iconf = 12 intrp = 1 ifprd = 0 iwtflg = 0 koct, kamp specptrk wsig, kvar, ilo, ihi, istrt, idbthres, inptls, irolof, iodd, iconf, intrp, ifprd,iwtflg /* ; use extracted pitch and amplitude to control foscili kcps = cpsoct(koct) ; transpose kcar = 1 kmod = 1 kamp1 = kamp*120 ; scale amplitude kamp2 port kamp1, 0.001 ; declick kndx = kamp*0.12 ; changes kndx with amplitude ifn = 1 ; iphs = 0 afm1 foscili kamp2, kcps, kcar, kmod, kndx, ifn, iphs ; fm aind delay ain, 0.245 ; adjust to pitch tracker delay aenv linen 1, 0.01, p3, 0.246 aout1 = afm1*aenv aout2 = afm1*aenv outs aout1, aout2 */ xout koct, kamp endop ;// opcode Vocoder, a, aakkkpp as1,as2,kmin,kmax,kq,ibnd,icnt xin if kmax < kmin then ktmp = kmin kmin = kmax kmax = ktmp endif if kmin == 0 then kmin = 1 endif if (icnt >= ibnd) goto bank abnd Vocoder as1,as2,kmin,kmax,kq,ibnd,icnt+1 bank: kfreq = kmin*(kmax/kmin)^((icnt-1)/(ibnd-1)) kbw = kfreq/kq an butterbp as2, kfreq, kbw an butterbp an, kfreq, kbw as butterbp as1, kfreq, kbw as butterbp as, kfreq, kbw ao balance as, an amix = ao + abnd xout amix endop ;// /*--- ---*/ instr 1 ; pitch tracker ain in koct, kamp GutoPitchTracker ain /* replace code with whatever */ /* ; use extracted pitch and amplitude to control foscili kcps = cpsoct(koct) ; transpose kcar = 1 kmod = 1 kamp1 = kamp*120 ; scale amplitude kamp2 port kamp1, 0.001 ; declick kndx = kamp*0.12 ; changes kndx with amplitude ifn = 1 ; iphs = 0 afm1 foscili kamp2, kcps, kcar, kmod, kndx, ifn, iphs ; fm aind delay ain, 0.245 ; adjust to pitch tracker delay aenv linen 1, 0.01, p3, 0.246 aout1 = afm1*aenv aout2 = afm1*aenv */ /* --- */ imax = 7000 imin = 300 ifun = imin/2 kcps1 = cpsoct(koct)*(2^(-12/12)) kcps2 = cpsoct(koct)*(2^(-7/12)) kcps3 = cpsoct(koct)*(2^(-3/12)) kcps4 = cpsoct(koct)*(2^(-2/12)) kcps5 = cpsoct(koct)*(2^(2/12)) kamp = kamp*1000 anoi1 buzz kamp, kcps1*2, imax/ifun, 2 anoi2 buzz kamp, kcps2*2, imax/ifun, 2 anoi3 buzz kamp, kcps3*2, imax/ifun, 2 anoi4 buzz kamp, kcps4*2, imax/ifun, 2 anoi5 buzz kamp, kcps5*2, imax/ifun, 2 anoi = (anoi1+anoi2+anoi3+anoi4+anoi5)/5 aout Vocoder anoi,ain,imin,imax,25,32 a0l = aout a0r = aout outs a0l, a0r endin /*--- ---*/ f1 0 8192 10 1 0.002 0.2 0.06 0.025 0.002 f2 0 16384 10 1 ;p1 p2 p3 ;i# ini dur i 1 0 30 e ; #EOF [2] > > > > sr = 48000 > kr = 4800 > ksmps = 10 > nchnls = 2 > > opcode GutoPitchTracker, kk, a > > /* > Guto Caminhoto > guto@sercomtel.com.br > http://members.tripod.com/Guto001/index.html > Guto 03/2000 > -- UDOization by David Akbari - May 2006 > */ > > ain xin > ain dcblock ain ; adjust DC > > iocts = 8 > iprd = 0.002 > ifrqs = 24 > iq = 32 > ihann = 0 > idbout = 3 > idsprd = 0 > idsines = 0 > > wsig spectrum ain, iprd, iocts, ifrqs , iq, ihann, idbout, idsprd, > idsines > krms rms ain, 20 ; find a monaural rms value > kvar = 0.6 + krms/8000 ; & use to gate the pitch variance > > ilo = 7.0 > ihi = 10.0 > istrt = 8.0 > idbthres = 10 > inptls = 4 > irolof = 0.75 > iodd = 1 > iconf = 12 > intrp = 1 > ifprd = 0 > iwtflg = 0 > > koct, kamp specptrk wsig, kvar, ilo, ihi, istrt, idbthres, inptls, > irolof, iodd, iconf, intrp, ifprd,iwtflg > > /* > ; use extracted pitch and amplitude to control foscili > kcps = cpsoct(koct) ; transpose > kcar = 1 > kmod = 1 > kamp1 = kamp*120 ; scale amplitude > kamp2 port kamp1, 0.001 ; declick > kndx = kamp*0.12 ; changes kndx with amplitude > ifn = 1 ; > iphs = 0 > > afm1 foscili kamp2, kcps, kcar, kmod, kndx, ifn, iphs ; fm > aind delay ain, 0.245 ; adjust to pitch tracker delay > aenv linen 1, 0.01, p3, 0.246 > > aout1 = afm1*aenv > aout2 = afm1*aenv > > outs aout1, aout2 > */ > > xout koct, kamp > > endop > > /*--- ---*/ > > instr 1 ; pitch tracker > > ain in > > koct, kamp GutoPitchTracker ain > > /* replace code with whatever */ > > ; use extracted pitch and amplitude to control foscili > kcps = cpsoct(koct) ; transpose > kcar = 1 > kmod = 1 > kamp1 = kamp*120 ; scale amplitude > kamp2 port kamp1, 0.001 ; declick > kndx = kamp*0.12 ; changes kndx with amplitude > ifn = 1 ; > iphs = 0 > > afm1 foscili kamp2, kcps, kcar, kmod, kndx, ifn, iphs ; fm > aind delay ain, 0.245 ; adjust to pitch tracker delay > aenv linen 1, 0.01, p3, 0.246 > > aout1 = afm1*aenv > aout2 = afm1*aenv > > /* --- */ > > outs aout1, aout2 > > endin > > /*--- ---*/ > > > > f1 0 8192 10 1 0.002 0.2 0.06 0.025 0.002 > > ;p1 p2 p3 > ;i# ini dur > > i 1 0 30 > > e > >