Page 181 - Hacking Roomba
P. 181
162 Part II — Fun Things to Do
MIDI-capable software and devices. When similar wrappers are created for other operating
systems, then RoombaMidi could be easily ported to those operating systems, too. MIDI com-
munication operates at essentially the device driver level, requiring operating system support
and making a 100 percent Java solution not possible.
Since Mac OS X–specific Java libraries are required and a more standard GUI is desired, it
doesn’t make as much sense to use Processing. Instead, a standard technique of bundling Java
JAR files into Mac OS X executables is used. This technique uses a free program that comes
with Mac OS X called Jar Bundler. A similar free bundling tool exists for Windows called
Launch4J (http://launch4j.sourceforge.net/).
Figure 8-5 shows what RoombaMidi looks like. At first glance it looks the same as Roomba
CommTest with which you are already familiar. Like RoombaCommTest, RoombaMidi uses
RoombaCommPanel for the Roomba GUI. RoombaMidi works just like RoombaCommTest
and adds only a thin application wrapper, a MIDI parser, and a tabbed pane to hold multiple
RoombaCommPanels. Figure 8-6 shows RoombaMidi as part of a larger setup including
Ableton Live, a digital audio and MIDI workstation, and MidiKeys, a virtual MIDI keyboard.
You can download free MIDI sequencers (sometimes called hosts) and other MIDI programs for
Mac OS X at http://xmidi.com/apps.html. Another good resource for free music pro-
grams for all operating systems is www.kvraudio.com.
FIGURE 8-5: RoombaMidi running