MOD Player For The Stellaris Launchpad

[Ronen K.] wrote in to tell us about the MOD playing Stellaris Launchpad project he recently completed. A MOD is a sound file for the computers of days long gone. But you’ll certainly recognize the sound of the 8-bit goodness that is coming out of this device.

To understand how a MOD file stores samples you might want to glance at the Wikipedia page. There are a ton of these files out there, but this implementation is meant for files with only four channels. For now the only external hardware used is an audio jack which needs a ground connection and a PWM signal on each of the two audio channels. [Ronen] is storing the files in flash memory rather than using an SD card or other external storage. This leaves 213k of space for up to six files that can be selected by the user buttons which cycle forward or backward through the list. See this demonstrated after the break.

The project ports existing code from an STM32 application. Since that is also an ARM microcontroller there’s not a ton of work that needed to be done. But he did have to write all of the PWM functionality for this chip. This PWM tutorial turned out to be very helpful during that process.

16 thoughts on “MOD Player For The Stellaris Launchpad

  1. I can’t recall what is the song starting at 1:18, but I’ve heard it about thousand times back in ninetees.
    I was about to beg for implementing other formats, but I’ve realized that you’re limited to the RAM available…

    1. They are called “chiptunes”. The samples they contain are cut down to waveshapes which are only a few (sometimes even only one) cycles long and looped when played. This results in FM-like sounds and very small file sizes.

  2. Wow, a blast from the past. I remember back in the early 90’s marveling at the sound quality I was hearing while playing MODs on a 386DX with a Soundblaster-16 card.
    “It almost sounds like REAL music!”
    That was fun, but I think I like modern lossless digital audio formats a bit better.

    1. Man I feel you on this, 386DX or even a 286, I am glad someone came up with dosbox. I actually went out of my way a while back before I knew of it and purchased a 486DX100 board and mem for 50$ off ebay

  3. I used MOD4Win, best MOD player there was for Windows 3.1x, and there was a 32bit version for Windows 95. It was released as unsupported freeware a while back.

    One very cool feature was IDO or Interpreted Digital Oversampling. It worked great on files with 8bit samples but 16bit ones were better with IDO off.

    What I didn’t like was it could only play from a playlist. If you wanted to just listen to random files you had to add to the playlist first.

  4. Hi ,
    i see in the text “The project ports existing code from an STM32 application”
    I just get a stm32f4 discovery and will like to know more about this stm32 project.

    Thanks ;)


Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.