• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

MIDI files to run MIDI supported maps.

This bundle is marked as useful / simple. Simplicity is bliss, low effort and/or may contain minor bugs.
This tool originates from here

First of all I am not author of files included (they are common files but still for this .zip credits goes to masda70).
The .zip contain 2 files for little interface upgrade on your Warcraft III client. This allows you to hear music in MIDI supported maps and run MIDI supported maps without any MIDI related bugs. This does not effect other maps which is not using MIDI format music.

To apply this patch on your client;

First, Open the zip and run the registry file included.You can also do it manually if it doesn't work. To do it manually;
(Warning: Do not change any other value in Registry Editor unless you know what you are doing!)
In regedit go to the key
[HKEY_CURRENT_USER\Software\Blizzard Entertainment\Warcraft III] and add a DWORD named "Allow Local Files" (if it is not there already) then set its value to 1.

Second, You must extract UI folder to your Warcraft III directory. (it's directory is included in .zip but to be exact MIDISounds.slk file has to be in "*YourWarcraftIIIDirectory/UI/SoundInfo")

If it does not work there can be several reasons;
- Make sure you put MIDISounds.slk in correct directory
- Make sure you have "Ambient Sounds" and "Music" turned on at your Warcraft III Options as the Jass code to run MIDI files need you to have both options enabled.
- Make sure the map you are testing is MIDI supported.
- Not tested with MAC so it might be reason.
- Make sure you have gm.dls (it is like a sound bank in your Operating System and required to read MIDI sounds) in directory "C:\WINDOWS\system32\drivers". If you have your OS installed at somewhere else you might need to change a value in the .slk file. Open the .slk file in notepad and search for the entry "C:\Windows\system32\drivers"
You have to change that address depending on where your OS is installed and depending what version of OS you have.
We want to have the file to point the place where "gm.dls" file is. So just change that address to the one where gm.dls is. Mine is "C:\WINDOWS\system32\drivers\gm.dls" so I put "C:\WINDOWS\system32\drivers"
If you want to use a different dls file just remember to change the file name two lines above the line reads up ' C;X4;K"gm.dls" '


For map makers who want to Implement MIDI musics in their maps;

after completing instructions above. You can import the MIDI files from Import manager of your World Editor (they will be in category "Other" and will not show up in Sound Editor).Go to the trigger editor and add a trigger called "Music" that runs at map initialization and then convert it to custom text (JASS) through the edit menu.

Under the actions function ("Trig_Music_Actions") and before "endfunction"
add the following :
call SetAmbientDaySound( "Roland" )
call SetAmbientNightSound( "Roland" )

Now you can add a line call PlayMusicBJ("yourmidifile.mid") after that and it will trigger the music in the game or you can also do
call PlayMusicBJ( "yourmidifile.mid;midi2.mid;midi3.mid....etc" ) if you have more midis. Also you can use SetMapMusicRandomBJ instead of PlayMusicBJ.
Now test your map. When the game starts you should be hearing MIDI music!

Please note that if your midi file is for example war3mapImported\midi.mid you have to type call PlayMusicBJ("war3mapImported\\midi.mid"), so basically you need to always add a new '\' next to any slash contained in the file location.

If you ask "Why use MIDI files instead .wav or .mp3?" because you can get fairly long musics with above avarage quality and file size around 15KB to 100KB. It is the ONLY perfect way to add music to maps.

Keywords:
MIDI, Sound, Music, Upgrade, UI
Contents

MIDI files to run MIDI supported maps. (Binary)

Reviews
21:52, 29th Apr 2010 hawk900: Need to confirm if allowed to upload.

Moderator

M

Moderator

21:52, 29th Apr 2010
hawk900: Need to confirm if allowed to upload.
 
Level 2
Joined
Mar 28, 2010
Messages
7
masda70 said;
Remember these steps (except for the Worleditor ones of course...) need to be done in every computer that wants to play a game with midis that using this method... the effort can be worth though because you can make your maps very tiny (I have like 10 20-80 KB midis in one map that make the file take 80KB in total (after map Vex's optimizer compression ) ) allowing you to handle them easier in BNET and stuff (it sucks to take very long to upload a new version sometimes).
And you can always explain how to implement MIDI in your map (quest menu)... either by linking players here or somewhere else,etc.
This is a "somewhere else" he mentioned. In case he don't want this we can remove it but I don't think he would do it because I did not steal credit and he was trying to spread this out like I do because the map I'm working on uses MIDI files like his maps.:thumbs_up:
 
Level 12
Joined
Apr 18, 2007
Messages
1,130
Could anyone link me to a download location for the file mentioned (gm.dls)? I'm trying to get this set up on my Linux rig, but WINE doesn't have that driver installed normally, so I have to put it there manually.
 
Top