01.29e-tampourlo

Fig.1 - first attempt
...aka electronic drums
What started as a brief introduction to electronic drums, resulted so far in a proof of concept that is illustrated in the Fig.1. I did not discover the wheel and the effort is successful so far due to the very nice work of Wyatt Olson on his Drum Master.
I was also inspired by Todbot's post, Spooky Arduino Projects #4 – Musical Arduino, to combine arduino and MIDI controls.
My goals were to combine the Drum Master approach to MIDI interfacing and get everything running in my Linux set-up. So no external drum head is needed for MIDI execution, only software that can execute MIDI in Linux, and there is a lot of good stuff out there!
In brief the approach is depicted in the following figure, Fig.2:
For the sake of clarity, I just mention the general principle behind the whole thing, getting into details only to the parts that were not clear to me at first!
So, someone hits a drum-pad, where a piezo sensor detects the hit as an analog signal. The analog signal is filtered and amplified to be transformed to digital in the Arduino. In the Arduino the velocity of the signal is determined and transformed into a MIDI command. Then the command is sent in MIDI format through the USB cable into the Linux PC. There ttymidi (explained later on) provides a virtual midi device in JACK that you can route to your program of choice.
More details behind the concept you can find in Drum Master [1] and todbot [2].
Hardware
I used the filter of Drum Master with all the values that appear on the schematics. My difference so far is that instead of the DG408 Multiplexer I currently use two CD74HC4067 bought from sparkfun [3]. The last is used to connect 16 piezos to 5 pins of the Arduino, 4 digital (control) and one analog (sensors' signal). -Notice: I don't know yet the multiplexer's response in practice, when polling for all sensors. It is a work in progress!
Software
As far as the Arduino code is concerned, it is based on Drum Master and todbot. It is more like a continuous hack!
What might be new, is the communication with the Linux PC - Ubuntu 9.04. To be able to communicate in MIDI, I came accross ttymidi [4]. I just copy from the project's page:
ttymidi is a GPL-licensed program that allows external serial devices to interface with ALSA MIDI applications. The main motivation behind ttymidi was to make Arduino boards talk to MIDI applications without the need to use (or build) any extra hardware.
Getting ttymidi running to your PC is really easy, just lay an eye on README file and follow the steps!
After combining the pieces together, and see through Arduino's environment that we do get the values correctly, we get to the point of running the real thing! I selected Hydrogen [5] as the drum machine and it is a really powerful and simple to use software!
The process to communicate with Hydrogen (or any other MIDI program in Linux):
- Kill all audio applications, including browsers due to Flash. (Pulse problems are not fully resolved, so stay on the safe side)
- Open up a console and fire: $ ttymidi -s /dev/ttyUSB0 (you can always refer to the ttymidi manual for help, the 's' flag is the device and the ttyUSB0 is probably the name of your Arduino under Linux, change in case it differs)
- Open JACKctrl and then keep on a visible space the Connect dialog in the ALSA tab. Now go to Setup. My values are shown in Fig.4, check that the MIDI Driver option is set to none. Press start.
- Open Hydrogen. Go to Preferences-MIDI System and check that Midi driver is ALSA and the input is qjackctl.
- You should now see in the connection dialog, the ttymidi and the left side and the Hydrogen on the right. Connect them and you are ready to rock!
Remarks
There might be an issue with the JACK configuration and the fact that I am using an onboard sound card. I don't have yet prepared proper pads to check latency and fine tune everything, so I didn't dive into tweaking the JACK's default values. Still it is to be checked.
In the video, you can check the response between hitting the piezo and getting the sound from Hydrogen. It is a bit crappy but I hope that the idea is clear enough. Better video is on its way!
The whole project is still under development. This post should lead to a contruction log, so stay tuned and of course comments are always welcome!
Links
[1] - http://drummaster.digitalcave.ca/
[2] - http://todbot.com/blog/2006/10/29/spooky-arduino-projects-4-and-musical-arduino/
[3] - http://www.sparkfun.com/commerce/product_info.php?products_id=9056
[4] - http://www.varal.org/ttymidi/
[5] - http://www.hydrogen-music.org/





Μα τι στην ευχή κάνεις??? Να σε δω με ακουστικά, να κοπανιέσαι μοναχός σου και τι άλλο!!
[Reply]
January 29th, 2010 at 17:47
Για το Rock!!!
Υπάρχει και αυτή η τάση των μηχανικών, να δοκιμάζουν πρώτοι τα κατασκευάσματα, και ότι γίνει!
Σε κάθε περίπτωση έχει πολύ πλάκα να μοιράζεσαι το αποτέλεσμα, όποιο και αν είναι αυτό!
[Reply]
January 30th, 2010 at 13:31
It actually works! And it’s not even optimized yet
Pretty good job there, keep documenting!
-g
[Reply]
February 1st, 2010 at 16:33
Το μόνο που περιμένω είναι πότε θα βγάλεις βιντεάκι που θα λανσάρεις το προϊόν!
http://www.youtube.com/watch?v=JcY2r-sUcHg
keep up the good work!
φιλιά!
[Reply]
June 28th, 2010 at 13:54