MCLAR

the "Clarinet" physical model (in package insts.stk)


MCLAR implements a clarinet physical model. It seems highly similar to the earlier CLAR physical model. Also check out MBLOWHOLE for a clarinet-like model with a tonehole and register vent included.

It was originally adapted from Perry Cook and Gary Scavone's STK, the Synthesis ToolKit for doing amazing physical model stuff.

This is from the orginal STK source code for "Clarinet":




p-fields:
/* MCLAR - the "Clarinet" physical model instrument in
        Perry Cook/Gary Scavone's "stk" (synthesis tookkit).

   p0 = output start time
   p1 = duration
   p2 = amplitude multiplier
   p3 = frequency (Hz)
   p4 = noise gain (0.0-1.0)
   p5 = max pressure (0.0-1.0)
   p6 = reed stiffness (0.0-1.0)
   p7 = percent of signal to left output channel [optional, default is .5]

   Assumes function table 1 is breathPressure (amplitude) curve for the note.
   Or you can just call setline. If no setline or function table 1, uses
   flat curve.
*/
Sample scorefile:
rtsetparams(44100, 2)
load("MCLAR")

makegen(1, 24, 1000, 0,1, 2,0)
MCLAR(0, 3.5, 20000.0, 314.0, 0.2, 0.7, 0.5)
MCLAR(4, 3.5, 20000.0, 149.0, 0.2, 0.7, 0.5)