Saturday, 19 May 2012

Arduino Drum kit, part 4 - Arduino considerations

Hello everyone, quick update on this:

I've recently purchased a new Arduino. In this case, Arduino Mini Pro, which is manufactured by SparkFun. I got mine from Proto-Pic. So why did I go for this when I've got a perfectly good Arduino Uno?

Well, a couple of things - the primary reason is that it has more analogue inputs, 8 to be precise. They'd recently been updated to be based on the 328 chip as opposed to the 168, but this latest revision includes the two additional analogue inputs. As each piezo transducer will need an analogue input, effectively each 'drum' needs it's own analogue input. With 6 analogue inputs, this limits the kit to 6 individual instruments. A possible kit would be:
  1. Bass Drum
  2. Snare
  3. Hi-Hat
  4. Crash Cymbal
  5. Tom High
  6. Tom Low
This is a pretty cut down kit. Not exactly terrible, but it would be nice to have more. With two more inputs, a ride cymbal and a floor tom could be added. This covers pretty much all the fundamental parts of a drum kit.

It's important to note that there is slightly more flexibility than at first glance - such things as a hi-hat pedal don't make sense to be implemented with analogue inputs, it's essentially just a lever to open and close the hi-hats. In this system, a simple switch could be attached to a digital input of the arduino which would modify the message being sent as the 'hi-hat' MIDI note to 'open hi-hat' or 'closed hi-hat'. Additionally, some people just plain don't care about dynamics. For those willing to give this up to have a greater range of instruments, a switch or sensor could be wired to a digital input instead. This would mean that when triggered, the MIDI message would have to contain a preset velocity value. Admittedly the way a lot of records are recorded nowadays (specifically metal!) have bass drums recorded at full blast, or are replaced with samples played at full blast. So it may not be such a bad way of approaching things....

Secondly, I have an FTDI USB to TTL converter cable. Programming with this means the Arduino has no requirement for any extra USB circuitry, this cable just plugs straight in to the header on the side. These cables are quite expensive but handy, and quite quickly reduce costs elsewhere. If you intend to make a couple of projects in this way, you would most definitely get your money back by the savings on Arduino boards. And they're used for all sorts of other stuff too!

Thirdly, it's TINY. Which is awesome. A pic for comparison:



That's a 3.5mm jack to 6.35mm plug converter next to it, the actual plug is around 3cm long. So smaller, simpler hardware and with better analogue I/O. What's there to lose? The craftier among you might have noticed I've not actually soldered the headers - I was testing for size :P With the exam period in full swing, time is at a premium, so all progress on this is sadly suspended until exams are done...

2 comments:

  1. Pretty Cool,

    But about the Hi-Hat, I´m exactly looking for a way to make it analog. It´s not just open or close. It can be slightly open, half open, full open and there´s the foot hi-hat.

    For the Ride, there´s also the Bell Ride.

    I´m think about share some analog inputs between piezos to get the velocity, and connect the same piezos each one in a different digital input.

    like this:

    piezo 1: analog 6 / digital 1
    piezo 2: analog 6 / digital 2

    and so on

    Regards,

    Flavio Vargas

    ReplyDelete
    Replies
    1. That's definitely true - a lot of samplers do allow for intermediate levels in between the hi-hat opening and closing. I know for a fact that Toontrack's S2.0 and Native Instruments Studio Drummer have this feature. It is definitely something I would like to implement further down the line!

      I haven't tried out any of this myself as I'm still doing exams and development has halted, but just to throw about some ideas - the system would have to be extended to include two inputs for use with the hats; one which can sense the velocity, and one that can sense how open the hats are. I'm guessing it wouldn't be too hard to maybe modify a pedal of some description with a strain sensor or a potentiometer to generate a range of values between the pedal's up and down positions. This range of values could have a number of thresholds for each level of hi-hat position. This would require and extra analogue input to be used for the hi-hat position control.

      Alternatively, I'm thinking it could be possible to implement a rotary encoder and use that with a number of digital inputs instead of an analogue input - I'm really not sure about this one and would have to experiment with it, I don't have any experience with rotary coders (but I've ordered one to play with recently and it should be on it's way!)

      The point that I'm trying to make (and admittedly, I think I might edit this in later..) is that resource management is important when you have a restricted number of I/O. As each drum/cymbal is going to need it's own analogue input, it's critical to try and make the best of the 8 inputs available. Delegation to digital inputs can be considered if, say, you're in the position where you don't want any velocity control on a certain drum. Some people will be happy with just having open/close hi-hat, and it's kinda up to the individual to assess their own needs and delegate accordingly. But it's definitely a desirable feature to have complete control over the hi-hat.

      And yes, again, you're right about the Bell Ride. Hopefully I can cover these things later in the development.

      Your idea about sharing one analogue input between multiple piezos sounds interesting, but I was wondering whether you were considering any external circuity to implement it? I'm not entirely sure that it would work just by plugging the piezos into one analogue input and adding the digital inputs alongside it - I imagine the scenario where a soft hit might be required, and the voltage provided by the piezos isn't large enough to register as a '1' on the digital inputs, leading to errors. But then again, I might have the wrong idea here, so please correct me if I'm wrong! Discussion is encouraged here, so feel free to make any comments or suggestions!

      Anyway, many thanks for reading!

      - Rob S

      Delete