Hello all,
I am currently building a MIDI controlled air-drum. The idea is to be able to play a virtual drum kit by sensing motion. To this effect, I have an MPU-9250 9-axis IMU/Magnemeter mounted to the drumsticks to determine velocity and position.
My strategy is as follows:
Divide the space in front of the player into three zone
Zone 1: Hi hat, crash cymbal
Zone 2: Snare, Tom
Zone 3: Floor tom, ride cymbal
- First determine that a hit occurred
- Then determine which zone the hit occurred in
- Then determine the angle of the stick to determine which of the two instruments in the zone will be played
- Trigger the corresponding MIDI note.
I can reliably determine the actual hit and the position of the incline of the drum stick using accelerometer and gyro values, however, I am having trouble determining which zone I am currently in.
I tried magnetometer readings, tried to calculate displacement but so far I didn't find any reliable way to do this. The reading doesn't need to be very accurate, all I need to know if I am within certain zone or not.
Any input would be much appreciated.
Here is a link to an explanation of zones I mentioned earlier, please note that angle values are approximate only.
https://drive.google.com/file/d/1Ngm2ukKMFZm3oX6fXNDYQw__8D0f0nz4/view?usp=sharing