ARDUINO VIDEO GAME MUSIC CHIPTUNES

by Absolutelyautomation in Circuits > Electronics

4358 Views, 6 Favorites, 0 Comments

ARDUINO VIDEO GAME MUSIC CHIPTUNES

P1100429.JPG

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

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!

  • Amplified speakers
  • Chiptunes

Build the Circuit

P1100435.JPG
PMFPLAYER_schem.png

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"

Prepare Chiptunes

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

Download Arduino Code

2016-08-18-161057_1024x768_scrot.png
2016-08-18-160508_1024x768_scrot.png
2016-08-18-160050_1024x768_scrot.png
CHIPTUNEMINUTE INTRO

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

Downloads