an open-source digital signal processing and sound synthesis language
about · links · contact
MSAXOFONY -- saxophone physical model
in RTcmix/insts/stk

quick syntax:

CAPITALIZED parameters are pfield-enabled for table or dynamic control (see the maketable or makeconnection scorefile commands). Parameters after the [bracket] are optional and default to 0 unless otherwise noted.

   p0 = output start time (seconds)
   p1 = duration (seconds)
   p2 = (absolute, for 16-bit soundfiles: 0-32768)
   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 = reed aperture (0.0-1.0)
   p8 = blow position (0.0-1.0)
   p9 = pan (0-1 stereo; 0.5 is middle) [optional; default is 0.5]
   p10 = breath pressure table [optional; default is 1.0]

   p2 (amplitude), p3 (frequency), p4 (noise amp), p6 (reed stiffness), p7 (reed aperture),
   p8 (blow position) and p9 (pan) can receive dynamic updates from a table or
   real-time control source.

   p10 (breath pressure table), if used, should be a reference to a pfield table-handle.

   Author:  Brad Garton, based on code from the Synthesis ToolKit

MSAXOFONY is the "Saxofony" physical model in Perry Cook and Gary Scavone's STK, the Synthesis ToolKit.

Usage Notes

MSAXOFONY -- it's a late, smoky night in the Naked City. Echoing through the alleyway, diffracted by several dozen fire escapes, comes the throaty, creaky/squeaky sound of a lazy blues... from a laptop!

Well, not really -- but someday. MSAXOFONY implements a physical model of a sax. Yeah, daddy-oh.

Here's what Gary says about "Saxofony":

    STK faux conical bore reed instrument class.

    This class implements a "hybrid" digital waveguide instrument that can generate a variety of wind-like sounds. It has also been referred to as the "blowed string" model. The waveguide section is essentially that of a string, with one rigid and one lossy termination. The non-linear function is a reed table. The string can be "blown" at any point between the terminations, though just as with strings, it is impossible to excite the system at either end. If the excitation is placed at the string mid-point, the sound is that of a clarinet. At points closer to the "bridge", the sound is closer to that of a saxophone. See Scavone (2002) for more details.

The model is similar in many ways to the MCLAR and MBLOWHOLE models.

Be aware that some combinations of parameters will yield no sound. The 'physics' have to work correctly!

The optional 'breath pressure table' (p8, "BREATHENV") functions independently of an amplitude-control envelope used in p2 ("AMP"). This allows you to design sharp attacks, etc.

MSAXOFONY can produce other mono or stereo output.

Sample Scores

very basic:
   rtsetparams(44100, 2)

   breathenv = maketable("line", 1000, 0,1, 2,0)
   MSAXOFONY(0, 3.5, 20000.0, 243.0, 0.2, 0.7, 0.5, 0.3, 0.6, 0.5, breathenv)
   MSAXOFONY(4, 3.5, 20000.0, 149.0, 0.2, 0.7, 0.5, 0.3, 0.6, 0.5, breathenv)

slightly more advanced:
   rtsetparams(44100, 2)

   noiseamp = maketable("line", 1000, 0,1, 1,0, 2,1)
   aperture = makeLFO("sine", 2.0, 0.1, 0.7)
   blowpos = maketable("line", 1000, 0,0.5, 1,0.2, 3,0.8)
   MSAXOFONY(0, 3.5, 15000.0, 243.0, noiseamp, 0.7, 0.5, aperture, blowpos)

   amp = maketable("line", 1000, 0,0,1,1, 2,0)
   freq = makeLFO("sine", 4.0, 145, 150)
   reed = makeLFO("sine", 1.5, 0.1, 0.9)
   pan = maketable("line", 1000, 0,0.5, 1,1, 2,0, 2.5,1)
   MSAXOFONY(4, 3.5, amp*10000.0, freq, 0.2, 0.7, reed, 0.3, 0.6, pan)

   bamp = maketable("line", 1000, 0,0, 2,1, 10,1, 11,0)
   MSAXOFONY(8, 3.5, 20000.0, 178.0, 0.2, 0.7, 0.5, 0.3, 0.6, 0.5, bamp)

See Also