Hi there, I was trying to make a music box with a microcontroller as already seen on had and found I had trouble understanding the source code. Long story short it didn't work, so I made some experiments on my computer instead of the micro, it's easier to debug and it's faster to tinker with the parameters.
Here's the result, I kept the python scripts from the other project, changed the tune for Amelie Poulain's waltz.
The code is now easier to adapt and understand (IMOO), you can easily change the sample rate and envelope duration.
I generated an ogg file but had won't allow me to attach it.
You'll need sox to convert the raw signed 8 bit generated file to wav.
Next step is to try it on an arduino or my freshly received launchpad.
- (32.75 KiB) Downloaded 84 times