vwavetable


vwavetable is a non-realtime version of the WAVETABLE instrument with additional parameters for vibrato (change in pitch over time).

Syntax:


makegen(1, 10, 1000, p0, p1...) /* amplitudes of the partials in the waveform */
makegen(2, 24, 1000, t0, a0, t1, a1...) /* envelope of the sound in time/amp pairs */
makegen(3, 10, 1000, p0...) /* waveform of the vibrato function */

vwavetable(outskip, duration, pitch, amplitude, vibrato_rate_lo, vibrato_rate_hi, vibrato_depth, spread) /* vibrato_depth is a percentage number */

in comment form:

/* vwavetable -- a vibrato wavetable sythesis instrument
*
*  p0 = start
*  p1 = duration
*  p2 = pitch (oct.pc or hz)
*  p3 = amplitude
*  p4 = vibrato rate low
*  p5 = vibrato rate high
*  p6 = vibrato depth (percentage)
*  p7 = stereo spread [optional]
*  assumes function table 1 is the synthesis waveform
*  assumes function table 2 is the amplitude envelope
*  assumes function table 3 is the vibrato waveform
*
*/

An example score:

load("vwavetable")
output("ttt.snd")
makegen(1, 10, 1000, 1, 0, 0.3, 0, 0.1, 0, 0.05)
makegen(2, 24, 1000, 0,0, 0.5,1, 3.4,1, 3.5,0)
makegen(3, 10, 1000, 1)
fplot(3) /* view the vibrato wave */
vwavetable(0, 3.5, 8.02, 10000, 4, 7, 1)
vwavetable(4.0, 3.5, 8.04, 10000, 4, 7, 10)