MIDI Just Works With Rasbpian

Last modified by Site Administrator on 2015/03/01 03:02

In case anybody gets a hankering to plug-in-to-pi some of their known-working USB MIDI and audio gear they might have laying about: consider the case of the AKAI  Professional M.I. Corp. LPK25 MIDI Keyboard and the amazing Ebay-special (because Windows and Mac drivers no longer available for it, but open-source lives forever...) Emagic Soft- und Hardware GmbH MT4...

pi@rpi ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 004: ID 047d:101f Kensington PocketMouse Pro
Bus 001 Device 006: ID 09e8:0076 AKAI  Professional M.I. Corp. LPK25 MIDI Keyboard
pi@rpi ~ $ aplay -L
null
    Discard all samples (playback) or generate zero samples (capture)
default:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
sysdefault:CARD=ALSA
    bcm2835 ALSA, bcm2835 ALSA
    Default Audio Device
default:CARD=LPK25
    Default Audio Device
sysdefault:CARD=LPK25
    Default Audio Device

pi@rpi ~ $ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: ALSA [bcm2835 ALSA], device 0: bcm2835 ALSA [bcm2835 ALSA]
  Subdevices: 8/8
  Subdevice #0: subdevice #0
  Subdevice #1: subdevice #1
  Subdevice #2: subdevice #2
  Subdevice #3: subdevice #3
  Subdevice #4: subdevice #4
  Subdevice #5: subdevice #5
  Subdevice #6: subdevice #6
  Subdevice #7: subdevice #7

pi@rpi ~ $ arecordmidi -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 20:0    LPK25                            LPK25 MIDI 1
                  LPK25 MIDI 1
pi@rpi ~ $ arecordmidi --port 20:0 foo.mid
 
pi@rpi ~ $ lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp. 
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. 
Bus 001 Device 010: ID 086a:0003 Emagic Soft- und Hardware GmbH MT4
Bus 001 Device 006: ID 09e8:0076 AKAI  Professional M.I. Corp. LPK25 MIDI Keyboard
pi@rpi ~ $ aplaymidi -l
 Port    Client name                      Port name
 14:0    Midi Through                     Midi Through Port-0
 20:0    LPK25                            LPK25 MIDI 1
 24:0    MT4                              MT4 MIDI 1
 24:1    MT4                              MT4 MIDI 2
 24:2    MT4                              MT4 MIDI 3
 24:3    MT4                              MT4 MIDI 4
 24:4    MT4                              MT4 Broadcast

Install qjackctl, patchage, etc

Getting basic ALSA and Jack MIDI routing working via patchage and qjackctl

pi@rpi ~ $ sudo apt-get install patchage
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  jackd jackd2 libart-2.0-2 libatkmm-1.6-1 libcairomm-1.0-1 libcdt4
  libflowcanvas5 libglademm-2.4-1c2a libglibmm-2.4-1c2a libgnomecanvas2-0
  libgnomecanvas2-common libgnomecanvasmm-2.6-1c2a libgraph4 libgtkmm-2.4-1c2a
  libgvc5 libpangomm-1.4-1 libpathplan4 libraul10 libxdot4 qjackctl
Suggested packages:
  jack-tools meterbridge ladish pulseaudio-utils
The following NEW packages will be installed:
  jackd jackd2 libart-2.0-2 libatkmm-1.6-1 libcairomm-1.0-1 libcdt4
  libflowcanvas5 libglademm-2.4-1c2a libglibmm-2.4-1c2a libgnomecanvas2-0
  libgnomecanvas2-common libgnomecanvasmm-2.6-1c2a libgraph4 libgtkmm-2.4-1c2a
  libgvc5 libpangomm-1.4-1 libpathplan4 libraul10 libxdot4 patchage qjackctl
0 upgraded, 21 newly installed, 0 to remove and 0 not upgraded.
Need to get 4,557 kB of archives.

After this operation, 14.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main jackd2 armhf 1.9.8~dfsg.4+20120529git007cdc37-1 [644 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libart-2.0-2 armhf 2.3.21-2 [63.8 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libglibmm-2.4-1c2a armhf 2.32.0-1 [541 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main jackd all 5 [2,020 B]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libatkmm-1.6-1 armhf 2.22.6-1 [70.7 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libcairomm-1.0-1 armhf 1.10.0-1 [68.6 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libcdt4 armhf 2.26.3-10+rpi1 [58.3 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpangomm-1.4-1 armhf 2.28.4-1 [57.1 kB]
Get:9 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgtkmm-2.4-1c2a armhf 1:2.24.2-1 [1,010 kB]
Get:10 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libglademm-2.4-1c2a armhf 2.6.7-2 [25.2 kB]
Get:11 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgnomecanvas2-common all 2.30.3-1 [177 kB]
Get:12 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgnomecanvas2-0 armhf 2.30.3-1 [114 kB]
Get:13 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgnomecanvasmm-2.6-1c2a armhf 2.26.0-1 [73.2 kB]
Get:14 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgraph4 armhf 2.26.3-10+rpi1 [69.9 kB]
Get:15 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libpathplan4 armhf 2.26.3-10+rpi1 [63.4 kB]
Get:16 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libxdot4 armhf 2.26.3-10+rpi1 [53.5 kB]
Get:17 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libgvc5 armhf 2.26.3-10+rpi1 [496 kB]
Get:18 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libflowcanvas5 armhf 0.7.1+dfsg0-0.2 [135 kB]
Get:19 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libraul10 armhf 0.8.0+dfsg0-0.1 [52.6 kB]
Get:20 http://mirrordirector.raspbian.org/raspbian/ wheezy/main patchage armhf 0.5.0+dfsg0-0.1 [204 kB]
Get:21 http://mirrordirector.raspbian.org/raspbian/ wheezy/main qjackctl armhf 0.3.9-2 [578 kB]
Fetched 4,557 kB in 14s (307 kB/s)                                             
Preconfiguring packages ...
Selecting previously unselected package jackd2.
(Reading database ... 75532 files and directories currently installed.)
Unpacking jackd2 (from .../jackd2_1.9.8~dfsg.4+20120529git007cdc37-1_armhf.deb) ...
Selecting previously unselected package libart-2.0-2:armhf.
Unpacking libart-2.0-2:armhf (from .../libart-2.0-2_2.3.21-2_armhf.deb) ...
Selecting previously unselected package libglibmm-2.4-1c2a:armhf.
Unpacking libglibmm-2.4-1c2a:armhf (from .../libglibmm-2.4-1c2a_2.32.0-1_armhf.deb) ...
Selecting previously unselected package jackd.
Unpacking jackd (from .../apt/archives/jackd_5_all.deb) ...
Selecting previously unselected package libatkmm-1.6-1.
Unpacking libatkmm-1.6-1 (from .../libatkmm-1.6-1_2.22.6-1_armhf.deb) ...
Selecting previously unselected package libcairomm-1.0-1.
Unpacking libcairomm-1.0-1 (from .../libcairomm-1.0-1_1.10.0-1_armhf.deb) ...
Selecting previously unselected package libcdt4.
Unpacking libcdt4 (from .../libcdt4_2.26.3-10+rpi1_armhf.deb) ...
Selecting previously unselected package libpangomm-1.4-1.
Unpacking libpangomm-1.4-1 (from .../libpangomm-1.4-1_2.28.4-1_armhf.deb) ...
Selecting previously unselected package libgtkmm-2.4-1c2a.
Unpacking libgtkmm-2.4-1c2a (from .../libgtkmm-2.4-1c2a_1%3a2.24.2-1_armhf.deb) ...
Selecting previously unselected package libglademm-2.4-1c2a.
Unpacking libglademm-2.4-1c2a (from .../libglademm-2.4-1c2a_2.6.7-2_armhf.deb) ...
Selecting previously unselected package libgnomecanvas2-common.
Unpacking libgnomecanvas2-common (from .../libgnomecanvas2-common_2.30.3-1_all.deb) ...
Selecting previously unselected package libgnomecanvas2-0.
Unpacking libgnomecanvas2-0 (from .../libgnomecanvas2-0_2.30.3-1_armhf.deb) ...
Selecting previously unselected package libgnomecanvasmm-2.6-1c2a.
Unpacking libgnomecanvasmm-2.6-1c2a (from .../libgnomecanvasmm-2.6-1c2a_2.26.0-1_armhf.deb) ...
Selecting previously unselected package libgraph4.
Unpacking libgraph4 (from .../libgraph4_2.26.3-10+rpi1_armhf.deb) ...
Selecting previously unselected package libpathplan4.
Unpacking libpathplan4 (from .../libpathplan4_2.26.3-10+rpi1_armhf.deb) ...
Selecting previously unselected package libxdot4.
Unpacking libxdot4 (from .../libxdot4_2.26.3-10+rpi1_armhf.deb) ...
Selecting previously unselected package libgvc5.
Unpacking libgvc5 (from .../libgvc5_2.26.3-10+rpi1_armhf.deb) ...
Selecting previously unselected package libflowcanvas5.
Unpacking libflowcanvas5 (from .../libflowcanvas5_0.7.1+dfsg0-0.2_armhf.deb) ...
Selecting previously unselected package libraul10.
Unpacking libraul10 (from .../libraul10_0.8.0+dfsg0-0.1_armhf.deb) ...
Selecting previously unselected package patchage.
Unpacking patchage (from .../patchage_0.5.0+dfsg0-0.1_armhf.deb) ...
Selecting previously unselected package qjackctl.
Unpacking qjackctl (from .../qjackctl_0.3.9-2_armhf.deb) ...
Processing triggers for man-db ...
Processing triggers for desktop-file-utils ...
Processing triggers for hicolor-icon-theme ...
Setting up jackd2 (1.9.8~dfsg.4+20120529git007cdc37-1) ...
Setting up libart-2.0-2:armhf (2.3.21-2) ...
Setting up libglibmm-2.4-1c2a:armhf (2.32.0-1) ...
Setting up jackd (5) ...
Setting up libatkmm-1.6-1 (2.22.6-1) ...
Setting up libcairomm-1.0-1 (1.10.0-1) ...
Setting up libcdt4 (2.26.3-10+rpi1) ...
Setting up libpangomm-1.4-1 (2.28.4-1) ...
Setting up libgtkmm-2.4-1c2a (1:2.24.2-1) ...
Setting up libglademm-2.4-1c2a (2.6.7-2) ...
Setting up libgnomecanvas2-common (2.30.3-1) ...
Setting up libgnomecanvas2-0 (2.30.3-1) ...
Setting up libgnomecanvasmm-2.6-1c2a (2.26.0-1) ...
Setting up libgraph4 (2.26.3-10+rpi1) ...
Setting up libpathplan4 (2.26.3-10+rpi1) ...
Setting up libxdot4 (2.26.3-10+rpi1) ...
Setting up libgvc5 (2.26.3-10+rpi1) ...
Setting up libflowcanvas5 (0.7.1+dfsg0-0.2) ...
Setting up libraul10 (0.8.0+dfsg0-0.1) ...
Setting up patchage (0.5.0+dfsg0-0.1) ...
Setting up qjackctl (0.3.9-2) ...

Install qsynth etc

Since qjackctl works well (patchage, not so well...), time to try qsynth to see if I can get sound out:

pi@rpi ~ $ sudo apt-get install qsynth
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  fluid-soundfont-gm libfluidsynth1
Suggested packages:
  fluid-soundfont-gs fluidsynth timidity
The following NEW packages will be installed:
  fluid-soundfont-gm libfluidsynth1 qsynth
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 119 MB of archives.
After this operation, 150 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libfluidsynth1 armhf 1.1.5-2 [167 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main fluid-soundfont-gm all 3.1-5 [119 MB]
53% [2 fluid-soundfont-gm 63.1 MB/119 MB 53%]                 287 kB/s 3min 14s
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main qsynth armhf 0.3.6-2 [268 kB]
Fetched 119 MB in 6min 46s (293 kB/s)                                          
Selecting previously unselected package libfluidsynth1:armhf.
(Reading database ... 75913 files and directories currently installed.)
Unpacking libfluidsynth1:armhf (from .../libfluidsynth1_1.1.5-2_armhf.deb) ...
Selecting previously unselected package fluid-soundfont-gm.
Unpacking fluid-soundfont-gm (from .../fluid-soundfont-gm_3.1-5_all.deb) ...
Selecting previously unselected package qsynth.
Unpacking qsynth (from .../qsynth_0.3.6-2_armhf.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for man-db ...
Setting up libfluidsynth1:armhf (1.1.5-2) ...
Setting up fluid-soundfont-gm (3.1-5) ...
Setting up qsynth (0.3.6-2) ...

Install qtractor

Well since I was able to play single or double-polyphony pianos from LPK-25 keyboard to qsynth, time for qtractor:

pi@rpi ~ $ sudo apt-get install qtractor
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  liblilv-0-0 liblo7 librubberband2 libserd-0-0 libsord-0-0 libsratom-0-0
  libsuil-0-0
Suggested packages:
  liblo-dev serdi sordi
The following NEW packages will be installed:
  liblilv-0-0 liblo7 librubberband2 libserd-0-0 libsord-0-0 libsratom-0-0
  libsuil-0-0 qtractor
0 upgraded, 8 newly installed, 0 to remove and 0 not upgraded.
Need to get 1,459 kB of archives.
After this operation, 4,595 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libserd-0-0 armhf 0.14.0~dfsg0-2 [28.7 kB]
Get:2 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libsord-0-0 armhf 0.8.0~dfsg0-1 [16.4 kB]
Get:3 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libsratom-0-0 armhf 0.2.0~dfsg0-1 [12.4 kB]
Get:4 http://mirrordirector.raspbian.org/raspbian/ wheezy/main libsuil-0-0 armhf 0.6.4~dfsg0-1 [7,548 B]
Get:5 http://mirrordirector.raspbian.org/raspbian/ wheezy/main liblilv-0-0 armhf 0.14.2~dfsg0-4 [36.8 kB]
Get:6 http://mirrordirector.raspbian.org/raspbian/ wheezy/main liblo7 armhf 0.26~repack-7 [40.9 kB]
Get:7 http://mirrordirector.raspbian.org/raspbian/ wheezy/main librubberband2 armhf 1.3-1.3 [64.6 kB]
Get:8 http://mirrordirector.raspbian.org/raspbian/ wheezy/main qtractor armhf 0.5.5-1 [1,252 kB]
Fetched 1,459 kB in 6s (239 kB/s)                                              
Selecting previously unselected package libserd-0-0:armhf.
(Reading database ... 75963 files and directories currently installed.)
Unpacking libserd-0-0:armhf (from .../libserd-0-0_0.14.0~dfsg0-2_armhf.deb) ...
Selecting previously unselected package libsord-0-0:armhf.
Unpacking libsord-0-0:armhf (from .../libsord-0-0_0.8.0~dfsg0-1_armhf.deb) ...
Selecting previously unselected package libsratom-0-0:armhf.
Unpacking libsratom-0-0:armhf (from .../libsratom-0-0_0.2.0~dfsg0-1_armhf.deb) ...
Selecting previously unselected package libsuil-0-0:armhf.
Unpacking libsuil-0-0:armhf (from .../libsuil-0-0_0.6.4~dfsg0-1_armhf.deb) ...
Selecting previously unselected package liblilv-0-0.
Unpacking liblilv-0-0 (from .../liblilv-0-0_0.14.2~dfsg0-4_armhf.deb) ...
Selecting previously unselected package liblo7.
Unpacking liblo7 (from .../liblo7_0.26~repack-7_armhf.deb) ...
Selecting previously unselected package librubberband2.
Unpacking librubberband2 (from .../librubberband2_1.3-1.3_armhf.deb) ...
Selecting previously unselected package qtractor.
Unpacking qtractor (from .../qtractor_0.5.5-1_armhf.deb) ...
Processing triggers for desktop-file-utils ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Setting up libserd-0-0:armhf (0.14.0~dfsg0-2) ...
Setting up libsord-0-0:armhf (0.8.0~dfsg0-1) ...
Setting up libsratom-0-0:armhf (0.2.0~dfsg0-1) ...
Setting up libsuil-0-0:armhf (0.6.4~dfsg0-1) ...
Setting up liblilv-0-0 (0.14.2~dfsg0-4) ...
Setting up liblo7 (0.26~repack-7) ...
Setting up librubberband2 (1.3-1.3) ...
Setting up qtractor (0.5.5-1) ...
Tags:
Created by Site Administrator on 2012/08/03 05:35
    
This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.4.4 - Documentation