ModPlug Central

OpenMPT => Help and Questions => Topic started by: igorduarte on December 06, 2018, 23:40:40

Title: Can't play converted music until the end
Post by: igorduarte on December 06, 2018, 23:40:40
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?
Title: Re: Can't play converted music until the end
Post by: LPChip on December 07, 2018, 08:43:58
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.
Title: Re: Can't play converted music until the end
Post by: Saga Musix on December 07, 2018, 08:49:50
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.
Title: Re: Can't play converted music until the end
Post by: StarWolf3000 on December 07, 2018, 10:38:28
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).