Mario Bros tunes on the PICAXE

oneshot

Member
Im looking to find the source code for the Mario Brothers theme song for PICAXE 08M2 If anyone knows where to find these tunes or other interesting tunes for the PICAXE id like to know of a link where to find them.
 

Haku

Senior Member
There's a bunch of pre-made tunes in the zips in the "Program Files/Programming Editor/music" directory, failing that you can convert RTTTL ringtones into a tune command, but the 'music' it plays leaves a lot to be desired.

Google for some RTTTL ringtones, you're looking for some plain text that looks like this:

Code:
ringtone:d=4,o=5,b=200:8g1, 8a1, 8c2, 8a1, 4e2, 8-, 4e2, 8-, 4.d1, 4-, 8-, 8g1, 8a1, 8c2, 8a1, 4d2, 8-, 4d2, 8-, 4c2, 8b1, 4.a1, 8g1, 8a1, 8c2, 8a1, 2c2, 4d2, 4b1, 4a1, 4.g1, 8-, 4g1, 2d2, 2.c1, 4-, 8g1, 8a1, 8c2, 8a1, 4e2, 8-, 4e2, 8-, 4.d1, 4-, 8-, 8g1, 8a1, 8c2
Copy that & save it as a .txt file, then open the Ring Tone Tunes wizard and then File / Import Ringtone and select the .txt file.
Select the output port and what LED(s) to flash when playing the tune and press the Copy command to copy the resulting code into clipboard and then the program you're working on, you'll end up with this in the code:

Code:
'ringtone
tune c.5, 4, %00000000,($77,$79,$40,$79,$04,$7C,$04,$7C,$32,$3C,$7C,$77,$79,$40,$79,$02,$7C,$02,$7C,$00,$7B,$39,$77,$79,$40,$79,$C0,$02,$3B,$39,$37,$7C,$37,$C2,$F0,$3C,$77,$79,$40,$79,$04,$7C,$04,$7C,$32,$3C,$7C,$77,$79,$40,$79,$C7,$3B,$30,$7B,$39,$77,$79,$40,$79,$C0,$02,$3B,$39,$37,$7C,$37,$C2,$F0)
Upload the program to your Picaxe then sit back and marvel at the sheer digital quality of the reproduction of the type of ringtone that passed away a long long time ago :D
 
Top