Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
HexenMapper

Vanilla Music Limits and Oddities

Recommended Posts

I'm trying to compile a list of limits and oddities for vanilla compatible MIDI files.

 

One of the limits I encountered when writing the REKKR score was the file size limit of 99 KB - any larger and Chocolate Doom won't play it. Upon further investigation I made a MIDI file exactly 100 KB large, and Chocolate Doom played some kind of weird, single-note piano thing (nothing like the original track).

 

Another interesting issue I've found recently is that the OPL synthesizer on chocolate doom doesn't seem to support pitch bend all the time (only on some instruments, and only some of the time). The OPL on zdoom seems to work fine for pitch bends, just chocolate doom seems to have the issue. I'll check it out on prboom over the next few days.

 

An issue I've also encountered just today is that a song in 6/8 seemed to be played slower by a factor of 0.6571 when played by both zdoom and chocolate doom. Speeding up the song by a factor of 1.52 solved the issue - but none the less it is curious!

 

Anyone have any other strange vanilla MIDI facts or limits? or know of an old thread that covers these?

Share this post


Link to post
8 hours ago, HexenMapper said:

file size limit of 99 KB

Odd, the limit was always said to be 64 KB.

Take note of all the format limitations described in here https://doomwiki.org/wiki/MUS.

Maybe the conversion process can sometimes result in smaller MUS file from bigger MIDI due to the BPM conversions and discarding of some data.

 

Also take a look at this post

and this thread

by @Bucket.

 

Share this post


Link to post
2 hours ago, wrkq said:

Odd, the limit was always said to be 64 KB.

MUS is a more compact format than MIDI; and notably it does not include any metadata. Even the tempo is hardcoded instead of being a variable like in standard MIDI files. And, importantly, MIDI files can contain strings of arbitrary length so that titles, authors, copyright, song lyrics, and other comments can be placed inside -- those are mercilessly stripped off and eradicated by the MUS conversion, which is not content with merely mangling the audio data, it needs to make sure the resulting mess is unrecognizable.

 

Which means that the actual maximal size of a MIDI file, pre-conversion, is a fuzzy value. Like if you put the entirety of War & Peace in MIDI comments, it's gonna be huge but the resulting MUS will be a lot tinier.

 

MUS files are limited to 64KB, however, this is a hard limit of the format which cannot be larger than 65536 bytes.

Share this post


Link to post

Very interesting... I completely forgot about .MUS files. Also interesting to see the way tempo is handled too - would explain why things are acting as they do for the 6/8 track.

 

Thanks for the post links - lots of good info!

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×