Here's a bit more detail and sketch links! This is gonna get LONG.
------------------------------------------------
Over the last 3 years I've actively developed an Arduino web service called Miduino (http://world.emotiscope.co/miduino/) that makes it easy for people to automatically convert MIDI music into a ready-made sketch.
This week I've made two major additions to the service:
- Percussion tracking!
Now the only thing setting your Arduino apart from an NES is a proper triangle wave! While it's not fully featured yet for the whole MIDI percussion spectrum, your basic snares, kicks and hi-hats will be joining the music!
- Switch to software-based timing
Originally I collaborated with Len Shustek to tie his Playtune library (https://github.com/LenShustek/arduino-playtune) into the service, but his library requires a hardware timer for each active note - which has it's ups and downs.
With a hardware timer you'll get extremely crisp sound every time, but an Arduino Uno can only play up to 3 notes at once and the original code didn't know what to do with MIDI percussion channels.
Instead, I'm now polling for new notes and their expirations at about 22,050Hz using Timer 1 and generating different types of percussion with some RNG tricks. It's not perfect yet though, some songs need the polling frequency turned down to avoid crashes. (Cut the Arduino some slack, it's not supposed to be good at this!)
Here are two more demos, **and all the sketches to prove it's real!** A new library is in the works, so these are pretty long and ugly for now. (Both songs run at double speed to show off the polling efficiency)
- Van Halen's "Eruption"
https://www.youtube.com/watch?v=29HJzwQ14rs
- Mozart's "Rondo Alla Turca"
https://www.youtube.com/watch?v=_9mFAEJ5aT4
And all the sketches:
Mario:
https://gist.github.com/connornishijima/eb94232ac208d65b964868f05687efb8
Eruption:
https://gist.github.com/connornishijima/8438379d17d5f901e743a7b7dc4582d8
Turkish March:
https://gist.github.com/connornishijima/c9e18d8ab3beff271cc505ac43e6fd2a
And here's a blank one for you to try with your own MIDIs!
Miduino Player: https://gist.github.com/connornishijima/82add47400d60945bbe30205b907b9b1
- Connor Nishijima