I am still trying to get the program to write a MIDI file.
There is a problem with the javax.sound.midi package. For a given MidiDevice.Info object, MidiSystem.getMidiDevice(MidiDevice.Info) should consistently return the same MidiDevice object. However, each call to getMidiDevice creates a new instance and returns the object. All of the returned MidiDevice objects will return the same MidiDevice.Info object when running the method MidiDevice.getDeviceInfo().
Each call to MidiSystem.getSequencer() and MidiSystem.getSynthesizer() should return the default sequencer and synthesizer, respectively. However, these methods return a new object for each call. Each device produced by getSynthesizer will produce the same MidiDevice.Info object, and the same applies to the objects returned by getSequencer.
The objects created by MidiSystem.getReceiver() and MidiSystem.getTransmitter() are ambiguous given the documentation since there is no way of verifying which device they belong to. I would recommend against using these methods.
The Javadoc libraries are not linking to other Javadoc libraries. This is probably a problem with the Javadoc command. A similar problem ocurred with Maven and Javadoc a year or so ago.