Ever wondered, how does a Octopad really works. Octopads are electronic musical instruments meant to mimic the drums. An Octopad has many outputs.
- AUX
- MIDI
- USB-MIDI
- etc
In this project we are trying to mimic the USB-MIDI based output from an Octopad.
This one -->
What is USB?
USB is 4 wire serial communication protocol. Earlier there were multiple type of connectors present in the market, with each new vendor bringing in their own connector. USB was an effort to unify all the connector.
What is MIDI?
The Musical Instrument Digital Interface (MIDI) is a music transmission and storage standard that was originally developed for digital music synthesized instruments. MIDI fails to convey recorded sound instead, it contains musical notes, durations, and pitch information, which the receiving device can utilize to play music from its sound library.
Whenever a user hits a pad he expects a sound. MIDI based music instruments are pre-recorded voices. Thus each MIDI frame sends 3 data
- Note Hit by User
- Velocity or intensity in which it was hit
- Operation by user(NoteOn, NoteOFF, Pitch Change)
- Channel for which the data is sent.
Data Frame
Status Byte
Note Numbers
This MIDI frame is sent from controller over UART/USB then this messages are parsed by software in laptop. There are many paid and free software to do it. One of the paid software for evaluation I used was Reaper.
Flow Chart
The code reads ADC values using DMA Buffer 0. Then iterates over each pad. If the value is greater than threshold, then it would start the scan mode. In scan mode it will monitors the ADC values for a specified duration and stores the maximum value. After the Scan Phase, based on maximum value observed the velocity value is calculated. Then a NoteOn Command is sent. After this there is a debounce phase between two successful hit. After that DMA is enabled with Buffer1. Till data is updated in Buffer1 data from Buffer0 is processed.
Project Architecture
In this prototype I have used carboard based enclosure over the peizo sensor. and LM358 are present to tackle the impedance mismatch.
Final Demo Video (Not a Good at Rythm :)
This video demonstrates, a simple MIDI implementation which send data to DAW(Reaper) to emulate drums
Some Good References
https://cs.wellesley.edu/cs203/lecture_materials/midi/midi.pdf
https://static.roland.com/assets/media/pdf/SPD-30_e03_W.pdf
Comments