I am not a big fan of programming. I may like it but, I try to keep it down to a 555 timer like in this ible. However, when it comes to synths, well, I just NEED programming. One day, while exploring Synthesizers, I came across something known as chiptunes.

I decided to listen and found the music just totally awesome. And so I tried to make it with Arduino. Unfortunately, it didn't fit the Arduino code. Fortunately, Stimmer in the Arduino Forums had ported Linus Åkesson's Hardware Chiptune Project and made it to fit the Arduino.

UPDATE: THERE HAS BEEN AN UPDATE TO THE CODE. REPROGRAM THE ARDUINO WITH THE NEW CODE AND PUT AN LED ON PIN 12 AND PIN 10 (WITH RESISTORS) AND THEY WILL PLAY ALONG WITH THE "DRUMS"

And now, here is that project.


 
Remove these adsRemove these ads by Signing Up

Step 1: Gains and Losses.

You will gain:
A machine capable of playing a tune every time you push a button to activate it.

You will lose: (Materials)
An Arduino
A speaker+possibly an amp
2 jumper wires (If your speaker doesn't already have them)
 
blinkyblinky (author) in reply to Axlzero451Dec 18, 2011. 6:23 PM
Well...enjoy!


I couldn't get the LEDs though...


teknohawk says: May 20, 2013. 7:43 PM
I want the entire song to start over. Thanks.
teknohawk says: May 13, 2013. 3:40 PM
I am absolutely astounded! I cannot believe this amazing Instructable. One question though, is there a way to add a "void loop() {" Function? If so, can you please tell me how?
blinkyblinky (author) in reply to teknohawkMay 13, 2013. 4:31 PM
Do you want the song to loop itself or do you just want a void loop?
aaronXtreme says: Apr 9, 2013. 12:43 PM
the code did not work.it plays for out 3 seconds the makes a fuzzy sound that doesnt end.
is he code mesed up or what. help.
tim127 says: Jan 22, 2012. 3:47 PM
Couldn't you just plug in a 1/4in guitar cable with the wire exposed on one end for an amp?
blinkyblinky (author) in reply to tim127Mar 30, 2013. 4:19 PM
Further later on, I did just that except with the 3.5mm cable.
freakbyte says: Oct 29, 2012. 5:23 PM
Hi, I just wanted to thank you for this, and say that the leds are on pin 12 and 10 if you didn't know already. Just found out while looking trough the code :)
powerman666 says: Aug 29, 2012. 9:15 PM
How do you generate the data for the songs? I have a great Idea for storing them on an SD card for playback.
origamic12 says: Apr 4, 2012. 3:39 PM
Nice. I got it to work.
blinkyblinky (author) in reply to origamic12Apr 4, 2012. 4:57 PM
You're welcome.
Higgs Boson says: Jan 14, 2012. 4:18 PM
this was very cool. I cannot imagine having to write out all of the code. Thank god for copy paste.
blinkyblinky (author) in reply to Higgs BosonJan 14, 2012. 4:31 PM
I know right? I am not the writer, though. The Arduino code is by Stimmer in the Arduino Forums.
Axlzero451 says: Dec 18, 2011. 6:10 PM
I instantly recognized the song the second it started in the video. I've been wanting to build one of those for years now. For all those who haven't heard of this before: http://www.youtube.com/watch?v=_uU4BzSQQmY
Bongmaster says: Dec 11, 2011. 7:10 PM
neat
where did u get the code?
blinkyblinky (author) in reply to BongmasterDec 11, 2011. 7:41 PM
In a mystical book in my basement that writes code for me.

Just kidding.

I got it in the Arduino forums.
Bongmaster in reply to blinkyblinkyDec 12, 2011. 12:19 AM
kool.
linky?
blinkyblinky (author) in reply to BongmasterDec 12, 2011. 10:36 AM
The code is right here in my ible. Why do you need the link?
Bongmaster in reply to blinkyblinkyDec 12, 2011. 12:54 PM
to the forum topic, wanted to know more about the thing.
doesnt matter, did some looking about and found the origonal project :)
blinkyblinky (author) in reply to BongmasterDec 12, 2011. 1:24 PM
Good for you. :-)
therobomaker says: Dec 11, 2011. 3:56 PM
Cool.
blinkyblinky (author) in reply to therobomakerDec 11, 2011. 3:57 PM
Thank you.
randofo says: Dec 11, 2011. 10:01 AM
Very awesome.

You need to add a VCF next or at least a simple low pass filter. Check out the right side of this schematic.

You can simply make buy an 1/8" plug from Radioshack and solder two wires onto it. Then, get a small test amp from Radioshack (about $15) and plug the jack into that.

Also, check out the book Handmade Electronic Music if you have not done so already.

blinkyblinky (author) in reply to randofoDec 11, 2011. 2:32 PM
Yeah, I have an amp...I also have the jack...just didn't know how to explain on my ible.
randofo in reply to randofoDec 11, 2011. 10:04 AM
Also, where is the song data from? How was it generated?
Ora in reply to randofoDec 12, 2011. 10:17 PM
This is the original project that this is a ported version of: http://www.linusakesson.net/hardware/chiptune.php

Here's the thread with the port: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1265488118

I tried downloading the tracker from the original project page, but I have no idea how to actually get the tracker to run...
blinkyblinky (author) in reply to OraAug 21, 2012. 8:07 AM
You need a Linux OS like Ubuntu or similar. I am running OpenSuse 11.3 but it should be very similar. You will need to install libSDL next. Then Open a terminal and use the 'change directory' command (cd) to get to where you hid the file on your computer. Next go to the same place using the GUI of your OS and read the readme file.

I don't have the file with me but I can say you execute it with something like this (again check the readme file for a more accurate command): ./tracker test2.song It should open up as a tracker.

I don't know much aside from the fact you can make it play, idle or editable. Then use the app here. You will need gcc and java for it to run.

Here is how you use the tracker.

blinkyblinky (author) in reply to randofoDec 11, 2011. 3:01 PM
I think it from the data in the code that is sort of like a table. I tried altering half the data and it gave me some pretty weird sounds.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!