Can't play converted music until the end

Started by igorduarte, December 06, 2018, 23:40:40

Previous topic - Next topic

igorduarte

I'm trying to convert a .wav song for .mod using openMPT so I can play the song on my game on Nintendo GBA.
The steps I'm following are:
* Downsample the original song frequency to 8K or less
* Convert the downsampled file to .mod

After that I can play the song just for a few seconds. As long as I keep downsampling the original song, I can play the converted file for more seconds, but still not enough to play the whole song and it gets to a moment where the music quality is terrible.

Anyone who knows what I could do to convert the song in a way I'm able to play it until the end?

LPChip

the .mod format is not suitable to play long .wav files. It seems, what you try to do is something .mod is not designed for.

The idea behind tracker music is that you create a song using short audio clips (also known as samples) to imitate instruments. Not play one sample for the duration of the mod.

If you really want to go this route, cut the .wav file in sections, load them in and play them one after another. This will probably allow you to get a 1 minute song working as you will run out of spots samples can be loaded in.
"Heh, maybe I should've joined the compo only because it would've meant I wouldn't have had to worry about a damn EQ or compressor for a change. " - Atlantis
"yes.. I think in this case it was wishful thinking: MPT is makng my life hard so it must be wrong" - Rewbs

Saga Musix

The MOD format only supports very short samples. It cannot do what you want to do. I am very sure there are more suitable and easier ways on the GBA to do what you want.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

StarWolf3000

You're better off with converting your .wav file into object code, it just needs to be in 8-bit resolution at 11 or 22 kHz (it can be stereo though, but that uses more of the CPU time), and you need to feed it via DMA to the sound registers (or use a playback routine, if you're using a library).