bluszcz
bluszcz

Reputation: 4128

How to detect specific MIDI controller in Java MIDI?

I am experimenting with following code:

http://www.jsresources.org/examples/MidiNote.java.html

to operate my Novation Launchpad MIDI Controller.

Basically I am interested in turning on the leds just sending MIDI notes/cc.

And this part works - after changing the code to send proper MIDI to Launchpad - I am able to achieve my effect. However, it works only when I am using default MIDI device.

I would like to code detecting Lanchpad withing Java code and send signals directly to them..

I hope its clear enough :)

Upvotes: 3

Views: 1358

Answers (1)

Aries
Aries

Reputation: 353

As others suggest, you could detect this by device name from USB bus. For this there is a project http://javax-usb.org. Its last release is from 2008 so I am not sure how much usable or alive it is.

I had look at Launchpad Programmers Reference (available in Launchpad downloads) where there is no mention of SysEx for discovery.

If you do not want to tamper with USB and if you satisfy with "half-automatic" detection, you could ask user to press a button on launchpad and then listen on all MIDI devices to messages 90 (note on) or B0 (control change) that generate buttons (Launchpad Programmers Reference, page 11). From which interface the message comes, that is connected Launchpad.

You could get better result with B0 message, as this is Control Change and its values range on Launchpad from 68-6F (hex) and this is more specific to the controller than note on message.

Upvotes: 1

Related Questions