Alkarion
Senior Member
Offline
Posts: 90
|
 |
« on: May 21, 2006, 10:05:38 AM » |
|
For some time now I'm trying to get Monkey Island 2 (under Dosbox) to work with MIDI-OX. But if MIDI-OX routes the MIDI data, it seems to get corrupted, resulting in false instruments and wrong volume information being sent to my MT-32. If the MIDI data is directly sent to the physical MIDI-out, no problems occur. Here are two mp3s illustrating the problem and the MIDI recorded directly from the game (including SysEx; it takes some time 'til the tune starts, I didn't edit the silence out). without Midi-Oxwith Midi-OxMIDI filePerhaps someone here has an idea how this corruption comes about. It seems strange since MIDI-Ox works flawlessly most of the time.
|
|
|
|
|
Logged
|
|
|
|
Tom
Administrator
Senior Member
Offline
Posts: 5,618
|
 |
« Reply #1 on: May 21, 2006, 11:07:52 AM » |
|
I can't speak concerning MIDI-OX and your problem, but I can add my frustration with the limitations of using MIDI applications (I'm not talking about games) under DOSBox. I had hoped DOSBox would offer a solution to using old DOS-based MIDI apps under WinXP, and to some degree, it does -- MIDI devices can be used with some DOS-based sequencers and utilities. However, they can't be used well. Apps tend to drop notes during playback, hung notes increase as polyphony does, tempo goes awry, etc. All of these old 'DOS-based' apps run beautifully under Win98...which is what I resigned to doing; two of my music PC's are still running Win98SE, and probably always will. :roll:
I had worked with some guys doing DOSBox tweaks last Winter, while working with Voyetra VAPI drivers. We were able to get multi-port MIDI support functioning, but the same problems mentioned above still made this a useless solution. MIDI wasn't handled properly, especially when there were multiple simultaneous MIDI tracks at play.
|
|
|
|
|
Logged
|
|
|
|
|
Zemus
|
 |
« Reply #2 on: May 21, 2006, 05:27:26 PM » |
|
Monkey Island 2 works a bit different than most other games using the MT-32 and sysex. Instead of sending a complete bank at start-up and then using that setup for all the music, it changes instrument presets for every instrument change in every melody it plays. If you look at that MIDI, you'll notice that for most instrument changes, the sysex message and the instrument change is sent at the exact same time. When that happens, the MT-32 doesn't have time to switch around stuff before the instrument change and so you get the wrong instrument. The game sends the sysex and the instrument change after each other, but when you record with MIDI-OX, you introduce a tiny error in the timing. Not audible, but noticeable because you get the wrong instruments.
|
|
|
|
|
Logged
|
|
|
|
Alkarion
Senior Member
Offline
Posts: 90
|
 |
« Reply #3 on: May 21, 2006, 05:54:59 PM » |
|
This is a very interesting theory. However, I think there is some misunderstanding. The MIDI file which I uploaded works fine, it was recorded directly with Dosbox and not with MIDI-Ox. But if I use the virtual MIDI port routing supplied by MIDI-Ox and do not directly write the MIDI data to the physical port, then the tune is played wrong.
So indeed, the reason may be that MIDI-Ox alters the timing. Still, the MIDI file is intact and plays well. I also wonder how the timing can be messed up if all data is processed sequential. Events could then get even closer in time, but earlier and later could never be exchanged. But it may well be that I understand way too little about MIDI and such things can happen.
@Tom Sadly, though Dosbox is an extremely potent emulator, MIDI support is indeed not yet perfect. Such elementary things as MIDI In are not supported. It is sometimes disappointing that the developers focus solely on games since already Dosbox surpasses VMWare in certain aspects of Dos application compatibility. It still has much untapped potential for DOS apps, hopefully this will be remedied one day.
|
|
|
|
|
Logged
|
|
|
|
|
Zemus
|
 |
« Reply #4 on: May 21, 2006, 06:15:07 PM » |
|
Well, that's what happened when I recorded the music from Monkey Island 2. I played the game on my old computer which was hooked up to the CM-500. The MIDI-thru on the CM-500 was then hooked up to my new computer which recorded it. When I played the game, the music was fine, but the small differences introduced in the recording was enough to mess up some of the instruments when I played it back. Actually, the instruments that were messed up were the same as in your reocrdings.
|
|
|
|
|
Logged
|
|
|
|
Tom
Administrator
Senior Member
Offline
Posts: 5,618
|
 |
« Reply #5 on: May 21, 2006, 06:35:16 PM » |
|
As I recall, what Zemus is outlining is what happened to me when I initially recorded music from MI2. I seem to recall the PROGRAM NUMBERS not really changing -- but the SYSEX changing the INSTRUMENT. It was as though there were a few program numbers (not very many at all) that were at the mercy of SysEx; only the sounds changed that were related to those program numbers when new SysEx was sent. I haven't looked at the game in many, many years, but it sure seems like this was the case. I used a MT-32, so I was able to track the sound changes on its display. I remember watching one channel at a time for any changes. Then, it was just a matter of placing the correct patch in the same spot for each channel, when I created my files. I didn't embed any SysEx.
Alkarion, to me, it sounds like MIDIOX is ignoring the Program controllers altogether, therefore playing the default patches for a given sound group...which in turn would alter the balances...and also bypassing any SysEx that might be aimed at specific program numbers.
|
|
|
|
|
Logged
|
|
|
|
NewRisingSUn
Senior Member
Offline
Posts: 634
|
 |
« Reply #6 on: May 22, 2006, 06:49:28 AM » |
|
When that happens, the MT-32 doesn't have time to switch around stuff before the instrument change and so you get the wrong instrument Very true. I find that the old-type MT-32 is more susceptible to this problem than the CM modules. MI2's Largo's Theme (for some reason) first sends "Sax 4" on the main melody part, then immediately changes to "Bassoon". On the old-type MT-32 when running in pure DOS, the unit somehow misses the second program change and plays with "Sax 4". The CM-32L on the other hand plays "Bassoon". So this happens in pure DOS as well. Damn you, iMuse!
|
|
|
|
|
Logged
|
|
|
|
Alkarion
Senior Member
Offline
Posts: 90
|
 |
« Reply #7 on: May 22, 2006, 11:45:59 AM » |
|
Ok, so the dynamic IMuse system made them use a method of changing instruments which is very delicate with respect to timing. Well I think I can live with the limitations of MIDI-Ox but I've also noticed that I cannot edit the MIDI file without corrupting volumes and instrument changes.
I've tried to only load the MIDI file in both the old Win 3.1 Cakewalk and Cakewalk Sonar 5 and directly save it again without editing it. But, while this should leave the MIDI files basically untouched, I get the volume/instrument change problems mentioned above.
|
|
|
|
|
Logged
|
|
|
|
|
Zemus
|
 |
« Reply #8 on: May 22, 2006, 05:12:37 PM » |
|
Did you save the MIDI file you posted above in one of those programs? If so, it seems that the program you use has "Always use Sysx Banks for MIDI Files (Instead of Sysx Data)" (or something like that) turned on. This setting will put most of the sysex data into tiny banks and that also messes up the timing for some reason. At least that's what happened when I had that setting turned on in Cakewalk Pro Audio 9.
|
|
|
|
|
Logged
|
|
|
|
NewRisingSUn
Senior Member
Offline
Posts: 634
|
 |
« Reply #9 on: May 22, 2006, 05:24:19 PM » |
|
I'm using the old Cakewalk Professional Tom has on this site and have no problems at all with System Exclusive Messages. Others had problems in the past though with the iMuse files I created. It seems that all those modern fancy programs can't handle basic MIDI data correctly...
|
|
|
|
|
Logged
|
|
|
|
Alkarion
Senior Member
Offline
Posts: 90
|
 |
« Reply #10 on: May 22, 2006, 06:25:27 PM » |
|
The MIDI file I posted was captured with Dosbox and I haven't touched it with any MIDI editing program. It's the only version of the file which works correctly. Even if I deactivate the "Always use SysEx Banks..." the MIDI file gets corrupted. Also, as I wrote above the old Cakewalk leads to the same results.
Alas, I think I'm leaving the field of iMuse MIDIs to the more experienced around here. It would be very nice to have a complete Monkey Island 2 or Fate of Atlantis soundtrack. I understand you are planning to expand your coverage of Monkey 2, Zemus?
|
|
|
|
|
Logged
|
|
|
|
NewRisingSUn
Senior Member
Offline
Posts: 634
|
 |
« Reply #11 on: May 22, 2006, 07:47:16 PM » |
|
Try this file. This plays properly on my Cakewalk as well as Winamp on a CM-32L. Does it play properly after loading and saving with your program? Especially paying attention the the custom "ReggaeBass". If it does, I can post the complete MI2 soundtrack, including all properly decoded System Exclusive Messages.
|
|
|
|
« Last Edit: February 11, 2008, 09:56:58 PM by NewRisingSUn »
|
Logged
|
|
|
|
|
Zemus
|
 |
« Reply #12 on: May 22, 2006, 07:49:51 PM » |
|
I am planning on completing the soundtrack this Summer if I can figure out all those weird sysex messages. It's hard to figure out whether or not an instrument change is a bug, corrupted recording or is supposed to be there sometimes.
|
|
|
|
|
Logged
|
|
|
|
Alkarion
Senior Member
Offline
Posts: 90
|
 |
« Reply #13 on: May 23, 2006, 07:33:24 AM » |
|
Your file plays fine, NewRisingSUn, also after loading and saving it in Cakewalk. I noticed all the SysEx is in the beginning, so it should come as no surprise that it works.
I'd be very interested in your MI2 soundtrack, please go ahead posting those files.
|
|
|
|
|
Logged
|
|
|
|
NewRisingSUn
Senior Member
Offline
Posts: 634
|
 |
« Reply #14 on: May 25, 2006, 05:32:55 PM » |
|
.zip archive (543 KiB) Send mtinit.syx first, otherwise you'll miss a channel. These are actual decoded game resources, not recordings, making proper playback somewhat involved in a few cases:[list=1] - File names correspond to the actual resource numbers. See index.txt, or Text events within the MIDI sequences, for track names.
- Some songs have multiple melody lines, denoted as numbers before an instrument name (i.e. "1: Trumpet", "2: Clarinet"). Only one should be active at a time, mute the others. For a few songs, all possible combinations are included as extra files with the -1, -2... file name suffixes.
- The music in LeChuck's fortress is actually a combination of building block-like elements in sounds 130-150. After playing introduction sound 137 to the end, the game combines these elements using a random number generator, so this changes every time the game is played (another reason why simply recording the music is inadequate). See FORTRESS.MID for an example of how elements might be combined (it's already over seven minutes long, yet still only uses about 25% of the elements!)
- In the tunnels below Dinky Island, the game combines one of sounds 213-15 with one of sounds 216-220, again using a random number generator.
- Sounds below number 100 are sound effects. There aren't that many on the MT-32.
- As with some Sierra games, reverse the stereo cables on the MT-32.
- If you load the files into a sequencer program, make sure that the program leaves the resolution at 480 ticks per quarter note. A few cheap or badly-configured sequencer programs automatically convert everything to 120 or less, which potentially could mix up the timing of system exclusive messages.
[/list:o]Hope this is not too complicated for you. Bitte schön.
|
|
|
|
« Last Edit: February 11, 2008, 09:54:56 PM by NewRisingSUn »
|
Logged
|
|
|
|
Alkarion
Senior Member
Offline
Posts: 90
|
 |
« Reply #15 on: May 25, 2006, 07:47:08 PM » |
|
Dankeschön  This looks like you put much work into the ripping. So far everything works marvellously. Although I've found out that Winamp plays some tunes (eg 176) wrong as opposed to the Windows Media Player.
|
|
|
|
|
Logged
|
|
|
|
|
Zemus
|
 |
« Reply #16 on: May 26, 2006, 02:00:39 AM » |
|
NewRisingSun: I checked the TXT you made and noticed you've crossed off those melodies with instrument changes at the loop. I noticed Captain Dread's Theme is not crossed off, but in-game the instrument that plays the melody line changes first time it loops. Is that a bug in the game?
|
|
|
|
|
Logged
|
|
|
|
NewRisingSUn
Senior Member
Offline
Posts: 634
|
 |
« Reply #17 on: May 26, 2006, 07:55:30 AM » |
|
noticed you've crossed off those melodies with instrument changes at the loop. Only if the instrument change is done conditionally using an iMuse system exclusive message. I have not crossed off instrument changes that happen using regular program change messages, because those get played correctly by themselves if you loop them (using your sequencer's loop feature). Don't pay too much attention to the index.txt file; I only wrote it yesterday so Alkarion wouldn't have to waste his time looking for a particular song. When in doubt, the information in the MIDI files themselves is the correct one. So far I haven't found any bugs in the original MIDI files, so good job there, LucasArts. 
|
|
|
|
|
Logged
|
|
|
|
|