1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153
|
<info>
Vocoder module with special controls
Adjusts automatically for mono or stereo files.
c, Jean Piche, 1997-1998
exciter = file on which analysis is performed.
carrier = file which is filtered by the analysis.
no_of_filters = number of bandpass filters in the vocoder.
baseFreq = lowest filter frequency.
expansion = the multiplier for the power series to determine the frequency
of successive filters: f(n) = f(n-1)*expansion.
resonance = bandwidth of each band: f(n) * resonance.
port = smoothing time for amplitude envelope of each band
outgain = amplitude multiplier for output stage.
</info>
<tk_interface>
cgraph basefreq -label "Base\nFrequency" -uni Hz -rel lo -min 20 -max 3000 -init 50
csepar
cgraph expansion -label "Expansion\nFactor" -uni x -rel li -min 1 -max 2 -init 1.85
csepar
cgraph outgain -label Gain -uni x -min 0.1 -max 4 -init 1.0
csepar
cgraph resonance -label Resonance -uni x -rel lo -min .0001 -max .5 -init .01
cslider no_of_filters -ra i -label "Number of filters" -uni "" -res 1 -min 2 -max 24 -init 8
cslider port -ra k -label Potamento -uni sec. -res .001 -min 0 -max 1 -init .1
cslider total_time -label Time -max 300 -min 0 -init 30 -uni sec.
cpopup lev -label "Gain Balance" -value "Exciter Carrier" -init 0
ctoggle loop -label "Loop Input Files" -init 1
cfilein exciter -label "Exciter file"
cfilein carrier -label "Carrier file"
</tk_interface>
<mono>
</mono>
<stereo>
gabol init 0
gabol2 init 0
;----------------------------------------------------------
instr 96
iloop = i(gkloop)
gain1 diskin "[exciter]", [sinfo exciter sr]/sr, [offexciter], iloop
gain2 = gain1
endin
instr 97
iloop = i(gkloop)
gain1, gain2 diskin "[exciter]", [sinfo exciter sr]/sr, [offexciter], iloop
endin
instr 98
iloop = i(gkloop)
gain3 diskin "[carrier]", [sinfo carrier sr]/sr, [offcarrier], iloop
gain4 = gain3
endin
instr 99
iloop = i(gkloop)
gain3, gain4 diskin "[carrier]", [sinfo carrier sr]/sr, [offcarrier], iloop
endin
;----------------------------------------------------------
instr 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
ifact pow i(gkexpansion), p1-1
kpit init i(gkbasefreq) * ifact
kpit2 init i(gkbasefreq) * ifact
ares1 butterbp gain1, kpit, kpit*gkresonance
klev1 rms ares1
kfact pow gkexpansion, (p1-1), 1
kpita = gkbasefreq * kfact
kpit portk kpita, .005
klev1 portk klev1, gkport
aros1 butterbp gain3, kpit, kpit*gkresonance
abal1 gain aros1, klev1
; -------------------------------------------
ares2 butterbp gain2, kpit, kpit*gkresonance
klev2 rms ares2
kfact pow gkexpansion, (p1-1), 1
kpitb = gkbasefreq * kfact
kpit2 portk kpitb, .005
klev2 portk klev2, gkport
aros2 butterbp gain4, kpit2, kpit2*gkresonance
abal2 gain aros2, klev2
nope:
gabol = gabol + (abal1)
gabol2 = gabol2 + (abal2)
endin
;----------------------------------------------------------
instr 78
klev = gklev
about balance gabol, gain1
abouf balance gabol2, gain2
about2 balance gabol, gain3
abouf2 balance gabol2, gain4
if klev == 0 goto excit
goto outer
excit:
outs about*gkoutgain, abouf*gkoutgain
outer:
outs about2*gkoutgain, abouf2*gkoutgain
gabol = 0
gabol2 = 0
endin
</stereo>
<quad>
</quad>
<score>
#tcl
proc makeScore {} {
global value realArr soundInInfo
set du $value(total_time)
append thescore "f1 0 8192 10 1\n"
if {[sinfo exciter chn] == "1"} {append thescore "i96 0 $du\n"} {append thescore "i97 0 $du\n"}
if {[sinfo carrier chn] == "1"} {append thescore "i98 0 $du\n"} {append thescore "i99 0 $du\n"}
append thescore "i78 0 $du\n"
for {set num 1} {$num <= $value(no_of_filters)} {incr num 1} {
append thescore "i$num 0 $du \n"
}
return $thescore
}
makeScore
</score>
|