Sarge
Register | User Profile | Member List | F.A.Q | Privacy Policy | New Blog | Search Forums | Forums Home
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Benefits of Boom
Pages (2): « 1 [2]  
Author
All times are GMT. The time now is 13:31. Post New Thread    Post A Reply
CodeImp
Moderator


Posts: 1461
Registered: 12-03



It'd be interesting if someone would stick an unconverted MIDI into a wad and see if it plays

I tried, it doesnt work. Conversion is required. If the lumps in AV are really MIDI (that is: if XWE doesnt just show them as such) then its probably due to serious bad Doom code that they are able to play. The MUS format is very different from MIDI format. As you can see here;


MIDI format:
Header Chunk

The header chunk appears at the beginning of the file, and describes the file in three ways. The header chunk always looks like:

4D 54 68 64 00 00 00 06 ff ff nn nn dd dd

The ascii equivalent of the first 4 bytes is MThd. After MThd comes the 4-byte size of the header. This will always be 00 00 00 06, because the actual header information will always be 6 bytes.


MUS format:
The MUS header has the following structure:

struct MUSheader {
char ID[4]; // identifier "MUS" 0x1A
WORD scoreLen;
WORD scoreStart;
WORD channels; // count of primary channels
WORD sec_channels; // count of secondary channels
WORD instrCnt;
WORD dummy;
// variable-length part starts here
WORD instruments[];
};

NOTE: WORD is a 16-bit unsigned integer (little-endian)

Old Post 10-17-04 22:22 #
CodeImp is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


they are midi... at least I can extract it as a lump and play it in winamp, and the header is without a doubt a midi header (while still in the wad)

Old Post 10-17-04 22:25 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
CodeImp
Moderator


Posts: 1461
Registered: 12-03


Then its probably not vannila Doom that you use to play AV with.

Old Post 10-17-04 22:27 #
CodeImp is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


I don't have win9x or dos so I can't play vanilla doom with sound to test it :P

Old Post 10-17-04 22:29 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


I see no AV.wad anywhere on that XWE screenshot... besides /me goes to check myself...

...

...

Okay, I agree they're in MIDI format, but now I must go test with my ye old Doom2.exe...

...

...

Hate to tell you this guys, but he is right. I just tested it using the ye old DM.exe and loaded in the wad... in plays perfectly. And just to be certain I'm going to load up my Music file for DTCA and see if the MIDIs play...

...

...

Yup, it's true. It plays it perfectly. I'm running Win98SE with the original Doom2.exe so I'm pretty sure that it has nothing to do with mine and his computer. Odd... it seems .mus files have never been needed all along...

EDIT: BTW, these ARE unconverted MIDIs in my wad that came directly from VGMusic.com so it certainly works.

EDIT2: Why the hell is d-e-f-i-n-a-t-e-ly censored anyway? Did the admin feel like doing something strange?

Old Post 10-17-04 22:31 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
CodeImp
Moderator


Posts: 1461
Registered: 12-03


It is technically not possible to use a MIDI as MUS file. Take a closer look at their headers. Where MIDI files always have zeros in place where MUS has its length, a MIDI file played as a MUS would technically do nothing, because the "MUS" would be of length 0. I seriously doubt those in AV are valid MIDI files. But like Cyb said, they were converted to MUS, then back to MIDI, so anything could have happend to screw their format.

Old Post 10-17-04 22:37 #
CodeImp is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


I don't doubt that they do work, it doesn't seem like the AV guys would make a doom2.exe compat wad with non-working music.

This does beg an interesting question as to why everyone (?) before AV (including all the official id wads) converted them to MUS rather than just sticking to normal MIDIs.

Codeimp: they are valid MIDIs, I even converted one to MUS just to compare the files in a hex editor and they're entirely different all the way, so clearly there was some sort of extra music loading code in there for MIDI (remember that none of the original sound/music code is available so it's entirely plausable).

edit: btw I lied, not all of the AV midis were converted from MUS, d_runnin appears to lack the info at the top of the file stating it was converted from a mus file

Old Post 10-17-04 22:37 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


Ummm... I did say I tried my DTCA music right? Those are valid MIDI files so it obviously does work just fine. Maybe the guys working on AV picked up on this... or maybe MIDI support was added in on one of the patches for Doom2.exe... who knows.

Old Post 10-17-04 22:40 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7130
Registered: 01-03



cyber-menace said:

EDIT2: Why the hell is d-e-f-i-n-a-t-e-ly censored anyway? Did the admin feel like doing something strange?



Because it is misspelled (and quite a common misspelling that apparently annoys some people.)


Test: ********ly

Old Post 10-17-04 22:41 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
cyber-menace
Forum Regular


Posts: 922
Registered: 03-03


Heh, I must have hit the wrong key...

Test: definitely.

BTW: Don't try using small WAV files for music in Doom2.exe, this froze my computer.

Old Post 10-17-04 22:50 #
cyber-menace is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


okay I just checked it out in dosbox with AV and indeed it plays the music perfectly, which I expected of course (like I said before).

so in conclusion, doom2.exe can play midis

Old Post 10-17-04 23:02 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
boris
meow


Posts: 3743
Registered: 05-00



Cyb said:
so in conclusion, doom2.exe can play midis

Heh, maybe it was added in some later .exe version?

Old Post 10-17-04 23:10 #
boris is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02


if you know where I can get older exe's I can test that out

Old Post 10-17-04 23:22 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
hobomaster22
Member


Posts: 314
Registered: 08-04


This got me interested, so I got on my bro's peice of shit with win98 and loaded up doom2.exe with my latest wad all with normal midis. And hey, what do u know, they worked :). So MOD was right after all.

Old Post 10-17-04 23:37 #
hobomaster22 is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
MasterOFDeath
Member


Posts: 577
Registered: 03-04


I was never owned in the first place. I apologize for flaming. myk, looks like you got SERIOUSLY owned here. doom(2).exe can play MIDI. Plain and simple.


boris said:

Heh, maybe it was added in some later .exe version?


Or maybe the UDS is just incorrect, as I remember seeing some innacuracies in it when I read it :P

Old Post 10-17-04 23:38 #
MasterOFDeath is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 5595
Registered: 12-00



Cyb said:
if you know where I can get older exe's I can test that out


Doesn't the "historic" directory contain some old release version exe's?

My guess is that if there was a change, it would have been with ver 1.4. From memory (so I could easily be wrong) that was the first version that included specific support for the Sound Blaster AWE32 (it became listed in the setup program). I remember that making a significant difference to how Doom sounded on my machine at the time. Of course, adding support for an additional sound card probably has nothing to do with this at all, but at least they were tinkering with the sound support around about that time. So meh!

Old Post 10-18-04 00:43 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Fredrik


Posts: 11660
Registered: 05-00


Hahaha, isn't it funny how people "know" things...

Old Post 10-18-04 01:07 #
Fredrik is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
deep
as in Deepsea


Posts: 1066
Registered: 09-01



MasterOFDeath said:
I was never owned in the first place. I apologize for flaming. myk, looks like you got SERIOUSLY owned here. doom(2).exe can play MIDI. Plain and simple.

Or maybe the UDS is just incorrect, as I remember seeing some innacuracies in it when I read it :P


Amazing!

I've got to admit that this is one of those things that everyone assumed to be true and never bothered to check. It's technically just fine. To think that the MIDI2MUS thing was a waste of time all these years and me spending time on it no less. You certainly made a few folks look silly. I think we all learned something here - try it before you post :-D

I tried a small level with a random midi (that was never converted as it may have been in AV) and it worked. There may be a size limit though? I'll check that in a bit. .. Ok, tried one over 64kb and I got a freezone error. Then tested another midi that one is not quite the same as the original. Some of the tracks don't map quite right. Didn't sound bad, just that playing it in Windows was fuller.

Interestingly AV locks up solid in DOOM95 on XP. In case anyone else tries this with DOOM95, give XP LOTSA time to come back before pressing reset. My screen size was 320x200 for quite some time and then everything came back. Not even Ctrl+Alt+Del worked in terms of coming up on the screen, but when the system came back, I had 6 copies running!

I think all you have to do to see if the exe support midi is do a search of MThd in the exe. Both DOOM (5-25-1995) and DOOM2 (2-1-1995) exes have that in their binaries (dates are the ones I have.installed).

Last edited by deep on 10-18-04 at 03:11

Old Post 10-18-04 03:00 #
deep is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 14420
Registered: 04-02


Cool.

Actually, Doom apparently still has the MUS limits when playing MIDI files; big MIDIs will be ignored by the engine. Given that the id guys released midi2mus, they must have included the conversion in the engine somehow. All you gain using MUS files is a bit of space, since they are a bit smaller than MIDIs.

Enjay, almost. MIDI playback works from Doom v1.5 on. Previous versions will lock up at start-up if a MIDI is read.


Cyb said:
they are midi... at least I can extract it as a lump and play it in winamp,
That hint would mislead most people convinced otherwise, since WinAmp will play MUS files.

and the header is without a doubt a midi header (while still in the wad)
It seems at one point the AV guys noted MIDIs work, maybe by accident... with todays tools that might be easier than in the past.

Old Post 10-18-04 03:17 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Graf Zahl
Why don't I have a custom title by now?!


Posts: 7130
Registered: 01-03



myk said:

That hint would mislead most people convinced otherwise, since WinAmp will play MUS files.




Doesn't work for me. Or do I need a special plugin for it?

Old Post 10-18-04 09:43 #
Graf Zahl is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
Fusion
Member


Posts: 319
Registered: 05-00


i remember several years ago, (96?) I imported some duke3d midis into a wad directly without conversion. Unfortunately, i somehow remember that the songs sounded like complete ass when I played them with vanilla doom. As another possible side effect, i also would get frequent lock ups if the midi file was too large or complex.

Personally, I believe that the midi support in vanilla doom was just a hack from an id doom patch, whereas the Mus format was hardcoded into the engine since the early alphas which would explain why Mus was used much more widespread than midis... And the need for Mid2Mus.

__________________
-Project Leader of Ancient megawad Hellcore, http://nextlevelgamer.com/doom

Last edited by Fusion on 10-18-04 at 10:33

Old Post 10-18-04 10:26 #
Fusion is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Enjay
ASK ME ABOUT FOOTBALL / STEAM / DEAD CELEBRITIES / THE BLAIR WITCH PROJECT


Posts: 5595
Registered: 12-00


So, one of the attractions of Boom was that it allowed you to play midis, yet Doom could already play midis?

So that leaves the question - why did team TNT make such a point of mentionning this then?

Was it that the source, as released (IIRC) had no sound support and when TNT used the new sound library, Allegro (again IIRC) the assumption was made that because Allegro supported midi they had given given Doom the ability to play midis?

Or was something explicitly done to the main code to allow/extend the midi capabilities of the engine?

Old Post 10-18-04 11:39 #
Enjay is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
MasterOFDeath
Member


Posts: 577
Registered: 03-04


The Linux doom source has pretty much no sound coding I think(I havent looked at it in a while). So when TeamTNT "added" MIDI support, they just threw it in with all the other sound coding they added with allegro most likely.


Graf Zahl said:



Doesn't work for me. Or do I need a special plugin for it?


Do you have the latest version? The latest version can, but when you install it it will not set up file associasions with .mus files. And the last time I used WinAmp was a while back :P

Old Post 10-18-04 11:58 #
MasterOFDeath is offline Profile || Blog || PM || Email || Search || Add Buddy IP || Edit/Delete || Quote
CodeImp
Moderator


Posts: 1461
Registered: 12-03


But only very limited MIDIs work. I think if you try one of todays MIDIs (some good sounding one with many channels and instrument effects and all that standard MIDI allows you to do), it doesnt work. Maybe this is the reason why midi2mus was created, because that removes all stuff which Doom doesnt support.

Old Post 10-18-04 12:02 #
CodeImp is offline Profile || Blog || PM || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
deep
as in Deepsea


Posts: 1066
Registered: 09-01


Sure, it doesn't always sound right - that's what I said above -- it doesn't sound quite the same. The key point is that DOOM can play MIDI though so long as the filesize is < 64kb. Some other files were fine though.

Overall this was quite interesting information, especially after 10 years of everyone (or everyone here anyway) thinking that it couldn't. He should be proud for sticking in there despite all the heat he got in the beginning:)

Midi has come a long way in sound cards since them, so it's probably a simple matter of having a specific channel mapping just for their own music.

I bet with a little time spent (by those well versed in Midi stuff), it can be figured out what plays well and what does not.

Old Post 10-19-04 00:38 #
deep is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
Cyb


Posts: 2726
Registered: 07-02



Enjay said:
So, one of the attractions of Boom was that it allowed you to play midis, yet Doom could already play midis?

So that leaves the question - why did team TNT make such a point of mentionning this then?

Was it that the source, as released (IIRC) had no sound support and when TNT used the new sound library, Allegro (again IIRC) the assumption was made that because Allegro supported midi they had given given Doom the ability to play midis?



The source as id released it has no sound code at all, so there was never any way to check if it could in fact load midi, and everyone had already assumed for years that the vanilla engine couldn't play midi simply because every util converted midi to mus, all id wads contain mus, id released midi2mus etc etc.

All of this made everyone figure that Doom couldn't load midi, so Boom being able to play midis was a huge deal.

Old Post 10-20-04 00:02 #
Cyb is offline Profile || Blog || PM || Search || Add Buddy IP || Edit/Delete || Quote
Quasar
Moderator


Posts: 4613
Registered: 08-00


It was always assumed during the earlier days of DOOM editing that you could not put MIDIs directly into WADs. I tried looking up information on the DMX sound library to see when MIDI support might have been added to it, but it's so old and out of date that apparently there is no info about it on the net any more. Please remember that id did NOT write the sound code that is in DOOM -- it is part of the DOS sound library called DMX. This is what DOOM's original music starting function looks like, courtesy of Raven:

code:
void I_PlaySong(int handle, boolean looping) { int rc; rc = MUS_ChainSong(handle, looping ? handle : -1); #ifdef SNDDEBUG if (rc < 0) printf("MUS_ChainSong() returned %d\n", rc); #endif rc = MUS_PlaySong(handle, snd_MusicVolume); #ifdef SNDDEBUG if (rc < 0) printf("MUS_PlaySong() returned %d\n", rc); #endif }
As you can see, there is no checking of the format or explicit mention of MIDI or MUS. It just calls the DMX library's MUS_PlaySong function, which after a certain version of DOOM must have added some crude auto-detected MIDI support.

No other existing libraries support the obsolete MUS format. It was created as a convenience for 16-bit DOS programs (hence the use of 16-bit offsets and 64k segment limits). Modern source ports like Eternity do not "add" MIDI support at all. Rather, we have to "add" MUS support by explicitly putting MUS -> MIDI converters into the program. Native MIDI support is easy; Windows and other OSes do that automatically. MUS has to be converted into the corresponding MIDI messages, on the other hand, which is not a trivial process.

BTW, as far as I know, id did not release MUS2MIDI or MIDI2MUS. Those were, like all other DOOM editor utilities with the one exception of idbsp, user-made programs. Let's not give id credit for what the community had to accomplish...

Old Post 10-22-04 19:57 #
Quasar is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
myk
volveré y seré millones


Posts: 14420
Registered: 04-02


The general concensus is that Dave D. Taylor wrote Midi2mus. Note how the author says "Paul's MUS format." That's not what some random community member would say... or, a least, that's how an id coder could very well say it.

The official FAQ confirms that it's by id (not that this is proof in itself.)

Old Post 10-23-04 01:36 #
myk is offline Profile || Blog || PM || Email || Homepage || Search || Add Buddy IP || Edit/Delete || Quote
All times are GMT. The time now is 13:31. Post New Thread    Post A Reply
Pages (2): « 1 [2]  
Doomworld Forums : Powered by vBulletin version 2.2.5 Doomworld Forums > Classic Doom > Doom Editing > Benefits of Boom

Show Printable Version | Email this Page | Subscribe to this Thread

 

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are OFF
[IMG] code is ON
 

< Contact Us - Doomworld >

Powered by: vBulletin Version 2.2.5
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Forums Directory