EMUSIC-L Digest Volume 44, Issue 03 This issue's topics: THINK C MIDI I/O Think C-MIDI i/o (10 messages) Your EMUSIC-L Digest moderator is Joe McMahon . You may subscribe to EMUSIC-L by sending mail to listserv@american.edu with the line "SUB EMUSIC-L your name" as the text. The EMUSIC-L archive is a service of SunSite (sunsite.unc.edu) at the University of North Carolina. ------------------------------------------------------------------------ Date: Fri, 18 Sep 1992 12:20:34 -0400 From: NLEONARD@RCNVMS.RCN.MASS.EDU Subject: Think C-MIDI i/o Dear Composer/Macintosh Programmers, I am a composer and programmer of interactive music software looking for assistance in keeping my software tools current and correctly implemented for Think C 5.0 and System 6.07 and 7. I have ported one of the MPWC examples that came with the MIDI Manager to Think C 4.0 and 5.0. The MPW example came with a compiled file called MIDI.o which I think is the "glue". I never really understood what to do with this and did not use it. My code has always worked. Does the C code that came with the MIDI Manager implement the glue interface, making the ".o" file unnecessary? Secondly, I am interested in being in touch with someone with more experience in programming the Mac to get a few tips on how to update my libraries so that they are System 6 & 7 compatible. An example that starts up the MIDI Manager or any other reliable driver and sends and receives a packet would be extremely helpful. Thirdly, I would like to optimize the performance of posting time stamped MIDI packets in an output buffer to be sent at arbitrary times. Any suggestions for implementing and algorithm which is more efficient than using one sorted linked list would be helpful. I am looking for articles which discuss the design of a multiple linked list output buffer algorithm which augments and emptys lists based on the mod of the time stamp. Fourtly, I would like to know of alternate drivers. I have seen a driver by Lee Boynton: has anyone seen documentation or simple examples for this driver? Any advice you could give me would be greatly appreciated. Neil Leonard nleonard@ecn.mass.edu Massachusetts College of Art 621 Huntington Ave Boston, MA 02130 (617) 522-2454 (home) (617) 232-1555 x 357 (work) (617) 566 4034 (fax) ------------------------------ Date: Fri, 18 Sep 1992 12:35:01 EDT From: "(Joseph D. McMahon)" Subject: Re: Think C-MIDI i/o NLEONARD@rcnvms.rcn.mass.edu writes: > Thirdly, I would like to optimize the performance of posting time stamped > MIDI packets in an output buffer to be sent at arbitrary times. Any > suggestions for implementing and algorithm which is more efficient than > using one sorted linked list would be helpful. I am looking for articles > which discuss the design of a multiple linked list output buffer algorithm > which augments and emptys lists based on the mod of the time stamp. I'll let Nick talk about the MIDI Manager and why he doesn't like alternate drivers; we recently got a post from comp.music which suggested that using a heap as a priority queue was a good alternative. I believe I still have that article if you would like a copy of it. If you're familiar with the data structure already, that may be enough of a hint. Knuth describes the heap well in the Art of Computer Programming. Most books on algorithms will mention it as well. --- Joe M. ------------------------------ Date: Sat, 19 Sep 1992 13:22:19 +0000 From: Nick Rothwell Subject: Re: Think C-MIDI i/o I have some code archived at brown.edu (I think), associated with the THINK C mailing list. It has MIDI Manager drivers, buffered output routines with timestamping, and so on, all well commented. >Fourtly, I would like to know of alternate drivers. I have seen a driver by >Lee Boynton: has anyone seen documentation or simple examples for this >driver? If I were you, I would't even think about it. Only MIDI Manager works on Outbound portables. Only OMS (with or without MIDI Manager) works on the PowerBooks. AFAIK, all the home-grown drivers are dead in the water. The famous Kirk Austin routines died with the Mac Plus. Nick. ------------------------------ Date: Sat, 19 Sep 1992 13:22:24 +0000 From: Nick Rothwell Subject: Re: Think C-MIDI i/o >I'll let Nick talk about the MIDI Manager and why he doesn't like alternate >drivers; Done already... :-) >we recently got a post from comp.music which suggested that using a >heap as a priority queue was a good alternative. Bear in mind that data structures accessed by MIDI Manager write hooks will have to be interlocked carefully in order to work at interrupt-level. My routines use a fixed-size circular output buffer with semaphones and block-on-write. Nick. ------------------------------ Date: Mon, 21 Sep 1992 06:05:55 -0400 From: Mike Lyons Subject: Re: Think C-MIDI i/o Nick, > routines use a fixed-size circular output buffer with semaphones and what the heck is a semaphone? Mike ------------------------------ Date: Mon, 21 Sep 1992 11:33:48 +0000 From: Nick Rothwell Subject: Re: Think C-MIDI i/o >what the heck is a semaphone? A mis-spelled semaphore. Nick. ------------------------------ Date: Mon, 28 Sep 1992 08:05:47 CDT From: crispen Subject: Re: Think C-MIDI i/o >>what the heck is a semaphone? > >A mis-spelled semaphore. And a semaphore is, of course, two. +-------------------------------+--------------------------------------+ | Rev. Bob "Bob" Crispen | "IT FOUND ME!" | | crispen@foxy.boeing.com | Campus Crusade for Cthulhu | +-------------------------------+--------------------------------------+ ------------------------------ Date: Mon, 28 Sep 1992 08:39:05 GMT From: "(Ricard Wolf)" Subject: Re: Think C-MIDI i/o In article <9209211134.aa29922@dcs.ed.ac.uk> Nick Rothwell writes: >>what the heck is a semaphone? > >A mis-spelled semaphore. Hm. Hey, this could be the name of a new instrument! Some sort of two-sound synthesiser? Two-positioned synthesiser? Ideas please! ( ( :-) ) / "Ricard Wolf on Semaphone" -- Ricard Wolf / | \ / | /- email: ricard@axis.se Axis Communications AB /__| \/ | \__ uucp: axisab.se!ricard S - 223 70 LUND / | /\ | \ Tel: +46 46 19 18 63 SWEDEN / | / \ | \__/ Fax: +46 46 13 61 30 ------------------------------ Date: Mon, 28 Sep 1992 13:59:35 +0100 From: "(Adam Mirowski)" Subject: Re: Think C-MIDI i/o >>>what the heck is a semaphone? >> >>A mis-spelled semaphore. > >Hm. Hey, this could be the name of a new instrument! Some sort of >two-sound synthesiser? Two-positioned synthesiser? Ideas please! ( ( :-) ) A synthesizer with half-decent sounds. Or a typo on suzaphone (I am not sure *that* spelling is right). -- Adam Mirowski, mir@chorus.fr (FRANCE), tel. +33 (1) 30-64-82-00 or 74 Chorus systemes, 6, av.Gustave Eiffel, 78182 Saint-Quentin-en-Yvelines CEDEX ------------------------------ Date: Mon, 28 Sep 1992 21:45:58 GMT From: "(Michele Costabile)" Subject: Re: Think C-MIDI i/o What's a semaphone? Easy: the semaphone reads ASCII text and with the help of a series of conversion tables translates semantics of the text it read into music. Better ideas sound better, weird ideas sound experimental, traditional ideas play a major triad. Sometimes no sound is produced. Michele "... and after shut down a shut up may sometimes be necessary" ------------------------------ End of the EMUSIC-L Digest ******************************