Looking for some tunes for a mod

This is where you can post your Commander Keen related stories, artwork, or other stuff that is related to Commander Keen but otherwise doesn't belong in another forum.
User avatar
Commander Spleen
Lord of the Foobs
Posts: 2384
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Looking for some tunes for a mod

Post by Commander Spleen »

Anyone want to make a couple of music tracks with an upbeat/euphoric vibe?

I have a mod that's almost finished, and one of the last hang ups is music. I've managed to make a couple of basic tracks with Adlib Tracker II (the only tracker I've been able to make decent use of because reasons), but converting them properly has been way too complicated an unpredictable. The mod could easily sit there for another year or two if I try to iron out those problems or try to compose MIDI and convert it across.

Alternatively/additionally, help in converting the A2Ms properly or getting the Music TSR to play A2M or a direct A2MtoIMF conversion method would make it possible for me to quickly mash together a soundtrack.
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Looking for some tunes for a mod, too

Post by Nisaba »

Anyone want to make a couple of music tracks with a cruisin'/smooth vibe? a little something like this: https://youtu.be/zW2ldasgrOc?t=7m17s

I have a mod that's still in the making, and one of the things I'm not very skilled in is making IMF tracks. The mod could easily sit there for another year or two if I try to iron out those problems or try to compose MIDI and convert it across...

Alternatively/additionally a video tutorial on MIDI's and IMF's would be absolutely amazing and very much appreciated.

@Spleen:
I have a bunch of IMF samples and tracks which won't be featured in FitF. if you could send me an example music track and I'm gonna check my files for something matching.
out now (link) : Image
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Looking for some tunes for a mod

Post by K1n9_Duk3 »

If you have a tool that can play the music in DOSBox, then you can use the built-in OPL capture command (I think it's CTRL-ALT-F7) to record the AdLib music. The resulting .DRO file can be converted to .IMF with DRO2IMF, but you'll probably need to run my IMF Crusher with the "/fixdro" parameter on the resulting .IMF file to fix some problems caused by DRO2IMF.
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
Nisaba
Janitress
Posts: 1597
Joined: Fri Jan 01, 2016 23:34
Location: The Outpost
Contact:

Re: Looking for some tunes for a mod

Post by Nisaba »

oh, wow. so I can record any tunes from the Incredible Machine 2 via DOSBox?! that's neat. thanks for the hint!
out now (link) : Image
User avatar
Commander Spleen
Lord of the Foobs
Posts: 2384
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Re: Looking for some tunes for a mod

Post by Commander Spleen »

That's the method I've been using but it's been hit and miss getting the loop right, and there was a glitch with one of the tunes chnging instruments after retuening to the map. Had no way of telling whether it was a TSRMus bug or something wrong with the track.

I'll try IMF Crusher. Had a look at it with DRO Trimmer but couldn't make enough sense out of it to identify any errors.

Nisaba: I shall send all the things in approximately
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Re: Looking for some tunes for a mod

Post by Levellass »

Sometimes it can help to manually fiddle with your IMF files to add commands at the start that 'clear' all the channels. I have two 'creatively constructed' IMF files in LL's project (Finish your levels darn it!) that DON'T do this so the second (And subsequent) playthroughs are slightly different. This is however by design as, much like some of ROIB's music, they are meant to have a corrupted, broken vibe.

Also there's no map level, so... bonus.
What you really need, not what you think you ought to want.
User avatar
KeenRush
Android Dummy
Posts: 2560
Joined: Sat Oct 27, 2007 20:57
Location: KEEN1.EXE
Contact:

Re: Looking for some tunes for a mod

Post by KeenRush »

I'm so confused about all this stuff. So, the soundcard emulates a set of instruments that are standard-ish in the midi, right? :confused You don't have any actual sample data nor instrument definitions in the songs, right? And you need to convert the given midi to Keen's own format, right? Have I totally misunderstood it? Why is this still so complicated? What are all those programs doing? Is there any good tutorial whatsoever?
My newest mod - Commander Keen: Sunset: viewtopic.php?t=8568 | codename H.Y.E.N.A.
User avatar
Commander Spleen
Lord of the Foobs
Posts: 2384
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Re: Looking for some tunes for a mod

Post by Commander Spleen »

The Adlib sound card used a specific Yamaha FM synthesis chip to generate sound. The files contain the parameters for each instrument as well as the note data, unlike MIDI which only contains the note data and relies on external hardware/software synthesis to translate it into music. I don't know the full details of why, but there appears to have been no standardised method of storing Adlib data and so we have a multitude of different formats that do more or less the same thing. Converting between them can cause problems in a similar manner to converting graphics.
levellass wrote:Sometimes it can help to manually fiddle with your IMF files to add commands at the start that 'clear' all the channels. I have two 'creatively constructed' IMF files in LL's project (Finish your levels darn it!)
This sounds like what may be happening. I suspected something relating to instrument setup data may be involved. What are the commands you add that do this? Is there a set chunk of data that can be pasted at the start of the file or does it change depending on the rest of the file content?
User avatar
KeenRush
Android Dummy
Posts: 2560
Joined: Sat Oct 27, 2007 20:57
Location: KEEN1.EXE
Contact:

Re: Looking for some tunes for a mod

Post by KeenRush »

By the way, I could try making a song or two (for both Spleen and Nisaba) but I don't understand all this conversing and garg. If you can point me to a free and simple software and do the conversing yourself (because I can't), I could try to make the songs, but nothing technical, just the songs.
My newest mod - Commander Keen: Sunset: viewtopic.php?t=8568 | codename H.Y.E.N.A.
User avatar
Commander Spleen
Lord of the Foobs
Posts: 2384
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Re: Looking for some tunes for a mod

Post by Commander Spleen »

Adlib Tracker is the one I use. I've had some pretty good results with the tunes themeselves. If we can get the IMF conversion process handled properly, it will be ideal.

I've actually made four tracks for it myself. Two are surprisingly nice actually. One is kind of annoying (but could be better by smoothing out the lead instrument and changing the tempo) and another (which I'd forgotten about until now) is a bit short (but no shorter than Too Hot, so... :dopefish )

Two more would be ideal I think. Going for a Bloogwater Crossing/Border Village/Bloogton Tower kind of vibe. Maybe some kind of tropical steel drums element.
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Looking for some tunes for a mod

Post by K1n9_Duk3 »

Here's the (rather technical) explanation why DRO2IMF produces buggy results:

The DRO2IMF converter has issues that are related to the information stored (or rather, what's not stored) in .DRO files. The DRO format does not store any commands that set an AdLib register to 0 at the beginning of the file. This is okay, since the "official" method of resetting the original AdLib cards was setting all the registers to 0. Any program that plays .DRO files needs to take this into account and set all the AdLib registers to 0 before playing the .DRO file, which is a no-brainer since any program using the AdLib card was supposed to reset the card before playing any sounds.

DRO2IMF doesn't do that. It simply converts the commands that are present in the .DRO file into .IMF format without adding any 0s. Like I said before, resetting the AdLib card was done by setting all registers to 0, so the result of a DRO2IMF conversion might sound fine when played with an IMF player (like my IMF Player for DOS or gerstrong's IMF Player for Windows etc.). Depending on how the IMF player was programmed, you might hear a difference when the song loops around. That's because the AdLib registers that were previously set to 0 might now be set to a different value (because they were changed by the commands in the IMF song).

In a game, the effect is even worse, since the AdLib registers are not reset when a new song is started, so none of the registers that need to be set to 0 for the song to play as intended actually is set to 0. The IMF player in the game expects the IMF file to set up the AdLib registers for correct playback. But the IMF files don't do that due to the glitch in DRO2IMF.

I was experiencing this and it took me quite some time to figure out why the result of DRO2IMF didn't sound right in my IMF player. When I finally figured out what went wrong, I added the "/fixdro" option to my IMF Crusher. I guess it would have made things easier for you if I had just fixed the issue directly in DRO2IMF, but modifying the IMF Crusher was easier for me. :mort

(Yes, I know that I should have used "OPL" instead of "AdLib" when referring to the registers.)
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
Levellass
S-Triazine
Posts: 5265
Joined: Tue Sep 23, 2008 6:40

Re: Looking for some tunes for a mod

Post by Levellass »

What he said.

Glad to know there's a fix; you can insert the data manually but it's a bit annoying.
What you really need, not what you think you ought to want.
User avatar
Commander Spleen
Lord of the Foobs
Posts: 2384
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Re: Looking for some tunes for a mod

Post by Commander Spleen »

What am I looking for in DRO Trimmer to remove the first note or two of a second loop (Adlib Tracker player's annoying and apparently compulsory fade-out) or excess silence (empty pattern at end)?
User avatar
K1n9_Duk3
Vorticon Elite
Posts: 781
Joined: Mon Aug 25, 2008 9:30
Location: Germany
Contact:

Re: Looking for some tunes for a mod

Post by K1n9_Duk3 »

I don't know about DRO Trimmer, but my IMF Crusher has an option that allows you "truncate" an IMF file (erase stuff at the beginning and/or the end of the song). Using it can be a bit tricky since you need to know the length of the IMF file in samples (usually 560 samples per second). My IMF Player for DOS displays it, so that would be the easiest way to obtain that value. Another option would be to use the IMF crusher like this:

Code: Select all

imfcrush input.imf output.imf /truncate 0 999999999
This will cause imfcrush to print an error message, showing the actual length of "input.imf".

Once you know the actual length of the IMF song, you can use the "/truncate" option to remove samples at the end of the song until the resulting IMF file loops properly. Let's assume your IMF file has 12345 samples. Just run the IMF crusher like this:

Code: Select all

imfcrush input.imf output.imf /truncate 0 12344
imfcrush input.imf output.imf /truncate 0 12343
imfcrush input.imf output.imf /truncate 0 12342
imfcrush input.imf output.imf /truncate 0 12341
until the song sounds OK when played in a loop. You can also decrement by 10 or 100, of course. (Remember: 1 sample = 0.0017857142857143 seconds)
Hail to the K1n9, baby!
http://k1n9duk3.shikadi.net
User avatar
Commander Spleen
Lord of the Foobs
Posts: 2384
Joined: Wed Oct 31, 2007 22:54
Location: Border Village
Contact:

Re: Looking for some tunes for a mod

Post by Commander Spleen »

Ok, truncating seems to be working. Just a matter of trial and error to get that right. Ran /fixdro on it so next will be to test a couple of songs in game.

But, one problem: It appears to have brought my lead instrument down an octave.

Edit: Added /keepfirst, so I guess it had removed the whole first channel where the lead resides (it's been a long time since I composed this--there must be a similar melody running at a lower octave).

Edit: Weird, now TSRMus isn't even detecting the IMF output by dro2imf. Plays fine in imfplay, and I have several that were converted this way previously and they still play properly through TSRMus. Although those ones were recorded via direct playback in Adlib Tracker II instead of its separate player utility. [Just captured and converted using the tracker itself again, and still no dice.]

I ar upload the files here

bounder2.a2m = original AT2 track
bounder2.dro = converted dro via AT2 player
bounder2a.imf = converted to IMF with dro2imf
bounder2b.imf = truncated with imfcrush
bounder2x.imf = functional version with instrument glitch

Edit: Just converted all the old working IMFs with imfcrush and now TSRMus won't play them. There appears to be some kind of an incompatibility going on here.
Post Reply