[Howto] Launchpad + Linux

For those interested in using the Novation Launchpad with linux, I wrote a small program + library to register the launchpad as a regular ALSA midi device.

  1. get the sources
  2. make clean && make lpmidi
  3. plug your launchpad
  4. sudo ./lpmidi

Et voilà ! you should see a new alsa midi device. I’ve just tried it with Duplex and the Tone Matrix, it’s all good.

Cool!..

It probably won’t be a too odd idea to somehow bundle this with Duplex…

+1 for this idea.

some news. now there are two apps: lpmidi and lposc. lpmidi is still doing the same thing.

as the name suggests, lposc allows you to communicate with the launchpad through osc messages. I need to add some documentation though:

  
/lp/matrix iii (row, col, velocity)  
/lp/scene ii (row, velocity)  
/lp/ctrl ii (col, velocity)  
  

I’m SO excited about this. Finally, a way for me to perform live in Renoise on Linux.
And the Launchpad is extremely affordable too.

novation launchpad linux midi support…

To run the launchpad as a native kernel rawmidi device, patch you linux source code like this: Paste.to

This patch will be going upstream with the next linux/alsa release…

Kind regards,
Jakob

@koppi: nice! much more elegant than my userspace program, I must say.

Here is the alsa upstream patch:

http://git.alsa-project.org/?p=alsa-kernel.git;a=commit;h=46cff8b5eb3f5d7d0dd2660a2620572cef43bb3c

So, in the next kernel release, this patch will be included?

Good question, really don’t know how the alsa devs handle their patch queue.

Perhaps it gets included in 2.6.36. Let’s wait and see.

Would be nice to see it included in 2.6.36, but I have doubts … the final version was released last week, which mean the merge window has been closed for quite some time.

hey, stupid question, but … do you know how to apply this patch ? I’d like to try it.

EDIT: okay, got it.

  1. grab the patch here http://git.alsa-project.org/?p=alsa-kernel.git;a=commitdiff_plain;h=46cff8b5eb3f5d7d0dd2660a2620572cef43bb3c

  2. apply the patch to the kernel sourcecode with the following command:

git apply thepatch.patch  
  1. compile

did someone manage to and can tell me how to edit the lua files,
so the communication with my launchpad works both ways?

i changed the device name to “launchpad: out” and it works,
but well… only in one direction since there are two ports.

with the standard option, the launchpad did not get recognised.

I get the following error when running make:

~/Downloads/jiyunatori-launchpad-fc863d9$ make
gcc -lusb-1.0 -lpthread -lasound -o lpmidi lpmidi.c liblaunchpad.c
In file included from lpmidi.c:27:
liblaunchpad.h:30: fatal error: libusb-1.0/libusb.h: No such file or directory
compilation terminated.
In file included from liblaunchpad.c:27:
liblaunchpad.h:30: fatal error: libusb-1.0/libusb.h: No such file or directory
compilation terminated.
make: *** [lpmidi] Error 1

No idea where to grab libusb from. It’s installed on my system already. :(

Do you have libusb-dev installed?

Yes, do I somehow have to bring libusb-1.0/libusb.h to the folder that I’m running make?
:huh:

I kept having the same problems… Here’s how I got it to work, thank to: LibUSB Dev - compiling source with libusb http://bit.ly/hGqMUs

  
 sudo apt-get install libusb-1.0-0  
 sudo apt-get install libusb-1.0-0-dev  

Then I was getting another error: ```
lpmidi.c:28: fatal error: alsa/asoundlib.h: No such file or directory

Which resolved thanks to: [What package does this file belong to? | soledad penadés](http://bit.ly/ibSVIe) [http://bit.ly/ibSVIe](http://bit.ly/ibSVIe)  

sudo apt-get install libasound2-dev

  
  
After that the   

make clean
make lpmidi

worked fine! Now I'm off to test it all out a bit more!  
Good luck