B4A Library Midi Driver Lib

Android have still not allowed streaming Midi to the internal Midi device so for those interested in trying out streaming midi data to the onboard Sonivox midi device, here is a wrapper for BillTheFarmers Midi Driver. This is the first of a few things I will be posting over the next week or two that are Midi Related.

Be aware that performance will vary greatly depending on the device it is used on.

The wrapper is pretty light with very few modifications. It has been working pretty well while I have been developing other things (to be released soon) so I thought I'd share it sooner rather than later.

Unfortunately the Midi Driver Lib is too large to upload to the Forum as it contains the Sonivox Library even though it uses a fraction of it (see link below).

The Midi Piano project attached is what is says it is, a graphic of a piano that sends midi note on, note off and patch change messages to the driver.

If you do not know anything about the Midi standards I suggest you do some research before starting to try to program it. Two very good resources are:

http://www.sonicspot.com/guide/midifiles.html

and

http://www.somascape.org/midi/tech/mfile.html

You should be able to get most of the information you need from these.

I am hoping that I can soon release a port of a large portion of the Javax.Midi classes, written entirely in B4a which will support MidiEvents, Sequence ,RealTimeSequencer and Recording which may also be of interest.

The Midi Piano app depends on JavaObject and Gestures Libraries and of course the MidiDriver Lib available below. Unzip the jar and XML files and copy them to your additional Libraries folder.

The biggest downside is that we are stuck with the reverb, apparently the Sonivox library has disabled the changing of the reverb by conventional means. I am trying to find out their Sysex command structure, but am not having much luck so far. I'll keep you posted on that one.

You can download the Midi Driver V2 Library from my Google Drive here.

This is definitely Beta software, please test it thoroughly and let me know if you find any issues in this thread. It would also be useful to know how usable it is on different devices.

For my part, it's OK on my 2013 Nexus 7.

Update to V2 (Download from the above link) to allow newer android devices to access the mididriver (Requires the MidiSystem2 download from here)

Enjoy
 

Attachments

  • MidiPiano.zip
    14.9 KB · Views: 322
Last edited:

stevel05

Expert
Licensed User
OK, If it was originally based on an example, let me know which one and I will make sure that there is not a conflict in it. Just for peace of mind.
 
Top