Introduction: ARDUINO VIDEO GAME MUSIC CHIPTUNES
Do you like retro games music? do you like Arduino? Yo can play Chiptune files in .MOD, .S3M, .XT, and .IT audio format with Arduino and NO additional shields or modules!
For more info, schematics, source code and chiptunes, please visit: chiptuneminute.blogspot.com
Step 1: REQUIRED COMPONENTS
Here is the list for the required components for this project with the absolute lowest prices! If you find something cheaper somewhere, please msg me!
- Arduino nano or superior ► ( http://goo.gl/Xa8y7u )
- (9) 20 K resistors ► ( http://goo.gl/pSUtNb )
- (7) 10 K resistors ► ( http://goo.gl/SRrm8D )
- (12) LEDs ► ( http://goo.gl/NwA2cW )
- (12) 220 ohm resistors ► ( http://goo.gl/J6XteJ )
- Amplified speakers
Step 2: Build the Circuit
Build the Circuit
The circuit is an 8 bit R-2R DAC (Digital to Analog Converter) using 20k and 10k resistors. If you don't have this values, try using other values, keeping as much as possible the 2:1 relationship i.e (40K and 20k, 2k and 1k).
The optional leds (with resistors) are for a "channel visualizer"
Step 3: Prepare Chiptunes
The Arduino Chiptune player uses an intermediate format named PMF (Profundic Media Format) by its creator Jarkko Lempiainen. This format compresses the chiptune to make it fit in the small arduino memory.
1. Download pmf_converter.exe from the creator's github repository: https://github.com/JarkkoPFC/arduino-music-player/tree/master/pmf_converter/bin.
2. Download chiptunes in a suitable format (.MOD, .IT, .S3M, .XM). A good place to find them is modarchive.org. Please look for chiptunes with file sizes lower than 50K. If you want ready to program chiptunes please visit chiptuneminute.blogspot.com.
3. Put chiptunes and pmf_converter.exe in the same folder. Use the command line window to acces the folder. Then type the following command to convert chiptunes to pmf file:
pfm_converter.exe -hex -i inputfile -o outpufile
Replace inputfile for the name (plus .extension) of a downloaded chiptune
Replace output file for the name of the file(plus .extension) converted to pmf format
Example: I dowloaded a file named happysong.mod and i want to convert it to happys.pmf
Command to type:
pfm_converter.exe -hex -i happysong.mod -o happys.pmf
Once you have the pmf file keep it for the last step
Step 4: Download Arduino Code
Download Arduino Code
Download the attached Arduino code or go to chiptunemintue.blogspot.com and download from there.
1. Put the pmf file created in the previous step in the same folder of the uncompressed source code.
2. Open the pmf file with a text editor.
3. Select and copy all the text content.
4. Open the pmf_tune.cpp from the source code
5. Paste the text copied from pmf in the pmf_tune.cpp
6. Save changes made to pmf_tune.cpp. Open the arduino .INO file and download!
For more info, schematics, and chiptunes, please visit: chiptuneminute.blogspot.com
We have a be nice policy.
Please be positive and constructive.