Strum
Strum is an electric guitar physical model designed by Charlie Sullivan as a senior project in 1987. (Charlie went on to get an EE degree from Berkeley and is now teaching at Dartmouth.) The article handed out in class today describes this instrument in detail. Here is the syntax of the cmix version of this instrument.
Note: strum puts out very small amplitudes. Therefore you should write to a floating point file and then rescale.
There are four types of notes: start(), which starts a note up from scratch; fret() which simply resets a few parameters and is meant to follow directly after a start() note, so that the effect is like changing frets without plucking the string again; bend(), which like fret() is meant to follow an attacked note, and change pitches; and pick() which is like start() except that the delay lines are not cleaned out, so that you are supposed to get some resonance from the previous note (I have yet to verify this.)
The exact syntax is
start(start,dur,pitch,decay,nydecay,amp,squish) bend(start, dur, pitch1, pitch2,gliss_function, decay, nydecay) fret(start,dur,pitch,decay,nydecay) start1(start,dur,pitch,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) fret1(start,dur,pitch,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) bend1(start, dur,pitch1,pitch2, gliss_function,decay, nydecay, distortion,loopgain, looppitch, premonitor, postmonitor,plamp,squish) start4(start,dur,pitch1,pitch2,pitch3,pitch4,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) pick4(start,dur,pitch1,pitch2,pitch3,pitch4,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) fret4(start,dur,pitch1,pitch2,pitch3,pitch4,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) bend4(start, dur,pitch1a,pitch1b, pitch2a,pitch2b, pitch3a,pitch3b, pitch4a,pitch4b, gliss_function,decay, nydecay,distortion,loopgain, looppitch, premonitor, postmonitor,plamp,squish) start6(start,dur,pitch1,pitch2,pitch3,pitch4,pitch5,pitch6,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) pick6(start,dur,pitch1,pitch2,pitch3,pitch4,pitch5,pitch6,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish) fret6(start,dur,pitch1,pitch2,pitch3,pitch4,pitch5,pitch6,decay,nydecay,distortion,loopgain,looppitch, premonitor,postmonitor,plamp,squish)
start(), bend() and fret() are just simple one note routines.
start1(), fret1(), and bend1(), are also one note routines, but allow for setting distortion, feedback and monitor levels as well. start4(), start6() etc., do the same except for four or six strings at a time.
The meanings of the individual parameters is as follows;
start = starting time
dur = duration
pitch = pitch in 8ve.pc form
decay = decay time of fundamental
nydecay = decay time of high frequencies
squish = quality of attack. 1 = a hard attack ... 20 = a soft finger pluck.
distortion = amount of distortion. 0 means no distortion, and higher numbers add more
distortion., more heavy metal like.
loopgain = controls the amount of feedback. Values are generally very small, in
the 0 to .01 range, depending on conditions
looppitch = the frequency you will hear when feedback occurs, in 8ve.pc form.
premonitor = amount of signal to feed to the output prior to distortion
postmonitor = amount of signal to feed to the output after distortion.
plamp = gain of pluck seed. Normally set to 1.
gliss_function = number of stored function array to use for bend() calls.
The functions are created using makegen(). which has the form, makegen(function_number,
function_type, size, args...). Typically you would use gen 5 or 7 to create
exponential or straight lines. e.g.
makegen(1, 5, 1024, .01, 1024, 1)
creates an exponential function (number 1)between .01 and 1, over 1024 points,
using gen 5. (gen 5 cannot have arguments of 0.).
makegen(1,7,1024,0,1024,1)
creates a straight line function, (number 1) between 0 and 1, over 1024
points, using gen 7.
makegen(1,7,1025,0,512,1,512,0)
creates a rise and fall over 1024 points using gen 7.
Here is a demo score.
output("demo") start4(start=0, dur=3, pitch=6.00,6.07,6.10,7.04, decay=10, Nydecay=10, distortion=40, loopgain=.07, looppitch=9.07, premonitor=0, postmonitor=1, plamp=1,squish=0) fret4(start=3, dur=3, pitch=6.02,6.09,7.00,7.06, decay=3, Nydecay=.02, distortion=14, loopgain=.07, looppitch=9.09, premonitor=1, postmonitor=1, plamp,squish) makegen(1,7,512,0,512,1) bend4(start=6,dur,6.02,7.02,6.09,7.09,7.00,8.00,7.06,8.06,gliss_fn=1,decay,Nydecay,distortion, loopgain,looppitch,premonitor,postmonitor,plamp,squish) makegen(1,7,1000,.9,100,1,350,1,100,0,450,0) bend4(9, .5, 8.01, 8.02, 8.01, 8.02, 8.01, 8.02, 8.01, 8.02, gliss_fn, decay, Nydecay, distortion, loopgain, looppitch=8.01, premonitor, postmonitor, plamp, squish=4) bend4(9.5,3,8.04,5.04,8.00,5.00,7.00,4.00,8.00,5.00,gliss_fn,decay=45,Nydecay=45,distortion=40, loopgain=.10,looppitch=4.00,premonitor=0,postmonitor=1,plamp,squish)
You can look here for a whole bunch of data files, including the Star Spangled Banner.
You can look here for the source code for the instrument.