Dynamic alteration of synthesis parameters
For the following arguments you can substitute a file of floating point numbers, and the synthesis will track those numbers from beginning to end.
1) pitch transposition in semitones.
2) frequency shift factor
3) warp index for reshaping magnitude response. (spectrum_warpshape_index)
4) gain in decibels.
For each of these arguments in the S.plainpv script you can simply substitute the name of a file of floating point numbers. You can create this file yourself ahead of time, or you can use special commandline routines called gen routines to do this.
The gen routines typically begin with an array size, followed by a set of arguments, pairs of arguments, or triples of arguments. I recommend only worrying about gen1 and gen4 (gen5 is useful for drawing sines)
The syntax for gen1 is
gen1 -LN t1 v1 t2 v2 . . . tN vN > floatsams
where t is relative time (beginning with 0) and v is a value. There is no space between -L and N, the number of points in the array.
gen1 -L1024 0 1 2 4 10 -1
will allocate a curve which goes linearly between 1, 4, and -1, from relative times 0 to 2 to 10 .
Gen4 is similar except that there is an additional argument between each time/value pair, that is between -1 and +1, where a positive argument will draw and exponential curve and a negative value will draw a logarithmic curve, between the specified points.
If you call a gen routine without redirecting the output it will simply type the numbers to your screen. A program called gendraw, however, will neatly list the contents of a file created by a gen routine.
Now, what is really cute is that you
can do this right in the S.plainpv script, since it is merely a
gen4 -L1024 0 5 -2 1 .1 2 2 5 > warpvals;
Here is a man page on the gen functions.