thatoneguy
- Joined Feb 19, 2009
- 6,359
When it comes down to it, MIDI and MP3 are "just numbers"....
The hard part will be finding out what the different numbers mean for a note, as well as the timing.
I'd wait for an AVR guy to look at the stripped code to guess the clock speed and method of controlling the speaker, I'd expect one in the inner for loop, but do not see it.
The way it is making a tone is basically turning the speaker off and on <freq> instruction cycles per loop through the program.
Attempting to translate that into Hertz/cycles per second is "The Hard Part". Just as putting an MP3 into memory is easy, but decoding and playing it is The Hard Part.
The hard part will be finding out what the different numbers mean for a note, as well as the timing.
I'd wait for an AVR guy to look at the stripped code to guess the clock speed and method of controlling the speaker, I'd expect one in the inner for loop, but do not see it.
The way it is making a tone is basically turning the speaker off and on <freq> instruction cycles per loop through the program.
Attempting to translate that into Hertz/cycles per second is "The Hard Part". Just as putting an MP3 into memory is easy, but decoding and playing it is The Hard Part.