Graf Zahl Posted May 17, 2011 The only reason anyone would need to convert MIDI to MUS would be the one engine nobody should use anymore: Doom95. For everything else it's a complete waste. Doom.exe has a converter included and everything else would lose the information in MID that MUS doesn't support. 0 Quote Share this post Link to post
Gez Posted May 17, 2011 Graf Zahl said:even Doom.exe 1.9 can Starting from 1.5, for reference. What about vanilla Heretic/Hexen and Strife? Weren't they based on Doom 1.2 and 1.4 respectively? 0 Quote Share this post Link to post
shadow1013 Posted May 17, 2011 yes but they used a later version of dmx. and the only reason i want a midi2mus would be to include a midi converter for my project which already has pure mus support 0 Quote Share this post Link to post
natt Posted May 17, 2011 shadow1013 said:yes but they used a later version of dmx. and the only reason i want a midi2mus would be to include a midi converter for my project which already has pure mus support Write the midi loader from scratch, or use someone else's creation. Passing input files through a perfect midi2mus will still obliterate everything in them that mus doesn't support. Many many controller events are not supported. Everything is compacted into one track (ie, midi file type 1 is lost). If you use any tempo other than 120BPM, the resulting file will sound fine for playback, but be nearly impossible to edit (the sheet music style notation will be horribly lost.) Any informative meta events like time and key signatures, as well as staff names, will be lost, so basically you'll never be able to use the output in any sort of score editor. And if you're trying to control something other than a vanilla GM synth, remember that mus doesn't have sysex message support at all. 0 Quote Share this post Link to post
shadow1013 Posted May 17, 2011 i mean i understand, but my needs are simplistic. the least i would like is a direction to be pointed to to convert midi delta times to the mus time events 0 Quote Share this post Link to post
natt Posted May 17, 2011 shadow1013 said:i mean i understand, but my needs are simplistic. the least i would like is a direction to be pointed to to convert midi delta times to the mus time events An increment of 1 in a mus timecode represents 1/140 SECONDS. Treat the "time division" flag in the midi header as a 16 bit unsigned integer. if you're loading off of disk, remember that it's big endian. If the top bit is set, you're using smpte timings; which it's unlikely that you'll see. Otherwise, "time division" gives MIDI CLOCKS per QUARTERNOTE. When I say "MIDI CLOCK" I mean that one MIDI CLOCK is equal to an increment of 1 in a midi timecode. Whenever you get a midi meta event of type tempo change (0x51), the data field should be 3 bytes long. treat those bytes as a 24 bit unsigned integer (big endian again). Call this number "tempo"; it is in MICROSECONDS PER QUARTERNOTE. At the beginning of the track, before you get to any tempo event (which you might never even get to), assume a tempo of 500000; you should be able to see that this is the same as 120 QUARTERNOTES PER MINUTE. Note that if you're reading a type 1 file, tempo events should only occur in the first track, and they apply to all tracks. Remember that midi timecodes specify the time before an event, but mus timecodes specify the time after an event. 0 Quote Share this post Link to post
Quasar Posted May 18, 2011 Gez said:Starting from 1.5, for reference. What about ... Strife? Weren't they based on ... 1.4 ...? DOOM II 1.666 0 Quote Share this post Link to post
fraggle Posted May 18, 2011 natt said:If you are a programmer, do it yourself. The source to Ben Ryves's mus2mid (as it appears in prboom-plus) is pretty easy to follow, and provided you have a basic understanding of the midi file format coming in, you should come out of reading mus2mid.c with a basic understanding of the mus file format. It's slightly more complicated to write a midi2mus than it is to write mus2midi, as mus is single track while MIDI files can have multiple tracks. Incidentally this is why Chocolate Doom's MIDI playback is messed up with some multi-track files: Alien Vendetta for example. 0 Quote Share this post Link to post
natt Posted May 18, 2011 fraggle said:It's slightly more complicated to write a midi2mus than it is to write mus2midi, as mus is single track while MIDI files can have multiple tracks. Incidentally this is why Chocolate Doom's MIDI playback is messed up with some multi-track files: Alien Vendetta for example. I merge into one track before I play them. http://pastebin.com/QkuLKPik 0 Quote Share this post Link to post
axdoomer Posted June 10, 2011 I found something interesting: http://aminet.net/package/util/libs/dmxemul It's a DMX emulator 0 Quote Share this post Link to post
shadow1013 Posted June 10, 2011 ive seen it before, alas it doesnt support nearly half of DMX's full features (look at tic.map in the heretic sources, lots of functions there noone knows about) and its only for amiga with no sources 0 Quote Share this post Link to post
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.