Project by Thejasvi Magudilu Vijayaraj and Karthik Raghavan
To compose a MIDI file by using two touchpads emulating a piano.
This MIDI synthesizer is implemented on mbed by using two touchpads. Each touchpad has 12 pads which correspond to 12 different notes in a single octave. So with two touchpads, we have 2 octaves that can be used to compose the song simultaneously. More touchpads can be interfaced to increase the number of octaves available simultaneously.
The basic idea is that mbed captures touch events (pad press and release events) from both the touchpads, notes the difference between the times of different events by using timer and sends a command to the PC via virtual serial port. We have written a C# windows forms application which captures the commands sent by the mbed via virtual serial port and then calculates MIDI delta time, creates the MIDI event and writes it to a file. The application also playbacks the notes when the corresponding pad on the touchpad is hit.
We have also put an LCD which shows the octave number of the touchpads. LCD also displays the FFT of the notes being played. We have provided four pushbuttons to increase or decrease the octave numbers of the touchpads.
- Mbed NXP LPC1768
- MPR121 Capacitive Touch Sensor Breakout Board
- Nokia 6100 LCD
- Push buttons
Code for mbed
This is a MIDI synthesizer with touchpads used for playing the notes. mbed will capture the touchpad press and release events and sends the appropriate MIDI commands to the PC. By using the C# windows forms application created by us, one can compose songs as though they were composed on a piano. We support all types of standard MIDI piano types.
Code for Windows C# application
- MIDI file format
- MIDI file format
- MIDI delta-time calculation
- Piano note information
- Due to the non-availability of the sample note files of different instruments, the current playback in our project is just a sine wave of the given note frequencies. If anyone gets the sample files they can implement real playback feature.
- More touchpads can be interfaced to give the user flexibility of composing with notes at different octaves without using pushbuttons.
- By using MIDI waveform generation techniques, the playback can be implemented on the mbed itself.
1 comment on MIDI sythesizer:
Please log in to post comments.
Sir, Since you have used pc for generating sound coresponding to note pressed. What will be the hardware required ? If a console instrument is to built. As far I know VS1053 chip is suitable for Audio out. Do you know any other chip / or how to interface Sound Blaster card. Regards, Sanjay Limbore reply on firstname.lastname@example.org India.