|
About Andrew Choi
MIDI Programs
MIDI File Player (External Device)
MIDI Destination Pop-Up Button
MIDI File Player (Internal Synth)
MusicSequence Sample Code
MIDI File Writer
MIDI Name Document Parser
NameConfigSetup
Fish Creek MIDI Framework
MidnamUtility
SysExSenderX
Other Programs
FCBlogEditor
FCBlog and Patch
Chinese Checkers Program
jyut6 ping3 Cantonese Input Method
Cocoa Sample Programs
Syntax Coloring Using Flex
NSTextField and Undo
NSToolbar
Implementing File Import
Launch Application and Open URL
Saving Uncommitted Text Field Edits
Algorithms
Jazz Chord Analysis as Optimization
Optimal Line Breaking for Music
Optimal Chord Spacing
|
|
|
|
A blog where I will write mostly about programming in Cocoa and CoreMIDI, and experiences from my ports of Emacs and XEmacs to the Mac OS.
Thursday November 6, 2003
FCMSysexDevice objects in this improved version of the FCM framework can handle reception of sysex messages from the moment they are created. Once the received sysex message is retrieved (by calling FinishReceive), the FCMSysexDevice object is immediately ready to receive more sysex messages. The message buffer shared by ReadProc and FinishReceive is now protected by a pthread mutex. This is necessary since ReadProc is call by CoreMIDI from a separate thread. See Apple's technical note 2028 to understand the relationship among the various threads API in Mac OS X.
|
FCM and DX7IIMidNam for Panther
|
Wednesday November 5, 2003
As I mentioned earlier, external devices in CoreMIDI have changed quite a bit in Panther. Like (ordinary) devices, they now contain entities, which in turn contain endpoints. These endpoints are connected (as reported by the kMIDIPropertyConnectionUniqueID property) to endpoints of (ordinary) devices. The connections correspond to the lines drawn among devices in Audio MIDI Setup.
It seems that one cannot use the endpoints on external devices for MIDI communication! The endpoints on the (ordinary) devices connected to them must be used instead. This is what my new version of the FCM framework does. Sysex devices are defined simply to be external devices. It probably makes sense in most circumstances since sysex messages are usually sent to external devices.
This new version of DX7IIMidNam uses the new FCM framework. There is a strange timing problem (marked by comment). I probably have to improve the implementation of sysex sends and receives some more.
|
Cantonese Input Method on Mac OS X
|
Tuesday November 4, 2003
I resigned from being the Mac OS maintainer for Emacs today. There's a lot I have to say about why I did it, but I think I'll save that for a future entry.
This decision frees me from using Emacs in my daily work (I felt that if I maintained it, I needed to use it to know what the problems were). So I'm looking for new applications. I use Emacs mainly for E-mail, news, and blogging. E-mail is easy; I can use Mail.app. For news, the simplest solution is not to read it (at least I don't need to read the Emacs groups any more). So far, I can't find a good blog publishing application. I just need a very simple one so perhaps I'll write it.
I also type Chinese E-mail messages in Emacs. With the input method converter I posted here earlier, I can build a custom Cantonese input method on OS X with the same key sequences as my custom Quail input method. Here is the source of the input method table. Drop the file on /Applications/Utilities/Asia Text Extras/IM Plugin Converter to generate the input method.
Xcode Features and Changes to CoreMIDI in Panther
|
Monday November 3, 2003
I read the Xcode documentation today. It really isn't that differentfrom ProjectBuilder. There are a number of fancy features. Ones that stand out to me the most are code completion, fix and continue, and native handling of the build process.
The FCM framework and programs I posted previously for sending and receiving sysex messages don't work on Panther any more! Panther has changed the way a MIDI setup appears to the user. And I can't find any documentation about this anywhere! To figure it out, I modified a test program I posted earlier. Here is the result.
This is what I discovered. External devices now contain entities,which in turn contain source and destination endpoints like (ordinary) devices do. The source and destination endpoints of external devices are connected to the those of devices (as reported by the kMIDIPropertyConnectionUniqueID property).
This requires a modification to how I defined sysex devices in FCM.The good news is: once FCM is fixed, programs built on it should work again.
|
Search this blog with
Lists
Less-Known Facts About Emacs
Emacs Rants
Chinese Restaurants in Calgary
Calgary/Banff Tourist Attractions
C++ Reading List
Science Fiction Series
Top-10 Reason I Stopped Working on Emacs
Top-10 Types of Questions I Get About Emacs
10 Defining Moments as Programmer
Misc
Carbon XEmacs
Emacs for
Mac OS X
|