Thread: mus2midi doesent work

  1. #1
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269

    mus2midi doesent work

    Well some guy named Malvineous had reverse egineered glb files of Raptor: Call of the Shadows so I whipped up a small app to extract files from a glb.

    Now these weirdass .MUS files have screwed me up. I tried using mus2midi...it converts fine but wmplayer isnt able to play the created midi. qmus2mid just doesent run at all, it only ends with saying "Stack Error" and all sortsa asm things.

    Does anyone know of ANY way to convert .MUS files to .midi?! I really want those music!

    (Oh yes and there are no issues with the extractor. At least the first 4 bytes 0x4d55531a are coming up alright.)

  2. #2
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    Yeah and I also tried musplay, it's playing the file but I'm not getting any sound.

  3. #3
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    37,534
    > (Oh yes and there are no issues with the extractor. At least the first 4 bytes 0x4d55531a are coming up alright.)
    You're not equating the "first 4 bytes are ok" and the lack of a crash as success are you?

    Your subsequent failure on all other fronts suggests there may be something wrong.

    Have you tried converting a .mus file from some independently verified source, and pushing that through your various conversion tools?

    My guess is your app failed to take into account some kind of padding / alignment / endian issue, and output a broken .mus file.
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  4. #4
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    Quote Originally Posted by Salem View Post
    Have you tried converting a .mus file from some independently verified source, and pushing that through your various conversion tools?
    Oh yeah sorry, forgot to mention that musplay came with some demo .mus files that exhibit the exact same behaviour on both musplay and mus2midi

  5. #5
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    Endianness is also alright (little endian) because the other files such as text files are coming up alright, thou yeah text files are encoded whereas .MUS files from the glb I read were in raw unencoded form. (Yes I do use appropriate methods for both kinds of files). I use the same routine for all extraction so it's GOT to be alright.

  6. #6
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    Wait I just discovered the other glbs are full of many bogus files like files with same name but different lengths. I'm afraid ALL the .mus files in it may have been bogus ones. I'll change it to write the repeat files with different names and check each glb before doing anything else.

    It's too late in the night I'll see this thing tomorrow.

  7. #7
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    Sorry for reviving an old thread but thought I needed to post this.

    Ok so I *was* indeed extracting it alright. Only thing wrong was that I hadnt used the proper audio driver with musplay (the /D4 option works for me, dunno for other machines tho).

    mus2midi was alright too. There was some obfuscation in the tempo (too fast music, most files converted fine with a tempo of 70, but some required different values)

    Windows Media Player and my ancient version of VLC cant play those midis but they're legal files cuz a midieditor I have (SpeedyMidi) plays them fine, and also when I save them again thru speedymidi those files are properly playable by WMP.

    So yes I've added the Raptor music to my collection now.

    In related news I've succeeded in reverse engineering Demonstar's glb format. All it's music and sound fx is in wav format (or at least the first 4 bytes are RIFF). Sound fx are played fine by both my music players but unfortunately all the level, intro, etc. music is unplayable. A quick hexdump reveals the RIFF type is 'MIDS' and the next 4 bytes are 'fmt ' (fmt with a trailing space). If you know of any program that can convert these into a format readable by 99% of music players out there please lemme know. A program that can natively play these will also do.
    Last edited by the_jackass; 11-12-2014 at 11:31 AM.
    "Highbrow philosophical truth: Everybody is an ape in monkeytown" --Oscar Wilde

  8. #8
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    ........ing great, really ........ing great.

    This ........ seems to be a riff format made by Demonstar devs themselves. I tried making a new .wav with RIFF type "WAVE" and a *proper* 16 byte fmt chunk (with guessed values of avgBps of course) and then copying the data chunk verbatim (which is the only other chunk in these files) but it still ........s up. WMP and VLC cant play it, and a converter I have (sox) segfaults.

    Hah!
    "Highbrow philosophical truth: Everybody is an ape in monkeytown" --Oscar Wilde

  9. #9
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    I'd set wrong numChannels to 0 that's♥why they didnt play...but still it's playing as a regular whirring noise...so there must be some sorta compression/encryption going on there....

    Well... here's the Demonstar GLB spec that I wrote if anyone's interested.

    Self propaganda I know.
    "Highbrow philosophical truth: Everybody is an ape in monkeytown" --Oscar Wilde

  10. #10
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    My site's host has changed...here's where you'll get the guide.
    "Highbrow philosophical truth: Everybody is an ape in monkeytown" --Oscar Wilde

  11. #11
    Citizen of Awesometown the_jackass's Avatar
    Join Date
    Oct 2014
    Location
    Awesometown
    Posts
    269
    Okkaay!! I was looking at the wrong GLB file all this while. Those weird MDS files were from Game.glb
    I extracted Game3.glb and I got all of Demonstar's music in normal MIDI format. Cool!

    This thread can now be closed safely.
    "Highbrow philosophical truth: Everybody is an ape in monkeytown" --Oscar Wilde

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do I get this to work?
    By Xandan in forum C Programming
    Replies: 3
    Last Post: 11-13-2009, 07:46 PM
  2. Why does this work
    By foolfoolz in forum C Programming
    Replies: 2
    Last Post: 10-07-2009, 10:44 PM
  3. Why it does not work
    By dv007 in forum C++ Programming
    Replies: 5
    Last Post: 08-10-2002, 04:51 PM
  4. my function doesn't work! it should work
    By Unregistered in forum C Programming
    Replies: 13
    Last Post: 05-02-2002, 02:53 PM
  5. Why it doesent work ( color text)?
    By GodLike in forum C Programming
    Replies: 6
    Last Post: 03-24-2002, 08:27 AM

Tags for this Thread