Go Down

Topic: Control Arduino Drumcomputer with USB-Pad-Controller (Read 158 times) previous topic - next topic

Aliachttausend


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.
3. 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 :)

slipstick

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

DVDdoug

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 Raspberry Pi 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).

slipstick

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

Steve

Grumpy_Mike

Quote
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.

Quote
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.

Quote
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.

Aliachttausend

Thanks for your answers :)

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



slipstick

#6
Feb 13, 2018, 05:34 pm Last Edit: Feb 13, 2018, 05:34 pm by slipstick
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


gdsports

Quote
trigger them i remebered that i have an unused USB-Pad Controller (AKAI LPD 8
Quote
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.

https://github.com/felis/USB_Host_Shield_2.0

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.

Grumpy_Mike

Quote
I do not know if Teensy supports USB host MIDI.
It does.

Quote
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.

Go Up