Hopefully a simple question...

49 views
Skip to first unread message

Adam Wilhelmi

unread,
Jul 13, 2014, 11:42:00 PM7/13/14
to jaudi...@googlegroups.com
Forgive me for my ignorance in sound processing and all thing Jack.
I am working on a rather simple Android app for generating midi messages in order to control a DAW (a remote control surface, if you will). This app communicates with a Java application I've written, which receives the messages, and would then forward them to the system so as to be heard by the DAW (using such as QJackCtl).
My issue is this; I have yet to discover a means in which to generate simple midi messages in Java, and then send them to Jack.
The midi messages I am writing, as mentioned, are simple; merely channel control messages (3 bytes). I feel there is a solution within the libraries here, but after reading all that I can understand, I haven't yet found it. Is there any chance I've merely overlooked it?
Thank you in advance for any direction you can give!

Neil C Smith

unread,
Jul 14, 2014, 6:05:21 AM7/14/14
to jaudi...@googlegroups.com
Hi Adam,

On 14 July 2014 04:42, Adam Wilhelmi <adamwi...@gmail.com> wrote:
> I feel there is a solution within the libraries
> here, but after reading all that I can understand, I haven't yet found it.
> Is there any chance I've merely overlooked it?

Not really - you'd have to hunt around a lot! :-)

The current release of JNAJack does not have MIDI support. However,
recently I had a contribution from Salvatore Isaja to add MIDI. I've
actually hacked the code around a lot to more closely match the
underlying API and reduce overhead, so hopefully it's still working OK
- it's not been full tested yet, so hasn't been released. Feel free
to do some testing!

You can find it here - https://github.com/jaudiolibs/jnajack/tree/midi
You'll have to check out or download the zip and build it.

There's a simple example of usage here -
https://github.com/jaudiolibs/examples/blob/jackmidi/src/main/java/org/jaudiolibs/examples/MidiThru.java

Hopefully that'll get you on the right track - let us know how you get on.

Best wishes,

Neil

--
Neil C Smith
Artist : Technologist : Adviser
http://neilcsmith.net

Praxis LIVE - open-source intermedia development - www.praxislive.org
Digital Prisoners - interactive spaces and projections -
www.digitalprisoners.co.uk

Adam Wilhelmi

unread,
Jul 14, 2014, 6:34:26 PM7/14/14
to jaudi...@googlegroups.com
It looks like I've found what I was looking for, thank you for your prompt reply!
I managed to take from the example you linked and created a midi port with which to send the messages.
So far, it seems to forward perfectly to JACK, allowing me to see the messages within Ardour.
I've attached the source for my midi forwarder class to illustrate.
Again, thank you!
MidiForwarder.java
Reply all
Reply to author
Forward
0 new messages