Page 2 of 4

Posted: Sat Mar 09, 2013 3:57
by Keening_Product
I agree with the two comments above - that's a very typical reaction for a 64-bit system.

If command line doesn't work then try it in DOSBox.

Posted: Sat Mar 09, 2013 5:29
by TerminILL
The tools beside the player are Win32 programs. They have no issue on 64-bit systems, and won't run in DOSBox at all. I suspect Levack simply doesn't know how to use them - there's no graphical interface, but you don't need the commandline for basic usage, dragging and dropping the involved files onto the EXE.

The tools are great, while I don't have extensive experience with these things, the MIDI to IMF converter produced reliably better results than IMF Creator's untweaked output with the few, fairly complex MIDIs I tried.

Posted: Sat Mar 09, 2013 17:20
by _mr_m_
T-Squared wrote:I would suggest using IMF Creator instead, because it has IMF formats for Wolfenstein 3D, Duke Nukem II, and... shoot, there's one more that I can't remember.

You can:
*make custom instruments and save them to an OPL file.
*set the proper music speed (in Hz)
*even LISTEN to the music file before you export it! (However, this is a bit of a snag, as the music instruments can sound different in-game.)
all from within the program!
This is true but unless you have a solid understanding of how to create custom patches for instruments -- and even then, as you pointed out, they may not sound the same in-game.

I've found that K1n9 Duke's IMF creator results in a what-you-hear-is-what-you-get song.

Although I wonder if you can alter the OPL patches in the source code or maybe the MAME code that was used...I can't say much more because there is no source available.

Posted: Sat Mar 09, 2013 18:06
by Gridlock
Using the -chunk option, I was indeed able to get imfs created in this program to play in Keen 4. Very awesome. I noticed these imf files sound nearly identical in-game to when they're played with another program, IMFPlayerWin32. I haven't actually gotten K1n9_Duk3's imf player to work yet, though I'm probably just not using the correct batch file commands or something. This level of accuracy is quite nice.

Posted: Fri Mar 15, 2013 8:51
by K1n9_Duk3
Levellass wrote:Also, could you put an IMF file option in? I'd like to be able to scan an existing IMF file and remove all the dummy commands; I have noticed that the converter does this very well, but I don't always like how it converts midis and would like to modify existing IMF files. I assume this should be trivial to add.
You can use K1n9_Duk3's IMF crusher to do that. It also allows you to convert IMF rates and convert files from plain IMF (Type 0) to AudioT chunks (Type 1). GPL'ed source code is included.
T-Squared wrote:I would suggest using IMF Creator instead, because it has IMF formats for Wolfenstein 3D, Duke Nukem II, and... shoot, there's one more that I can't remember.

You can:
*make custom instruments and save them to an OPL file.
*set the proper music speed (in Hz)
*even LISTEN to the music file before you export it! (However, this is a bit of a snag, as the music instruments can sound different in-game.)
all from within the program!
As I wrote in my first post, I didn't check for other IMF tools before writing my own tools. The only IMF converter I knew was Dark One's MUS2IMF (which didn't work correctly most of the time).

I might create a custom instrument file for IMF Creator someday, based on the Timbre file used in my MID2IMF tool.
Gridlock wrote:I haven't actually gotten K1n9_Duk3's imf player to work yet, though I'm probably just not using the correct batch file commands or something.
It is a DOS program. You'll probably only get it to run in DOSBox. This is one way to use it:

1. Put my IMFPLAY.EXE and your IMF files into the same folder.
2. Drag IMFPLAY.EXE onto your DOSBOX.EXE. This will start DOSBox and run IMFPLAY.EXE in DOSBox, putting out the default help text.
3. Type "imfplay song.imf" and press enter to play "song.imf" (just an examlpe).

Note: Gerstrongs IMF Player (a.k.a. IMFPlayerWin32) had a bug that would cause the player to crash when playing IMF files that use rhythm mode (only used by some of Moster Bash's IMF files). You can find an updated version of the IMF Player here:
http://k1n9duk3.k1.ohost.de/files/imfpl ... 32_v21.zip (Source Code: http://k1n9duk3.k1.ohost.de/files/imfplayer_v21_src.zip)

Posted: Sat Mar 16, 2013 8:56
by Levellass
Most excellent, in many modding situations every byte counts and this has helped reduce memory errors significantly.

Posted: Sat Mar 16, 2013 18:55
by Gridlock
Hold on, did you say this IMF crusher can reduce the size of an imf file? Because that would be immensely helpful.

Posted: Sat Mar 16, 2013 19:08
by MoffD
Thanks for the imf2wav, Now I have mp3's of all of the keen songs for my music player ;)

Posted: Sun Mar 17, 2013 3:24
by Keening_Product
MoffD wrote:Thanks for the imf2wav, Now I have mp3's of all of the keen songs for my music player ;)
Oh, the compression, it burns!

Posted: Sun Mar 17, 2013 6:38
by Levellass
Sir, you want to get yourself a good compressor. Wave files are nice, but terrible space hogs.

Posted: Mon Mar 18, 2013 11:49
by MoffD
Keening_Product wrote:
MoffD wrote:Thanks for the imf2wav, Now I have mp3's of all of the keen songs for my music player ;)
Oh, the compression, it burns!
Heh, I think they sound fine compressed. I just don't have much space on my player for wav files :D

and it's better than midi files

Posted: Wed Mar 27, 2013 7:41
by K1n9_Duk3
_mr_m_ wrote:Although I wonder if you can alter the OPL patches in the source code or maybe the MAME code that was used...I can't say much more because there is no source available.
MID2IMF doesn't use any MAME code. All it does is parsing MIDI files and converting the MIDI commands into register/value pairs that can be sent to an OPL chip to play the MIDI song.

You can alter the OPL patches (the timbre file), and you don't even need to alter the source code for that. The timbre file is included in the executable and can be exported using the /dumptimbre option. You can then edit the timbre file (using a hex editor) and tell the converter to use your custom timbre file by passing the /timbre=<file> option.

I know that using a hex editor for this isn't very comfortable, but that's just how it is. I recommend using this page on the ModdingWiki and this text file to learn what the values in the timbre file do. For the first eleven bytes of a timbre file, you can simply copy the first eleven bytes of any standard sound blaster instrument data. The values for Transpose and Velocity are not part of the standard sound blaster instrument data, so you might have to use trial and error to find the best values for them.

Posted: Wed Apr 10, 2013 4:13
by thehackercat
Bump.

I've got an IMF issue, and this seems like the thread in which to ask about it.

The volume of my IMF files is very low. Even with "quiet adlib sounds" enabled, the music is pretty hard to hear over the sound effects. I'm using K1n9_Duk3's mid2imf program and also IMFCRUSH.

I have not tampered with the "-VOLUME" switch or anything like that, and the key velocities within the MIDIs are all at default! I don't know what's going on! Can anyone tell me how to get these IMFs to a higher volume?

Thanks.

Posted: Wed Apr 10, 2013 12:17
by K1n9_Duk3
I've had similar problems with some MIDI files and I haven't found a good way to solve this issue. The default volume for mid2imf is already set to the maximum, so you cannot get a higher volume with that. Try using different instruments or raising the overall volume in your MIDI file (each instrument has its own volume setting in the mid2imf timbre file).

One thing you could try is using IMFCreator to convert your MIDI song to IMF. This might create an IMF file with higher volume.

Another solution would be to create a customized timbre file for midi2imf, but that's not really an easy task.

Posted: Wed Apr 10, 2013 14:43
by _mr_m_
K1n9_Duk3 wrote:
Another solution would be to create a customized timbre file for midi2imf, but that's not really an easy task.
Challenge accepted.