Music Kit
Q: As I understand it, the MIDI timer and I/O is handled with the msg_receive call, which is a kind of polling that happens whenever the application has time to poll. But if the application is busy with other things, might not the polling interval become too great or too variable, which could have a musically unacceptable effect?
A: It's true that your application must go into a msg_receive to receive MIDI. However, it's possible to structure your application so that there is a separate Mach thread that does nothing or little else than service this msg_receive. This should provide the response time you need. For example, if you use the MusicKit (see ../NEXTSTEP_Developer/Other_Kits/music_software), there is a feature that allows the MusicKit performance (and, hence, the MIDI msg_receive) to run in a separate thread from the graphics event loop. (This feature is also useful for non-MIDI performances, such as those using DSP synthesis.) Alternatively, if you don't use the MusicKit, you can fork your own thread to handle the MIDI asynchronously to the event loop.
Running the Music Kit in a separate thread makes it unlikely that graphics will prevent you from receiving your MIDI in a timely fashion. However, the MusicKit scheduler (just like the AppKit event loop) is non-preemptive--there's no absolute limit to how much can be done before going back to the msg_receive. Therefore, if you write your own Performer, Instrument, or NoteFilter subclass, make it as efficient as possible, because you won't receive MIDI until you exit your code. In principle, the way to get the fastest MIDI response is to have your own separate thread loop processing the MIDI, without using the MusicKit. However, if that thread does much processing other than receiving MIDI, using the MusicKit would probably be just as efficient (and easier to program). The important thing is to get back to the msg_receive as quickly as possible, whether in the MusicKit, the AppKit, or your own thread.
QA621
Valid for 1.0, 2.0, 3.0
Q: What music software is available for NeXT Computers?
A: There is a variety of third party music software available. See the Software and Peripherals Catalog for more details on these programs. You can obtain the catalog by calling 800-848-NeXT in the U.S.
The Music KitTM is an extensive development tool for programmers and is available in the CCRMA (Stanford's Center for Computer Research in Music and Acoustics) Music and DSP tools distribution. Send mail to musickit@ccrma.stanford.edu for more information. There are some music demos that can be used by non-programmers, such as ScorePlayer and Ensemble. Ensemble combines MIDI in and out with DSP synthesis, soundfile playback, real-time algorithmic composition, interactive note processing, and more.
In the /NextDeveloper/Examples directory, the SoundAndMusic subdirectory contains programs that are runnable by anyone who knows enough Unix to change directories and compile in a shell window.
Some public-domain software is available on the Internet archive servers. Z-quencer is a simple MIDI sequencer with the music displayed in piano-roll style (rather than as music notation). Looching is a program that plays continuous background music on the DSP. Programmers at NeXT created the Lisp Scorefile Package, a Lisp front end for generating Music Kit scorefiles, and RecordApp, a program for sound recording.
Also available for programmers are some environments for software (non-real-time) sound synthesis and soundfile processing, mostly ported from other Unix platforms. Some also do real-time DSP synthesis. Generally these are available with source for a nominal fee or free of charge. CSound was created at M.I.T. and was given a NeXT front end by Pete Yadlowsky (pmy@virginia.edu). F. Richard Moore at U. C. San Diego (frm@sdcarl.ucsd.edu) has ported cmusic, a software synthesis language, and pvoc, a phase vocoder (for sophisticated analysis and resynthesis of recorded sound). Paul Lansky at Princeton ported cmix and rtmix, programs for soundfile processing and mixing. John Rahn at the University of Washington (jrahn@blake.washington.edu) has a Lisp kernel for music composition. Mara Helmuth (mara@woof.columbia.edu) wrote Patchmix, a graphical unit generator patch program that helps you construct synthesis instruments and that writes out cmix code.
At Stanford University, Heinrich Taube has created Common Music, a compositional environment based on the Common Lisp Object System; it creates scorefiles, soundfiles, and DSP synthesis using the Music Kit. Bill Schottstaedt has developed Common Lisp Music, a Lisp-based software synthesis language that uses the DSP for acceleration rather than real-time synthesis. Perry Cook has written SPASM, an interactive vocal synthesis application, ResonatorLab, a real-time digital filter application, and miscellaneous other tools that can be used by non-programmers. Glen Diener is developing a music notation program. Bill Schottstaedt has made available another music notation package, called cmn, in which editing is done from Lisp rather than graphically. The Stanford materials are available by anonymous ftp to ccrma.stanford.edu.
At Northwestern University, Bill Parod (bill_parod@nwu.edu) has created Just, a NeXT Music Kit application for exploring tuning systems and for retuning scorefiles.
There is an extension to TeX for music notation called MuTeX. We are told this works with the NeXT version of TeX, but that it doesn't include 92dpi screen fonts, so you have to print the scores on your printer to see the notation. Presumably someone could use TeX's companion program METAFONT, also bundled on NeXT's 2.0 Extended software release, to create a 92dpi screen font from the provided MuTeX fonts.
Note that there are non-NEXTSTEP programs available for other platforms that might run on NeXT computers under SoftPC or X. For example, SCORE is a powerful music notation program for the IBM PC, and there are some public-domain sound tools that run under X windows.
There is an email-based music interest group that occasionally has announcements of new music-related software for the NeXT. To subscribe, send email to next-music-request@wri.com.
QA571
Valid for 1.0, 2.0, 3.0
(Some of the software mentioned may not work under all releases. Also, while NeXT computers have the necessary hardware to use this software, NEXTSTEP running on other platforms may not.)