gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Audio > mod file size and content

#25682 - lordmetroid - Thu Aug 26, 2004 11:10 pm

I'm thinking of restricting my music files to 50kByte/mod file
Now I wonder, how much detail would one generally get into such a mod file?

Also I heard vocal samples would take quite some space, is there anyway to decrease their size, as I really want vocal choir as an instrument.
_________________
*Spam*
Open Solutions for an open mind, www.areta.org

Areta is an organization of coders codeing mostly open source project, but there is alot of sections like GBA dev, Language learning communities, RPG communities, etc...

#25692 - tepples - Fri Aug 27, 2004 3:40 am

Redundancy among waveforms
One way to decrease the average size of your mod files is to use more than one mod file with the same instruments. Have your mod converter put the waveforms in a hash table and then load those waveforms that a particular song uses.

Redundancy within waveforms
Use GSM 06.10 to compress the waveforms at 4.85:1 and decompress them to EWRAM (at about 32 ksamples/s) when starting each song. To maintain the illusion of fast loading time, display a mission briefing while decompressing waveforms. Decompress the waveforms that appear in the first couple patterns, then start the song and fade out the mission briefing while decompressing the rest, then start the action.

Redundancy within patterns
MOD uses a very inefficient method to store pattern data. Don't store an effect column if there isn't one. Don't store an entire row if there isn't one in a given column. Use a form of run-length encoding in each column to determine what there is and isn't (for example, hold note for n rows), then store what there is.
_________________
-- Where is he?
-- Who?
-- You know, the human.
-- I think he moved to Tilwick.