poco153
Posts: 1
Joined: Tue Aug 07, 2012 12:04 pm

RPi Drum Machine with Hydrogen

Tue Aug 07, 2012 12:33 pm

I've had my pi for about a week now, trying to come up with some brilliant project when it hit me: the Pi would be perfect for running a drum machine.

Background: I have an Alesis DM10 which supports MIDI over USB and also has a documented history of working with Hydrogen. While I consider myself fluent in computers as a whole, I haven't spent much time with Linux, so please forgive me if I ask silly questions while trying to learn :D

I got Hydrogen running on Raspian Wheezy and I got the Pi to communicate with my MIDI input, but so far I have been completely unable to get any sound out of the Pi. The closest I have come is some painful-sounding popping and clicking coming out the analog jack.

My ultimate dream is to have some sort of USB or S/PDIF box that will give me multiple sets of outputs (5+ outputs would be divine; if they were balanced it would be even better) for the different drum voices. This is still a bit of a far-off dream, though, since I can't even get the integrated audio working!

Does anyone have any suggestions on how to get Hydrogen to output audio? And, with my dream in mind, what is the best audio subsystem to use? JACK seems like it is built for what I want, but I haven't found anybody who had success getting JACK running on the Pi yet.

I've done some basic troubleshooting; I can play audio using aplay and omxplayer through both the analog output and the HDMI port.

Sorry if I've been unclear about anything. I'll be more than happy to clarify if I can. Thanks!

Baggypants
Posts: 10
Joined: Tue May 08, 2012 10:46 pm

Re: RPi Drum Machine with Hydrogen

Tue Aug 07, 2012 1:50 pm

You might need to edit your ~/.asoundrc to include emulated mmap support
see here

http://www.raspberrypi.org/phpBB3/viewt ... 40#p139940

have you tried loading one of the demo tracks and playing it? if it works then the issue might be with connecting the DM10 to hydrogen.

However given you've mentioned painful sounding popping it might be because it's a bit much for the rpi to cope with. When I was testing out amsynth the audio went to pieces if I tried playing more than 6 notes at the same time.

CH3ST3R
Posts: 7
Joined: Sun Sep 23, 2012 10:45 pm

Re: RPi Drum Machine with Hydrogen

Sun Sep 23, 2012 11:44 pm

This is awesome I was thinking about a drum machine too! except in a newbie at all this but seems fun. Pretty cool how so many projects can be made from a pi.
Trying to make something awesome even if no one else thinks it is.

pygmy_giant
Posts: 1562
Joined: Sun Mar 04, 2012 12:49 am

Re: RPi Drum Machine with Hydrogen

Sun Sep 23, 2012 11:52 pm

Not strictly relevant but interesting: http://darwintunes.org/ - click the play button... :D
Ostendo ignarus addo scientia.

CH3ST3R
Posts: 7
Joined: Sun Sep 23, 2012 10:45 pm

Re: RPi Drum Machine with Hydrogen

Wed Sep 26, 2012 6:30 pm

pygmy_giant wrote:Not strictly relevant but interesting: http://darwintunes.org/ - click the play button... :D
Very interesting thanx.
Trying to make something awesome even if no one else thinks it is.

hardwired2001
Posts: 24
Joined: Tue Jun 12, 2012 5:11 pm

Re: RPi Drum Machine with Hydrogen

Thu Sep 27, 2012 12:36 pm

I am just about to starting doing an mpc2500/Novation Launchpad type device using jamma illuminated arcade buttons connected into the pi. As I want to learn python, I am going to write the software in it!

CH3ST3R
Posts: 7
Joined: Sun Sep 23, 2012 10:45 pm

Re: RPi Drum Machine with Hydrogen

Fri Sep 28, 2012 1:04 am

I have no idea what that means but sounds awesome!
Trying to make something awesome even if no one else thinks it is.

hardwired2001
Posts: 24
Joined: Tue Jun 12, 2012 5:11 pm

Re: RPi Drum Machine with Hydrogen

Mon Oct 01, 2012 10:50 pm

To cut a long story short its "press button = make noise".
So I have ordered 24 buttons and a USB controller to connect it to the pi. These will go into a gutted ps2. I decided to call the project "PlayPi". While I'm waiting for the buttons to arrive I have started to write a little code.
So far so good, I have a few TR-808 samples and some other samples playing back on key presses. Once I have something proper to show I will post a link.

bald_pig
Posts: 8
Joined: Wed May 09, 2012 11:43 am

Re: RPi Drum Machine with Hydrogen

Thu Oct 04, 2012 10:01 pm

someone else with the same case idea as me :P

hardwired2001
Posts: 24
Joined: Tue Jun 12, 2012 5:11 pm

Re: RPi Drum Machine with Hydrogen

Sun Oct 07, 2012 9:46 pm

I managed to get 21 buttons into mine in the end! Looks cool though!! I have written some python so the samples are trigged on button presses. Just leaning threading now so I get the sequencer going.
The USB led driver for the buttons is £30, so I am going to see if I can do it via gpio.
Attachments
DSC_0354.JPG
DSC_0354.JPG (46.45 KiB) Viewed 8199 times

mitchhenny
Posts: 2
Joined: Fri Feb 15, 2013 11:33 pm

Re: RPi Drum Machine with Hydrogen

Fri Feb 15, 2013 11:36 pm

@Hardwired did you ever finish this project? Do you have a status update? I would like to try something like this.

hardwired2001
Posts: 24
Joined: Tue Jun 12, 2012 5:11 pm

Re: RPi Drum Machine with Hydrogen

Sat Feb 16, 2013 11:39 pm

Not yet, but I am still working on it. Work has been very very busy and I have just finished this, http://www.raspberrypi.org/phpBB3/viewt ... 52#p272652.
So I have moved back to this project again. I was just getting my mpc23017's working this evening only to find the 2nd one is bust. Programming wise I'm about 30% through, about 5-10% away from making some noise. I just need to get pyo going and playing nicely. I will be setting up a small site shortly so I will put a link up here when its ready.

mitchhenny
Posts: 2
Joined: Fri Feb 15, 2013 11:33 pm

Re: RPi Drum Machine with Hydrogen

Mon Feb 18, 2013 3:43 am

That is awesome! Please let me know if you have any videos up or blogs about this project. This is literally the first thing that popped in my head when I heard of the raz pi. I want to make my own mpc that runs vst's.

akavir
Posts: 13
Joined: Tue Feb 12, 2013 5:02 am

Re: RPi Drum Machine with Hydrogen

Mon Feb 18, 2013 4:10 am

mitchhenny wrote: I want to make my own mpc that runs vst's.
Do you mean actual windows VSTs, Linux VSTs, or are you using the term genericly to mean load synth modules?

Good luck if you mean windows VSTs, you've got the uphill battle of your life!

hardwired2001
Posts: 24
Joined: Tue Jun 12, 2012 5:11 pm

Re: RPi Drum Machine with Hydrogen

Sun Mar 10, 2013 10:53 pm

Well here's the first look, sorry in advanced I have a cold, and the video itself is a little blurry at times.
The white button on the top left starts and stops the sequencer thread, the others 23 control what ever options are available in the menu thread, there is a 3rd tread which is a pipe from the usb joystick card that you see when I open the massive/ugly wooded box I built for it. I will be using the ps2 case once I get more buttons. I was sorry I bought the usb joystick card, I found out after I bought it I could have done the same with a .94p MCP23017 rather then a £20 card! I will be using the MCP23017 for the ps2 setup.
There is a lot of work left to do but its up and running......
http://youtu.be/BRF-8e7qvPs


Return to “Graphics, sound and multimedia”