[Ears breaker] Midi file player on piezo buzzers (up to 15 notes simultaneously)

Hello,

I've finished my first arduino project, and thought I would share the result with you guys !

It is a midi file player, which play notes on piezo buzzers. I've seen quite a few videos playing melodies on piezo buzzers, but it was only playing one or two notes at the same time. My goal was to be able to play many notes simultaneously. Also, I wanted to be able to play any melody without having to hardcode it, so I decided to write a midi file parser.

Basically, what the program does is :

  • Read the files from an SD card and let me pick a midi file (type 0 only)
  • Parse the midi file and send the notes to be played on piezo buzzers

To play up to 15 notes simultaneously :

  • Using the toneLibrary, I'm able to play 5 tones (the arduino mega has 6 timers, but one is used for the millis() function)
  • The rest of the tones are played by 10 PIC microcontrollers. I programmed those to receive a midi note number, and generate a signal to play that note on a piezo buzzer.

Piezo buzzers don't sound very good, so when there are too many notes being played, it can hurt your ears :stuck_out_tongue: But the result is as I expected it, and somehow I love it !

Here you can hear what it sounds like : Arduino- midi file player on piezo buzzers - YouTube

Thanks for watching, and sorry about your ears x)