Wire
Wire
Wire is an addition to Java 1.3 (or higher) on the MS Windows platform. With Wire, Java 1.3
is capable of receiving and sending MIDI from and to external MIDI devices, which isn't
included by default.
Since JDK1.4.1 Midi I/O should be supported with pure Java. There are still
some bugs (see here
and here),
but I recommend you to look at it instead of using Wire, because then
you do not need any extra classes and your application works at several platforms at once too.
It should work pretty well. The Wire sources are shown here
if you want to take a look at them. I will later post an easy example to get you started
using the JDK 1.4.1.
Wire is created because many people in the field agreed that MIDI from and to external
devices is very important,
and therefore should be standard in the Java language. However, until now Sun
hasn't implemented it yet, and the MIDI input is not supported in Java Sound 1.0.
Download Wire 0.97
Known bug: due to buffer size mismatching, sysex messages greater than 256
bytes don't get through (the reason is known: this a problem consists of the
number '256' in the native midi input class, and a data type mismatch in the
transport protocol, which are both easy to fix). In the SPI version (see below), this bug
is fixed, so if you need strong sysex, use this one, elsewise you can use Wire without
any problems.
There is also an SPI version of Wire,
written by Dr.-Ing. Gerrit Gehnen.
If you don't want to use Java Sound, but you want to use MIDI in Java, or use
MIDI in Java on other platforms than Windows, then you can also
download JavaMIDI, NoSuch or take a look at MidiShare,
at http://music.calarts.edu/~tre/JavaMusic.html.
You can see Wire in action by running the MIDI-Thru-example (after installing the
Java 1.3) which is a software MIDI True loop. You can also see the events
in the java console.
You can use Wire with your own program(s) by copying /lib/*.* in the directory of
your own classes. In that way, you will always be sure your application is runned well on any
Java 1.3 pre-installed computer.
You can also look to the documentation right here.
The reason for the name 'Wire' is simple: all other more logic names were already taken by the
Java Sound API.
Developers
If you want help with implementing MIDI <-> JavaSound on your platform, mail me and perhaps I can help.
Notice that Wire is also a perfect example for JNI and also provides nice C++ classes for
MIDI I/O on Windows.
If you have any trouble or find any bugs, please MAIL!
If you don't say that you encounter a bug, there is a change I will never notice and fix it!!
Have fun with it,
Niels Gorisse
Bonneville