Nyanduino and NyanduinoDesktopClient
So a couple of days ago, Carl, Griff and I were kicking around some ideas in E6A.256 (the MECH room) at MQ.
Long story short, I decided to come up with a way to fire off an LED based upon a MIDI note using Arduino.
Sadly, MIDI proved too difficult to implement in that space of time, and the lack of RAM (~ 1k of SRAM on an Atmel ATmega 328, ~512bytes on a '168). I'd have to come up with some way of paging a MIDI track, which at my level of programming skills is possible, but not likely to happen at the same time as all the other constraints I placed on myself.
MIDI will come in the 1.0 release; but right now, it's hovering at 0.1 and is probably deserving of a 0.2 version bump.
What is Nyanduino?
It's basically a combined music sequencer and synthesizer.
The sequence is defined in an array of structs; and each struct is made up of 2 bytes:
1st byte determines the note to be played
2nd byte determines the length (in millis) the note shall be played for.
This format proves very important because it allows for ~500 notes to be loaded into the RAM of an Arduino and played back. This is proven with the Nyan Cat song at about 420 notes.
What is NyanduinoDesktopClient?
Well - my local electronics store isn't open 25/8 like us engineering students are; so I decided to use my PC as a method of sound synthesis. I had the Arduino board, but no LEDs or piezo buzzers around to be able to test the hardware. So a software test is in order.
Nyanduino debug was provided by a serial interface; this was easily changed into a csv format that could be played at 115k into a PC running a Processing sketch that simply generates tones based on the 2 numbers; midi note number, and, length. It also generates a colour based on the note.
It couldn't be much simpler than that. Give the code a look in:
https://github.com/carneeki/Nyanduino
https://github.com/carneeki/NyanduinoDesktopClient
Or checkout my Youtube Video.
- Tags:
- carneeki's blog
- Login to post comments
