Skip to Content

USB drum kit

12 replies [Last post]
NgBng
Offline
Joined: 04/17/2010

Has anyone tried a USB drum kit like http://www.gadgets-club.com/usb-roll-up-drum-kit/ with Hydrogen?
I have no idea how the hardware presents itself - HID would make the most sense I think, but who knows.

mauser
Offline
Joined: 03/30/2010

Hi,

it could work if the pad speaks midi - but i don't think it does :)

The most USB/MIDI-Drumcontroller like the Alesis Control Pad are supported by alsa and work out of box.

NgBng
Offline
Joined: 04/17/2010

If it's a simple HID device presumably I could map that to work too?
I'm just curious if anyone has tried these things before I drop some cash on ebay ;)

mips
Offline
Joined: 04/17/2010

i'm trying. i bought that exact thing and i was very disappointed by the windows applications they provide. i wrote a simple app which correctly reads the pads from usb, i just don't know how to send a midi message to hydrogen via jack, maybe someone in here could help :)

mauser
Offline
Joined: 03/30/2010

Hey mips!

hydrogen is using the alsa midi driver, the jack midi driver is not supported at the moment but will be available in future hydrogen version. There is a version with working jackMidi in our svn repository (branch jackMidi ). Please ask on our mailing list for more details !!

mips
Offline
Joined: 04/17/2010

i actually managed to send those midi messages correctly, and i wired up my midi output to hydrogen via a2j_control. now i want to make the usb code a bit better, then i'll release this mini-app. jack is actually very simple :)
i'll checkout the midi version too and see what happens, it will be extra testing in the worst case.

mips
Offline
Joined: 04/17/2010

i did it :)
i created this small application, "jackdrum", which uses libusb to read the drum pads and jack MIDI for output. you can find it at the following url:
http://mips42.altervista.org/jackdrum/jackdrum-1.0a.tar.gz
a README file is included which should explain everything. until Hydrogen starts to listen for jack MIDI we must use a2j_control or something similar to wire jackdrum's output to Hydrogen's input.
let me know what you think

bunny
Offline
Joined: 04/17/2010

Heyas! I am trying to get this to work on OS X. However I am getting the following result:

ERROR: cannot claim the usb interface: Unknown error: 0
ERROR: drumkit initialization failed, shutting down

I hate unknown errors, how can I fix them if I don't know what they are!

Any information would be excellent :D. Thanks.

mips
Offline
Joined: 04/17/2010

I don't really know what that unknown error is, anyway it's basically saying that it cannot claim the interface. That is, my driver is requesting undivided control over the usb device but the system won't comply. My guess is that some other driver has already claimed the interface, so try to unload some. I'm no OS X guru so I can't help you with that. It could also be some weird permission problem, so try and see if the interface can be claimed running jackdrum as root (or whatever the root account is called on OS X)

bunny
Offline
Joined: 04/17/2010

I've run it as root and still no luck.

I don't suppose you mind if I trawl through the code, to try and port it to accommodate OS X's weirdness?

Thanks :D

mips
Offline
Joined: 04/17/2010

the more portable the better, please send it back to me if you get it running, so that i can merge the functionality.

schiavoni
Offline
Joined: 04/17/2010

I made one with Arduino.
I Made With MIDI cable, not USB.

It's very cheap and maybe you can find a microcontroller to do it too.

Soon I'll publish some photos.

Schiavoni

tkirby
Offline
Joined: 04/17/2010

I was trying to get your jackdrum program to work but kept getting.

ERROR: cannot claim the usb interface: Device or resource busy
ERROR: drumkit initialization failed, shutting down

I noticed in your README that it's due to the kernel hid driver is claiming the device when it's plugged. I added the following line to jackdrum.c (line 144) right before it claims the device...

// detach kernel hid driver.
usb_detach_kernel_driver_np(roll_up_drumkit_handle, 0);

and it fixed the problem.

Thanks for a cool hack!