Muzic is the Tcl music interface used in the Eolas Muze product. It provides a simple interface that allows the playing of notes and selection of SoundFonts from Tcl scripts.
Muzic was developed by Steve Landers and is Copyright (c) 2005 Eolas Technologies Inc. It is released under a Tcl/BSD style license.
It can be downloaded from http://mini.net/tcl/muzic.kit
Muzic uses the built-in softsynth on platforms that support it (currently MacOS X and Windows) and optional SoundFonts via the Fluidsynth library - a real-time software synthesizer based on the SoundFont2 specification (see http://www.fluidsynth.org .
This Starkit contains the Muzic library built for Linux, MacOS X and Windows. It also contains the Muzic source (located in muzic.vfs/lib/muzic/Tcl/muzic.tcl).
The MacOS X version requires a recent build of Tcl (i.e. after Tcl 8.4.11) that supports the loading of bundles.
Using the Muzic starkit
The Muzic starkit is a convenient way to get the Muzic package, its documentation and test program.
If you run muzic.kit without options you will see a help page.
To play some sample sounds using the built-in softsynth use the play command without arguments
On platforms without a built-in softsynth (e.g. Linux) a sample SoundFont will be used. To explicilty request that the sample SoundFont use
muzic.kit play default
To play using other SoundFonts list these as arguments to the play command
muzic.kit play Scc1t2.sf2 moog.sf2 ...
If you want to see the source for the play command, use the following
And, if you're interested in seeing the Muzic source just unwrap the Starkit, or use the following command
Using Muzic in your application
To use Muzic, either source this starkit or extract the compiled Muzic package from muzic.vfs/lib/muzic and add it to the lib directory of your application (i.e. a directory on your auto_path).
The Muzic API contains just four procedures
muzic::channel chan inst
muzic::playnote chan pitch volume <duration>
On MacOS the built-in softsynth is accessed via the QuickTime Music APIs.
On Windows the built-in softsynth is accessed via the Windows Multimedia SDK.
There is no builtin softsynth on Linux, so Muzic.kit includes a sample SoundFont called "Gort's Doubledecker" that is relatively small (< 100k) and approximates the built-in SoundFonts on MacOS X and Windows.
SoundFont support is via the FluidSynth library, which is statically linked into the Muzic shared library/DLL. Fluidsynth is configured as follows:
Muzic is implemented using Critcl - the facility that allows C code to be embedded into Tcl scripts. See http://www.equi4.com/critcl.html for more information.
Muzic requires an updated version of Critcl that (as of September 2005) hasn't been formally released. Until this happens, this version can be obtained from http://www.DigitalSmarties.com/pub/critcl-new.kit .
See Building Muzic in the Muzic help pages for instructions on building Muzic and Fluidsynth.
There are many additional SoundFonts available at the following websites