It’s ironic to me that so many users of the superb, Java-based Processing multimedia tool seem to prefer the Mac, because Mac Java support seems downright anemic. Mac users have long complained that, since Apple develops their own Java support for Mac OS X, the platform tends to lag behind Sun’s releases. That to me doesn’t seem like such a problem — early adoption of each new Java to leap out of Sun is generally a bad idea anyway. A more significant issue, though, is that Java performance tends to lag on the Mac in multimedia apps and that Apple has dropped support for two of the most important multimedia APIs.

On the music side, Apple dumped its com.apple.audio.midi java package with 10.4.8. Result: not only do you lose all the features that make the Mac great for MIDI, like the IAC bus for inter-application MIDI routing, but your external devices also spontaneously disappear. Nice.

On the video side, QuickTime for Java has long been vaporware. Following an update for QuickTime 6.4 and Java 1.4, Apple seems to have abandoned the platform altogether. Note that again, the common theme is Mac OS X 10.4.x. Video sometimes works under QuickTime 7, but there are many potential issues. And each time Apple releases some new QT update, apparently in the interest of supporting the iTunes ecosystem rather than actual video production, stuff often breaks.

Maybe I’m missing something, and maybe I’m being overly harsh (there are platform-specific issues on Linux, Windows, and from Sun themselves), but I would like to learn more about how these issues can addressed to make the Mac a more robust Java multimedia development platform.

Shifting Priorities, and Long Live XP?

I could raise more serious questions about why Apple seems bent on redirecting its operating system efforts to benefit only Apple, in the form of more platform-specific APIs (all carefully leveraged by Apple-branded applications) and, in the case of QuickTime and even allocation of developer resources, tilted toward selling more consumer iPod, iTunes, and iPhone products rather than building the Mac. I don’t want to overstate that argument, though: Apple is a big company, and it behaves like one. Sun, for their part, have also left their own multimedia libraries like JMF without support. Multimedia just doesn’t seem to register on the radar screen of big companies, and since desktop Java development isn’t as important to Apple as pushing Xcode, Objective-C, and its own technologies, the decision is almost understandable.

The problem is, it leaves artists in the lurch. And, quite frankly, Windows is simply better. Java applications run faster. Java runtime support is better. Windows’ MIDI system — admittedly, perhaps thanks to a lack of updates there — works perfectly. You can wrap the DirectX video grabber and get terrific video performance, without using QuickTime. There’s a more robust Java development community, lots of tools, fantastic performance. If someone asked strictly on the basis of Java/Processing support, I’d have to admit Windows XP was my preferred platform. (Vista works fine with Java, despite some initial scares, but there are other issues that keep me away from Vista for now.)

Fixes and Alternatives

I’m not writing off the Mac. I hope Apple reconsiders its Java support. And in the meantime — as is often the case with Java on all platforms — third-party libraries step in. For the MIDI system:

mmj – Mac OS X universal binary java Midi subsystem: This seems to fix the major MIDI issues with Java, and provides support across Intel and PPC Macs. Installing is a drag-and-drop affair, and so far it seems to work without a hitch. It’s free, as well.

Mandolane makes some great tools for both MIDI and sound access (including 3D sound mixing), ranging from free to a paltry GBP5. Integrated support is coming free to Processing in the form of the excellent ProMIDI library.

Video is stickier. The only major alternative is Sun’s Java Media Framework (JMF). Good news: it’s fully cross-platform. Bad news: it has performance problems of its own, and Sun doesn’t seem to have touched it since 1317 2003. (Hey, what did happen in 2003, anyway? Sun and Apple were both fully supporting multimedia until then.) I’m hopeful that maybe open sourcing Java will make a difference, but there just aren’t that many people in multimedia with time to fix code. If only there were a big, brilliant tech company that could support such development, like — oh, yeah. Apple or Sun.

As I said, perhaps I’m missing something, as only an armchair observer. Are there other good libraries out there? Is there a solution in sight? Is there a good reason why Apple made these calls?

It’s also fair to note that Java isn’t the only game in town. The Mono Framework has a lot of the same benefits, with the promise of more robust support, though I’m unsure what its status is in regards to multimedia specifically. (I’m oversimplifying a bit here; Mono runs Java as well as C# — among other languages — but they’re at least distant cousins in concept and could be alternatives for specific projects.) For 3D programming, there’s also the Lua programming language, which is gaining popularity and will soon be officially support in Max/MSP/Jitter. Lua isn’t a big framework like Java, but … on the other hand, that’s the good thing about it, especially if you work it into a framework that provides multimedia.

I’d love to hear more feedback from people who know more than I do. That’s the one reason to shoot off your mouth like this. Instead of suffering silently, maybe someone can provide some insight.

In the meantime, with a little work, you can make everything work … or run XP on your MacBook, if you have to.