Solved USB MIDI Keyboard Controller And Non USB MIDI



Reaction score: 42
Messages: 99

Let me share an experience with another user:

Problem: USB Akai MPK 25 MIDI keyboard controller, how to get it working ?

First, we need a driver. And for USB audio class devices, a good guy gaves one: snd_uaudio().

Let's clarify things talking about how to do it with non USB MIDI Controllers :

I have a Roland XP-30 synth. It has old MIDI in and out ports (those you need a MIDI cable, get it? I think they still exist!).

Between this synth and my computer, I need a MIDI port. Generally, you find MIDI in/out ports in your audio card (like my old Audiophile 2496, PCI card) or, in modern days, you find one in USB Audio devices.

I'm complicating things now... specially because this audio device needs a drive too! But I'll assume you have a USB supported device, like mine.

What need to be done: to connect the Roland's old fashioned MIDI ports to the MIDI in/out of a USB Audio device (in case, I have a M-AUDIO Fast Track Pro). So, the M-AUDIO is supported by uaudio driver.

Now, install audio/jack_umidi. A very small program that links my synth's MIDI ports to applications.

Now, getting back to USB Akai MPK 25 MIDI keyboard controller :

You don't have physical MIDI ports, but a USB to transfer the raw MIDI data. You gotta make sure that this device is supported by uaudio_driver() :

dmesg | tail right after plug in the USB keyboard/controller.

The ouput command will point you something: if it is supported, what capabilities the device has (from the point of view of the driver support), like does it Play, Record, is a MIDI device...

ugen0.6: <Akai> at usbus0
uaudio0: <Akai Akai MPK25, class 0/0, rev 1.00/1.03, addr 6> on usbus0
uaudio0: No playback.
uaudio0: No recording.
uaudio0: MIDI sequencer.
uaudio0: No HID volume keys found.

Nice, it looks capable to use it as a controller!

Some new nodes were created:

ls /dev/ | grep umidi


Now, start jack server - audio/jack) :

jackd -d oss -r44100 -p256 -n2 -w16 -C/dev/dsp0.0 -P/dev/dsp0.0 &

And audio/jack_umidi :

jack_umidi -d /dev/umidi0.0 -B

Check the presence of the USB Controller using audio/qjackctl or running a CLI utility from jack :

jack_lsp , which outputs, in this particular case:

Akai Akai MPK25 #0:midi.TX
Akai Akai MPK25 #0:midi.RX

Next step is to install some sampler application to get some sound from the USB Controller.

Some sampler Apps:

- audio/linuxsampler

Modular MIDI sampler. You may load GIG files (this is old, but cool)

- audio/gigedit

Edit or create gig files to play with linuxsampler

- audio/qsampler

C++ GUI to linuxsampler


Java GUI to linuxsampler

- audio/bristol this one is very cool!

Bristol is an emulation package for a number of different 'classic' synthesisers.
I recommend start playing with this one, since it has its own sound lib included, you don not need to get some.

- audio/fluidsynth

You need soundfonts (SF2 files). There are editors, but don't know their state for FreeBSD .

If you do not have a or supported controller, or need to test things, part by part, install

- audio/jack-keyboard

A virtual keyboard (GUI). May be used to play, but also to test and isolate bugs or configs during the whole process of configuring your first DAW.

- audio/hydrogen

Drum machine

- audio/musescore
Musical Score/Notation editor.

There are a bunch of other ports , the above list is something I used.

If you have technical problems you may try create a new thread. If no solution (drivers are tricky), try an e-mail to the freebsd multimedia mailing list. This list is very focused on development, but it is open for technical user questions! A skilled developer probably will respond you. Send them the next command output:
Suppose the example above, where dmesg points the device node ugen0.6 ,

usbconfig -d 0.6 dump_all_config_desc

It is really necessary to figure things out.