Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
USB (MIDI) keyboard howto
View unanswered posts
View posts from last 24 hours

Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message

Joined: 10 May 2003
Posts: 153

PostPosted: Sat Oct 08, 2005 8:34 pm    Post subject: USB (MIDI) keyboard howto Reply with quote

this is a short howto on getting usb keyboards (the music keyboards :wink: ) to work. I will show you how to track your progress in a thingy called jack (audio connection kit). So this is also a basic tutorial for jack.

This howto assumes you have:
- a fairly recent kernel (I've done this with
- a usb/midi keyboard that supports the midi over usb standard, the keyboards usually connect directly to the usb port with a standard usb cable (I use m-audio o2).
- you have already configured alsa for sound output.

1. emerge hotplug if you haven't done so yet. Insert hotplug in the default runlevel by typing "rc-update add hotplug default" and start hotplug manually by typing "/etc/init.d/hotplug start". hotplug is really essential for automated kernel module loading for your keyboard.
2. emerge "jack-audio-connection-kit" and the graphical frontend "qjackctl". JACK is a professional sound daemon system for linux. It allows you to plug and route audio signals through different music programs (such as rosegarden, hydrogen, amsynth and many more). jack also allows you to route MIDI.
== Jack intermezzo (skip if you know how to start jack and know how to connect audio and midi routes in qjackctl) ==
3. graphical: open qjackctl. go to setup and change the following settings: Server path to jackd and Driver to alsa and deselect "realtime" (realtime support for normal users may be available in future kernels). Klick on "ok" and close the window. Klick on "Start", and you have started the sound daemon.
textual: open a terminal window and type "jackd -d alsa". leave terminal window open. start qjackctl. qjackctl automatically connects to the running daemon.
4. Klick on "connect". a routing window will show up with the two options "audio" and "midi". this window is where you can connect audio and midi programs to devices and other programs and build up your routing. change to the midi view. if you haven't got any midi devices you'll see two empty columns.
== Back to basics, kernel etc. ==
5. cd to /usr/src/linux. type "make menuconfig". select these two usb-midi options as a modules (by typing "m"):
5a. the usb audio/midi driver for alsa:
Prompt: USB Audio/MIDI driver
  │   Location:
  │     -> Device Drivers
  │       -> Sound
  │         -> Advanced Linux Sound Architecture
  │           -> USB devices

5b. the usb/midi driver for usb:
Prompt: USB MIDI support
  │   Location:
  │     -> Device Drivers
  │       -> USB support

6. exit menuconfig and save your changes. run "make && make modules_install"
7. insert your usb keyboard and switch it on. hotplug will normally recognise your usb keyboard and load the appropriate kernel modules.
== Back to jack ==
8. go to the qjackctl connection window you opened before and klick on refresh. see your midi keyboard appearing? if yes, then you're free to connect your midi keyboard to any programs that accept midi input over jack (try "amsynth" for some fun stuff).

Notes, additions or corrections? Please add a reply to this post. If you're having trouble with anything please try and be as verbose as possible (dmesg, kernel config etc. are your friend).

geta - pronounced: "djetta"
Back to top
View user's profile Send private message

Joined: 05 Aug 2003
Posts: 325
Location: Norway

PostPosted: Sat Oct 08, 2005 9:04 pm    Post subject: Reply with quote

Thanks for posting this. It will come in handy later when I setup Gentoo as a "studio" for my GF again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum