This is a bit different from the other VOCODE-family instruments like
VOCODE
and
VOCODE2
in that it does a resynthesis of the signal.
This instrument is similar in some respects to
PVOC,
but it is a channel vocoder using a bank of band-pass filters
instead of an FFT analysis (like with phase vocoders).
p-fields:
/* VOCODESYNTH - channel vocoder driving an oscillator bank
p0 = output start time
p1 = input start time (must be 0 for aux bus)
p2 = duration
p3 = amplitude multiplier (post-processing)
Two ways to specify filter bank center frequencies:
(1) Spread evenly above a given center frequency:
p4 = number of filter bands (greater than 0)
p5 = lowest filter center frequency (in Hz or oct.pc)
p6 = center frequency spacing multiplier (greater than 1)
(multiplies each cf by this to get next higher cf)
(2) A list of center frequencies, given in function table 4:
p4 = 0 (must be zero: tells instrument to look for function table)
p5 = transposition of function table, in oct.pc (subtly
different from p7, which leaves cf's alone while transposing
the carrier oscillators.)
p6 = function table format (0: octave.pc, 1: linear octave)
(This applies to values below 15; values 15 and above are
interpreted as Hz, regardless of p6.)
Number of filter bands determined by length of function table.
p7 = amount to transpose carrier oscillators (in Hz or oct.pc)
p8 = filter bandwidth proportion of center frequency (greater than 0)
p9 = power gauge window length (seconds) [optional; default is 0.01]
Determines how often changes in modulator power are measured.
p10 = smoothness -- how much to smooth the power gauge output (0-1)
(this has more effect for longer window length (p9) times)
[optional; default is 0.5]
p11 = threshold -- below which no synthesis for a band occurs (0-1)
[optional; default is 0.0]
p12 = attack time -- how long it takes the oscillator for a band to turn
on fully once the modulator power for that band rises above the
threshold [optional; default is 0.001]
p13 = release time -- how long it takes the oscillator for a band to turn
off fully once the modulator power for that band falls below the
threshold [optional; default is 0.01]
p14 = amount of high-passed modulator signal to mix with output
(amplitude multiplier) [optional; default is 0]
p15 = cutoff frequency for high pass filter applied to modulator.
This pfield ignored if p10 is zero. [optional; default is 5000 Hz]
p16 = input channel [optional; default is 0]
p17 = percent to left channel [optional; default is 0.5]
Function tables:
1 amplitude curve for note. This curve, combined with the amplitude
multiplier, affect the signal after synthesis.
2 waveform for carrier oscillators
3 scaling curve for carrier notes, as pairs
4 list of center frequencies, for use with the second method of
specifying center frequencies
NOTES:
- If using first method for specifying center frequencies...
p6 = 2.0 will make a stack of octaves
p6 = 1.5 will make a stack of perfect (Pythagorian) fifths
Use this to get stacks of an equal tempered interval (in oct.pc):
p6 = cpspch(interval) / cpspch(0.0)
- If using second method for specifying center frequencies...
Make function table 4, for example, by using gen 2. So, to make
cf's from a list of pitches in oct.pc notation:
num_bands = 5
makegen(2, 2, num_bands, 8.00, 8.07, 9.00, 9.07, 10.02)
You can transpose these by the number of semitones given in p5.
Or, to specify cf's in Hz:
makegen(2, 2, 9, 100, 200, 300, 400, 500, 600, 700, 800, 900)
Transposition (still specified as oct.pc) works here also, and it
preserves harmonic structure.
*/
Sample scorefile:
rtsetparams(44100, 2)
load("VOCODESYNTH")
rtinput("my_stereo_sound.aif")
inskip = 0.0
dur = DUR()
amp = 1.0
numbands = 22
lowcf = 300
interval = 0.025
cartransp = 0.00
bw = 0.06
winlen = 0.0001
smooth = 0.98
thresh = 0.0001
atktime = 0.001
reltime = 0.01
hipassmod = 0.0
hipasscf = 2000
makegen(2, 10, 10000, 1)
scale1 = .5
scale2 = 1
makegen(3, 4, 100, 0,scale1,1, 1,scale2)
setline(0,0, .1,1, dur-.1,1, dur,0)
spacemult = cpspch(interval) / cpspch(0.0)
VOCODESYNTH(0, inskip, dur, amp, numbands, lowcf, spacemult, cartransp, bw,
winlen, smooth, thresh, atktime, reltime, hipassmod, hipasscf, 0, 1)
VOCODESYNTH(0, inskip, dur, amp, numbands, lowcf, spacemult, cartransp, bw,
winlen, smooth, thresh, atktime, reltime, hipassmod, hipasscf, 1, 0)