Playing MOD music on Pokitto

This is a port. It runs on hardware, the simulator and the emulator.

From the original description:

The player is able to play MOD/S3M/XM/IT music files that are stored in the MCU program memory and has been developed so that it can run within very limited memory and performance constraints while still producing decent sound.
In order to use other music files than the one that comes with the project you’ll need to use PMF Converter tool.
This converter will convert MOD/S3M/XM/IT files to PMF files that you can embed to the player program. PMF format is specifically designed for small memory devices by compressing the music data, and for small music files in particular you can often see significant reduction in the file size compared to MOD/S3M/XM/IT files. The format is designed so that it can be efficiently played back without any load-time processing (e.g. sample decompression) and just loaded as a data chunk to memory for playback.

Here’s the FemtoIDE project: (1.6 MB) To compile you’ll have to update to the latest PokittoLib.

It already includes the converter for Linux and Windows.
When you open the project in FemtoIDE, you’ll see the “Convert Mods” option in the Scripts menu. Just click it and all the files in the music folder will be converted to PMF.

As you can see from the description, this was meant for playing music that is stored in flash. If you want to make a game that does not use the SD card, this would be great. It is not useful if you want to stream music from the SD.


Very nice! To which format it converts the samples, 4-bit, 8kHz? How much flash the actual PMF player takes?

All I know is it sounds better when you increase PROJ_AUD_FREQUENCY from 8khz to 16khz, so it’s not resampling to 8khz during conversion. Judging from the audio quality, it’s probably not 4-bit, either.