Author Topic: Can't play converted music until the end  (Read 1836 times)

Offline igorduarte

  • Shy artist
  • Posts: 1
  • Operating System: Ubuntu 16.04
Can't play converted music until the end
« 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?

Offline LPChip

  • Administrator
  • *****
  • Posts: 5,123
  • Operating System: Windows 10 Pro x64
Re: Can't play converted music until the end
« Reply #1 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.
"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

Offline Saga Musix

  • OpenMPT Developers
  • *****
  • Posts: 7,333
  • aka Jojo
    • Download music, samples, VST plugins: Saga Musix Website
  • Operating System: Windows 10 x64
Re: Can't play converted music until the end
« Reply #2 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.
ยป 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.

Offline StarWolf3000

  • Active artist
  • *
  • Posts: 29
  • Gender: Male
  • Operating System: Windows 8.1 x64
Re: Can't play converted music until the end
« Reply #3 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).