Music with a PICAXE

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.

tunetip_1.png

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!

tunetip_2.png

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

I did a similar thing for

I did a similar thing for the Atom Basic Pro chip, a long time ago. It’s good someone shares this info! Great tutorial.

GobliZ - Check out my robots

cool!I’ll try thatbut I’m a

cool!

I’ll try that

but I’m a total noob at electronics so I have to ask, what’s the capacitor for?

back in this node there was

back in this node there was discussion about it.

For some strange reason the picaxe chip likes to continuously send DC current to the speaker when that is not needed. This continued high on the output pin will eventually burn up the speaker.

The capacitor allows the pulses through to the speaker, but absorbs/blocks the DC current.

Just for a matter of safety, and not having to replace darned burnt out speakers :stuck_out_tongue:

Ah-ha!
Ahha! I can’t help but notice that the tune you used is Take On Me by Ah-ha. I’m certainly impressed!

ah yes, now I rememberthanks

ah yes, now I remember

thanks :slight_smile:

a-ha

as the only Norwegian on this site, I approve.

/ vzz-clck-"Maneuver"

thats cool I want to make
thats cool I want to make the drum machine now. I want to start the YDM but I have some doubt because Fritsl haven’t finish posting everything up. How do you make the motor to tab the same as the music is playing?

Very cool thanks for the tip!
I am incorporating this into Jasper right now… :stuck_out_tongue: