So, want to add a little tune to your drumming machine? Want something more than just a beeping noise for your robot to produce? Then you have an easy solution!
When the PICAXE 08M chip came out, a play function was added. This allowed you to play one of four pre-programmed tunes built into the PICAXE bootstrap.
Great if you only want four tunes, but what if you want more?
The tune function is great to use because you don't have to
figure out the numerical values of each note to play. Any RTTTL ringtone generator will work.
I was lazy and just copied some RTTL codes from websites. With all the new cellphone technology, RTTTL is completely free and plentiful... and I'm sure there are plenty of programs out there that can help you generate the song you want.
Once you have your code, it's time to start up PICAXE.
Go to the top, choose PICAXE -> Wizards -> Ring Tone Tunes.
Highlight and copy your RTTTL code (title of song and all) from wherever you have the text stored, return to the Programming Editor with the Ring Tone Tunes window open, and paste by hitting Ctrl + P.
The wizard takes all the information and prepares it for you! No work required!
You can from here, change each note separately if you need to, and select which pinout the information goes to. I would also recommend testing your tune in this window by hitting play at the top. This will help since the simulate option slows everything down, including tunes.
From there, you just have to hit the big copy button and the entire code will be saved to your clipboard. It even askes if you'd like to paste it into the current programming window!
It's a simple start, but there's so many possibilities! If you've followed Frits' drum machine instructions, you should already have a speaker hooked up. Let's get some music going!!!
https://www.youtube.com/watch?v=wTXs5z2oF9w