You Are Here: Home » AVR ATmega Projects » Sound - Audio Projects » MIDI DRUM CONTROLLER USING MEGA 32 MICROCONTROLLER

MIDI DRUM CONTROLLER USING MEGA 32 MICROCONTROLLER




[ INTRODUCTION ]

MIDI Drum Controller

Our Final Project for ECE476 was to build a MIDI drum machine using the MEGA 32 microcontroller. We wanted to make an actual product that can produce “good-quality” percussion sounds. Our drum machine would be played via a keyboard or any sound card with MIDI support.

MIDI DRUM CONTROLLER USING MEGA 32 MICROCONTROLLER




The user would be able to choose from a wide selection of drum types (e.g acoustic, hip-hop), and percussion instruments both common to General MIDI (GM) specifications and native to the Roland RS-70 keyboard. Each drum-pad is fitted with an accelerometer, providing expressive, polyphonic drum play with velocity and volume control. When struck, the drum machine will send the appropriate MIDI messages to the external MIDI sound module. We would also like our drum machine to be able to be capable of short 30 seconds record and playback.

The project was a great learning experience about how music is generated digitally and how we can interface a set of external physical drum-pads to an electronic instrument.

[ DESIGN ]

Project Idea

Initially, we wanted to build a drum machine, which synthesize its own drum-sounds. We then learned about the MIDI protocol and the General MIDI (GM) Drum Specification from a friend who owns a music keyboard. We thought it would be more fun to be able to play “real” percussion sounds by striking physical drum pads instead of playing from the keyboard. Thus, the idea for the “ MIDI drum machine” was born.

Project Structure

An overview of our project setup is as follows:

When a drum-pad is hit, the z-axis accelerometer on the underside of the drum-pad would send an analog voltage waveform to the microcontroller. Using the ADC to track the peak voltage recorded by the drum hit, and de-bounce the “tail”, the microcontroller will then output the appropriate MIDI message through USART to a drum synthesizer or sound module to play the drum sounds. As we are using a Roland RS-70 keyboard as our sound module, we have to write our MIDI messages according to the Roland MIDI Exclusive Format for the keyboard to recognize the MIDI messages to generate the right drum sounds.

Hardware/ software Tradeoffs

Our basic drum-pads provide an alternative way of playing percussion sounds instead of playing from the keyboard. They have limited range of expressive drum performance. The drum-pads have limited velocity and volume control compared to playing percussion sounds on the keyboard. Since our simple drum-pads are small, they would not withstand drum sticks or mallets, but they would provide hours of entertainment of drum playing with fingers or hands.

Standards

MIDI (Musical Instrument Digital Interface)

MIDI is a digital communication language and hardware specification that allows multiple electronic instruments, music controllers, computers and other related devices to communicate with each other within a connected network. We specifically refer to the MIDI 1.0 Specification by the MIDI Manufacturer’s Association, MMA to write our MIDI messages for detection by the RS-70 Sound Synthesizer.

The MIDI messages that are relevant in our project are the note-on, note-off, and program change message. Most MIDI messages consist of three bytes. The first byte is a status byte which identifies the message type such as note on or note off. The second byte is the value of the MIDI note of the drum triggered as shown in the GM Drum Key Map. The third byte is the velocity byte. The velocity byte denotes the loudness of a sounding note. When the velocity byte is zero, it is equivalent to a note off message.

General MIDI

General MIDI

General MIDI (GM) is a standard that assigns 128 instrument patches in a specific order. GM enables musicians to put Program Change messages in their MIDI song files, where the correct or originally intended instruments will be selected to play the song file. The percussive instrument patch relevant to our project is shown in the GM Patch Map with the Program Change number of 113 to 120. These numbers are used in our Program Change MIDI message.

Parts list:

Component

Quantity

Part Number

Source

Price

DIN5 cable

2

CAT# CB-330

allelectronics.com

$3

LCD

1

LCD16X2BL

Futurlec.com

$7.90

Custom PC board

1

Lab

$5

Mega32

1

Lab

$8

Prototype board

1

Lab

$3

Power supply

Lab

$5

SN74LS04

1

Lab

Pushbuttons

1

Lab

Assorted resistors and capacitors

Lab

Accelerometers (Motorola)

4

MMA1220D

Lab*

MIDI keyboard

1

Borrowed

TOTAL COST: $31.90

For more detail: MIDI DRUM CONTROLLER

This free embedded project also found using:

  • avr drum pad

About The Author

Number of Entries : 6710

Leave a Comment

You must be logged in to post a comment.

Read previous post:
Inverted Pendulum Balancer Using Atmel Mega32

Introduction The goal of this project was to build and implement an inverted pendulum balancer, in the vertical two dimensional...

Close
Scroll to top