Skip to content

freddyherrera/Invisible-Drum-Set

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Invisible Drum Set

Introduction

This project is a simulation of a drum set using an Arduino Nano and the BNO055 IMU sensor. It allows users to play drums without a physical drum set. The project is primarily developed in C for a course requirement that emphasized writing all libraries from scratch.

drumsticks

Setup

Prerequisites

  • PlatformIO in VScode (or whatever you like)
  • Arduino Nano with Atmega328P (new bootloader)
  • BNO055 IMU

Installation

  1. Clone the repository.
  2. In VScode with PlatformIO, upload the C code to the Arduino Nano.

Usage

  • After uploading main.c, execute the play_sound.py to get audio output.
  • To calibrate, swing the drumsticks in a figure eight motion and then press the button with the drumsticks pointing away from you.
  • The collect_data.c under MAINS pairs with collect_data.py to log IMU data to a .txt file for analysis. The plot3.m matlab file plots the data but you could use whatever program you like.
  • The project also includes foundational C++ code under CPP but this code is really bad in its current state. I began testing the hardware in C++ before refining the method of simulating the drum set in C.

Further Development

  • The latency is not bad but it can be decreased. The python program playing the samples can probably be improved.
  • The conditional logic for determining which sound to play in “main.c” can be fine-tuned and optimized. Currently it is tuned to my left handed playing style.
  • Velocity sensitivity can be added if desired. It requires changing the way communication is handled between the arduino and the python program.
  • Include more error handling.
  • Enhancements or replacement of the custom libraries I created could improve the project's maintainability.

Schematic Diagram

image (6)

Software diagram

image (7)

Contributing

Contributions are welcome! Feel free to fork the project, make changes, and submit a pull request.

Contact

For queries or collaborations, reach out through GitHub issues or email [email protected].

Documentation

Link to Project Report

About

from HafthorArni/Invisible-Drum-Set | Hafþór Árni Hermannsson

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 78.6%
  • C++ 11.6%
  • Python 6.6%
  • MATLAB 3.2%