Control Arduino Drumcomputer with USB-Pad-Controller

Hey there folks,

at first sorry for opening a new topic as the search for my particular project didnt help me at all.

Im planning the following:

I wanna build a very simple Drumcomputer without sequencer etc. It just should be able to make some Sound ;). Therefore i am going to save some drumsamples on a sd card and let them "ring" when triggered (Output should be line to connect headphones or a loop machine). While searching for a possibility to control the different samples and trigger them i remebered that i have an unused USB-Pad Controller (AKAI LPD 8 / https://www.thomann.de/de/akai_lpd_8.htm).

My questions are:

  1. Is that possible at all?
    2.Whats the easiest way to connect the usb pad to an arduino and to read the signals it is sending.
  2. I've read something about the teensy, which is delivered with onboard midi support?! Is that exactly the thing i should look for or is it more than i need?

Sorry for those basic questions and my bad english, and thanks for your help :slight_smile:

It's possible.

There are quite a few Arduinos with onboard USB that can support MIDI. Certainly Leonardo and Pro Micro as well as the Teensy range. And there are MIDI libraries to make the programming reasonably easy.

The main problem is finding some way to produce decent audio quality outputs. Most of the common wav file players only handle something like 8bit 16Khz samples. There are probably better quality ones but none that I know.

Steve

Most Arduino's don't have a DAC. I'm not familiar with the Teensy, does it have one? Even if you can get one sound out at a time, I don't know if you can get polyphonic sound. (And, most audio shields only play one file at a time.)

Something like the [u]Raspberry Pi[/u] might work better... It's got USB ports and a soundchip, and I assume you can get MIDI drivers. However I don't know if it has enough processing power. And, since it has a (multitasking) operating system you might run into latency issues (delay in the audio).

I have no idea how well this thing actually works but the specification sounds good https://www.sparkfun.com/products/13660

Steve

Something like the Raspberry Pi might work better It's got USB ports and a soundchip,

Yes it has USB but no there is no sound chip. It has PWM registers a bit like the Arduino for outputting sound.

And, since it has a (multitasking) operating system you might run into latency issues (delay in the audio).

Not so much delays but glitches and crackles unless you program it through some Linux application.

I wrote a "Drum Machine" for The MagPi 54, free download here.

I'm not familiar with the Teensy, does it have one?

Only on the Teensy 3.5 and 3.6, the smaller ones don't. However one big advantage of the Teensy is that it can present both a USB MIDI devive and a USB Serial device at the same time so you can do some debugging print outs, something that is hard to do in a normal MIDI implementation.

Thanks for your answers :slight_smile:

Concerning the ability to play samples, why shouldn't it work?
I've just found this project created with a nano:

If you're happy with 8-bit samples, as in old computer games or Chiptune, then there's no real problem. Even then playing more than sample at time can be quite tricky...e.g. kick, snare and hi-hat all on the same beat.

That ANDI project looks like fun but I can't immediately see if it is polyphonic or if it just plays one thing at a time.

Steve

trigger them i remebered that i have an unused USB-Pad Controller (AKAI LPD 8

2.Whats the easiest way to connect the usb pad to an arduino and to read the signals it is sending.

USB host capability is required to connect the USB drum pad to an Arduino board. Take a look at the following for one way to do this. I do not know if Teensy supports USB host MIDI.

A Raspberry Pi has at least one USB host/OTG port. The bigger boards have 4 ports. There is built-in support for USB MIDI devices as well.

I do not know if Teensy supports USB host MIDI.

It does.

There is built-in support for USB MIDI devices as well.

Well no not exactly built in. It is normally an extension or libiary of the language you are running.