Return to BSD News archive
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!msuinfo!agate!agate!usenet From: "Mike Durian" <durian@boogie.com> Newsgroups: comp.os.386bsd.announce Subject: Tclmidi-2.0 (includes NetBSD MPU401 device driver) Followup-To: poster Date: 10 Sep 1994 22:35:49 -0700 Organization: University of California, Berkeley Lines: 106 Sender: cgd@agate.berkeley.edu Approved: 386bsd-announce-request@agate.berkeley.edu Message-ID: <199409092037.OAA21228@mailhub.advtech.uswest.com> NNTP-Posting-Host: agate.berkeley.edu It has been a while, and I forgot to announce this in the 386bsd groups, but tclmidi-2.0 has been posted to comp.sources.misc and can be ftp'd at harbor.ecn.purdue.edu:pub/tcl/extensions/tclmidi-2.0.tar.gz. Included with this release is an MPU401 device driver. This driver was originally written under BSD/386, but has been ported to Linux, SVR4 and NetBSD (I didn't have any FreeBSD testers, but I imagine it is close). Unlike other MIDI drivers, this one supports event time stamping. Simple commands like cat /dev/midi0 > foo.mid cat foo.mid > /dev/midi0 do what you would expect. The following is the README file from the distribution. OVERVIEW tclmidi-2.0 is language designed for creating and editing standard MIDI files. With the proper device interface it will also play and record MIDI files. Since tclmidi is a language supporting function calls, recursion and conditionals, you can use these features for editing, sequencing and writing complex scripts. Make the chorus of your song a function. Use loops for repeats. Whatever you wish. The basis of tclmidi is John Ousterhout's popular TCL language. tclmidi adds a few new commands specific to manipulating MIDI files (and playing/recording them). You'll need to have TCL-7.X or later installed on your system to build tclmidi. I've tried to be POSIX complient while writing tclmidi. It has been built on numerous machines and should compile on any Unix like machine with a C++ compiler. Perhaps other non-Unix machines too, but it hasn't been tested. MPU401 device drivers are supplied for BSD (BSD/386, NetBSD, FreeBSD?), Linux and SVR4. Though the SVR4 and FreeBSD ports have not been tested. tclmidi-2.0 comes with a device interface that will work with the supplied driver and allow you to play and record MIDI files. TCLM-1.0 - TCLMIDI-2.0 CHANGES tclmidi-2.0 is completely incompatible with tclm-1.0, though it does contain some similarities. The biggest change is that tclmidi-2.0 uses a red-black tree of MIDI events as its underlying data structure. This means events can be inserted and accessed at any time/position in a song. In tclm-1.0 events could only be appended to a track and could only be accessed sequentially. I believe that this change will make sequencing with tclmidi-2.0 feasible (in fact I plan on writing an X based song editor using tclmidi-2.0, sometime in the future). The second big change is the implementation language. tclm-1.0 was written in C. tclmidi-2.0 is written in C++. MIDI events were just screaming "object" at me and so I obliged them. Though C++ isn't as prevelent as C, I feel this shouldn't pose much of a problem since there exits a fine, freely availble C++ compiler (g++). The last big change is the inclusion of an MPU401 device driver. My development platform is a BSD/386 system with a Music Quest PC MIDI card. My previous drivers have used the MPU401 in smart mode, the new driver uses it UART mode so as to be more compatible with different MPU401 type cards (and for other reasons. See doc/trials.me). I have tried to port my driver to 386BSD varients, Linux and SVR4. I have testers for NetBSD and Linux. This driver appears to work under both plus BSD/386. If you have SVR4, you're on your own. The code is there, but I couldn't find any testers, and I expect it is buggy. Other changes involve syntax of the tclmidi commands. These have changed since 1.0 and are a bit more flexible I think. Please see the man pages to familiarize yourself with the new syntax. REQUIREMENTS You need tcl-7.X installed. You don't need the source though, (as opposed to tclm-1.0) as all the information tclmidi-2.0 needs can be found in the installed header files and libtcl.a. You also need a C++ compiler. G++ is free and works. COMPILATION NOTES Take a look at the Makefile and edit the stuff at the top. If you move tclmidi, or plan on running minfo and mplay from a different directory, be sure to edit the first line in minfo, mplay mrec, midtotcl and mmet to point to your location for tclmidi (default is /usr/local/bin/tclmidi). MISSING THINGS Scripts. I've included four, mplay, mrec, minfo and midtocl. If write some good ones, send them to me. Lucho Georgiev has written a few, which can be found in the contrib directory. I'm hoping others will contribute too. Xdrum support. Xdrum won't work with this version of tclmidi-2.0. I'll eventually redo xdrum to work with tclmidi-2.0, but it might be a while. I also want to write a X based score editor based on this stuff. That will probably take *quite* a while. MAILING LIST I've set up a mailing list for tclmidi discussion. To subscribe, send mail to majordomo@advtech.uswest.com and include the phrase "subscribe tclmidi" in the body of the message. The subject line is ignored, so don't put the phrase there. To send mail to the list, email tclmidi@advtech.uswest.com. SPECIAL THANKS Thanks goes to all those who have helped me get this thing working. Extra special thanks goes to the following for putting up with a lot of system crashes and debugging to make the driver ports usable. Thank them for getting the driver to work. Blame me for any bugs you find. Ralf Jaegar <raja@rajas.rhein-main.de> - Linux Andreas Gustafsson <gson@niksula.hut.fi> - NetBSD Luchezar Georgiev <lucho@tu-varna.bg> - Linux mike durian@boogie.com