Category Archives: Miscellaneous

Mods, Mods, Mods: A few updates

I’ve been publishing some small projects lately, so I thought it was a good time for an update on them and how things are going.

My health is still not good. I think the progression of my illness has slowed slightly as I’ve become more aware of how it functions and how to manage it.  However, I’m still not aware of what it is.  I’m still researching and analyzing and fighting to figure it out, though.  But it is probably some kind of rare genetic metabolic disorder.  Regardless, I have to take things slow and put any energies into smaller, less-intense projects.

Mod Music Conversion

One such project was converting all my old mod music into MP3s so I could listen to them more conveniently.  I’ve been manually converting small batches of mods for years and found through that process that many automated ways of transcoding mods had issues.  Either metadata would be left out or certain bits wouldn’t sound right or the volume was too low or the frequency balance would be muddy sounding.  This is why I would always just playback the mod in ModPlug Player (my player of choice) and directly record the output into Audition, tweak the volume, save to MP3, and done.  You can’t reasonably do this for a library of over 400 songs, though.

The first problem I wanted to tackle was getting as much metadata out of a module file as possible and putting it into an MP3 file’s ID3 tags. I started looking into libOpenMPT as a way to open the four major mod formats and grab their metadata in a standardized way.  It’s a decent library, but the documentation could use some work. I had to read through its source code for hours until realizing that it returns strings at UTF8. This was only a problem because .Net can only marshal strings from unmanaged memory that are ANSI or UTF16 by default, which seems pretty weird given UTF8 is so common.  But one custom UTF8 marshaling function later and I was in business.

The next problem was that the mod metadata ended up being not the greatest. Almost all mods have a title and a field for what tracker software was used, but modification date only became a feature by the Impulse Tracker format, and none of the main formats have artist fields.  I had to use a lot of regex magic to even get a fraction of the date and artist metadata from the song comments.  The comments, by the way, are another quirk of the mod formats.  Artists typically put notes about their work in the comments; however, only Impulse Tracker had a specific field for this. The earlier formats used either sample names or instruments for these notes.  Being that I wanted to preserve all of this in the extracted metadata, I just concatenated all three fields together with some delimiters between them.

Luckily, getting the extracted metadata into an MP3 file is a bit more simple as there are a number of ID3 libraries for .Net.  TaglibSharp is the most popular one, but it is not without its quirks as well.  Particularly, trying to delete specific user text frames (TXXX) is not the least bit straightforward.  But in the end, I came up with an imperfect little tool to copy module metadata to an MP3 file (or output to text if necessary for your purposes) that I put up on Github.  Thankfully, ID3 is a much better tagging format than what module files used. 😄

As I was trying to figure out how to work with libOpenMPT, though, I discovered that ffmpeg also uses this library to load module audio. Given that libOpenMPT was basically the evolution of ModPlug, I thought that the playback might be comparable between the two. I did some test runs converting a few songs to MP3 and found the results to be promising.  Obviously, the aforementioned muddiness of the sound persists, but I then found that ffmpeg has quite a vast library of audio filters to utilize. One EQ later and that issue is fixed right up.

What was more of a struggle was how to balance the volume of the songs.  Naturally, you don’t want to risk clipping the audio data by doing a straight up amplify.  ffmpeg does include a hard limit filter to avoid clipping, but how do you know how much to amplify?  You can’t normalize a song’s audio without having the whole song to analyze and ffmpeg only works in streams of audio data.  It’s a problem I have yet to find a straightforward way to tackle. In the end, I used the loudnorm filter to extract the loudness of the song, calculated the amplitude needed to reach about -10 LUFS, and then did a second pass including the desired hard limit.  More information on the whole conversion process can be found on the Github page for the metadata extractor.

Ultimately, I’m fairly pleased with the results of this project. I did get my entire mod library converted to MP3 with some snazzy album art and good sound.  But I also did end up having to manually adjust a lot of the artist names and titles in MusicBrainz Picard to catch all the missing artists and make them all uniform, so that was a bit of a drag. Also, there are a few songs that seem to have minor issues with conversion accuracy, primarily Necros songs coincidentally.  I may still end up manually recording a number of the songs ultimately, but what I’ve got so far is pretty damn good.

Mods MP3 library in Dark Audio Station

Mods MP3 library in Dark Audio Station

Deus Ex Soundtrack v2

Given that I was already binging old mods, my conversion of the Deus Ex Soundtrack—which was originally in the mod format—kept coming up on shuffle.  However, I was getting pretty annoyed at how quiet the songs were as I had stupidly only normalized the volume instead of hard limiting it.  I thought it would be a quick couple day project of loading up the original wave recordings and tweaking the volume levels, but I soon found lots of other lingering issues with those recordings.  It was mainly just clicking from bad sample loops or poorly recorded/encoded samples.  I imagine this was due to a combination of time crunch and crude audio tools during the soundtrack’s original creation, so I can’t fault Alex Brandon too much.  Coincidentally, if you need to go insane, try finding the right loop points that make an audio sample not click and sound decent. 😛

Eventually, I ended up re-doing from scratch about a third of the soundtrack as I had also stupidly not saved the intermediate mod files from the original conversion. 😄  So, every one of the those bad 8-bit samples had to be cleaned up again.  To be fair, I think I did an even better job with that as audio editors have gotten a bit more advanced in the interim.  I’d like to redo the entire soundtrack, but many of the songs were pretty decent already and I’m kinda burnt out on it for now. But maybe in the future…

At this time, I’ve already uploaded the MP3 version of the new soundtrack conversion to its page.  I’m still working on getting a new FLAC version done as it has a different tagging format.  And I’m also thinking about making the intermediate mod files available for download, although obviously that would only include the tracks I redid recently.  These files would be Impulse Tracker format with all the samples cleaned up and other fixes and new outros included.  Additionally, I’m also exploring the possibility of copying the cleaned up samples back to the original UMX files to improve the game music as well.

Deus Ex Soundtrack Cover Art

Deus Ex Soundtrack Cover Art

Diablo 2 Mods

And in another kind of modding, Diablo 2 mods!  Yes, I am still modding this old ass, janky game.  However, that may be changing soon with the imminent release of the Remastered version of the game.  Blizzard said modding is still possible in the new release, but I highly doubt it’s as comprehensive.  I would be delighted to hear they switched the data format away from TSV text tables, though.  I’d think something more object-oriented where you could define a default item, inherit and change what needs to in child items, and modify some of the raw functions would be the dream.  But, I’d be pleased with at least a switch to JSON for the data definitions.

Regardless, I haven’t done too much modding this time around. I just overhauled how the respec and socketing mod works.  I realized that I could just add the Token of Absolution—an item which resets your skill and stat point allocation—right to a vendor instead of continuing to use the Horadric Cube recipe.  It’s a little janky this way as I had to change its item type to that of a potion to get the tooltip to work, but right-clicking on the ToA still gives the desired result, albeit with the drawback that the game crashes if you try to give the vendor more than one to sell, it can be put on your belt, and its cost changes based on what level the character is.

I also realized that I should include a recipe for adding sockets to items in the mod as there already is one but it’s crazy high-level and convoluted.  Tangent, but, isn’t it lame how you have to “remember” all these cube recipes to play the game.  We’re all looking them up on a wiki anyways and that’s not fun.  I’m glad Diablo 3 got rid of that aspect.  Anyways, I changed the recipe that adds sockets to something more reasonable but still balanced.  And I also discovered that there was an unused recipe function that allowed gems to be removed from sockets without destroying them, so I added a new recipe for that as well.  However, both of these recipes require gems to perform.  I’ve been thinking about adding a new rare crafting material that could be used in the socket recipes, but it seems like a lot of work plus would take valuable inventory space even if the mats stacked.

I’m also thinking about removing the Magic Find attribute from my drops mod.  It’s kind of a counter-productive stat to have on items, like it doesn’t help you survive or kill monsters but you want it maxed out so you can find the best loot.  I just feel like the loot drops should always be good—in a fun and balanced way.  So I might just remove magic find and increase the drop chances even more, but it’s a tough one because it needs lots of testing before release.

Final Thoughts

I hope you enjoyed this developer diary of a post.  My apologies for not doing more awesomeness in recent years, but… it’s something at least.  I think next I might try to give this site an overhaul; I’ve been neglecting to add proper mobile support for many years and the WordPress theme is like a decade old.  I’m still dreaming of doing an update to Cursor Lock, though; I think it’s passed about a half-million downloads across all sites now.  However, I’d really love to do a major update on File Lister as it’s the program of mine that I use the most.  It’s just so crazy useful for doing batch operations and management on files, and I’d like to extend that capability.

Take care, everyone.  Stay safe and don’t get the ‘rona!

Posted in Media, Miscellaneous, Modding, Programming | Tagged , , , , | Leave a comment

How to Fix America Part 1: Election and Campaign Reform

It’s becoming apparent to me that if we ever want to fix the many serious problems of this nation, we must elect the President and Congress in a more fair and inclusive way where they actually represent their constituents.  The following is a list of what I think are common-sense solutions that would fix federal campaigns and elections so that these elected officials might actually be capable of doing the job that we sent them to do.  Please share.

  1. Election day must be a federal holiday.  All states must allow same-day voter registration.
    Every citizen should be encouraged and able to vote.
  2. No state may hold a party primary earlier than four months before federal elections.
    End the constant campaigning.
  3. All candidates for federal election may take only public financing and individual donations no more than $1000 per candidate per election.
    No more bought politicians.
  4. Congress will have term limits.  Senators may serve no more than three full terms (18 years).  Representatives may serve no more than five full terms (ten years).
    End the reigns of career politicians.
  5. Presidents are elected by popular vote, not Electoral College.
    No more elections decided by swing states.
  6. Congressional redistricting must be done by an impartial computer algorithm that only takes population into account and not demographics. or
    End gerrymandering.

† Requires federal law ‡ Requires laws in all states ♦ Requires constitutional amendment

Posted in Miscellaneous | Tagged | Leave a comment

File Lister 1.6 Out

The new version of File Lister is available now. Download here. Changelog follows.

  • added counters to output format with pattern %i
  • added the option to use regex capturing groups in output format with pattern %v
  • added option to match full path in regex instead of only filename
  • added option to invert matching behavior for regex
  • rewrote output format parser to be pre-compiled for speed improvement
  • optimized regex matching for significant speed improvement when using regex
  • removed default pattern option from pattern selection menu, added “Default” buttons to some dialogs
  • fixed crash if output file in use by another program
  • fixed a bug with groupings in filesize pattern
  • fixed missing use of default options for date, size, and attributes patterns without parameters
Posted in Miscellaneous | Tagged | Leave a comment

File Lister and Company of Heroes

A new version of File Lister is in beta now. I’ve been repeatedly finding it useful both at home and at work, so I figured it was the most deserving of an update. Besides a few bug fixes, there are also performance improvements, some more regex matching options, and the addition of counters and regex capturing groups in the output format. I’m hoping to release a final version within the next month. And this next release may not even be the end of the updates to File Lister as I’m also looking at adding features like command line modes in the future.


Hurtgen Forest at night

I’m also trying my hardest to get my Company of Heroes map finally done (damn me and my perfectionism!), even if there’s no one around to play it anymore. It’s just too good and too close to completion to let it go unfinished. There’s just 1/8th of the playable area left to create and some of the out-of-bounds yet to be filled with trees–it really shouldn’t take but another concerted effort of a weekend.

And I’ve finally decided on a name for the map: “Hurtgen Forest“. Since my map is pretty much a fictional setting, I didn’t want to be too specific with the location. Though, I had always considered that it would probably be named after some area in Belgium or northwest Germany.

Posted in Miscellaneous | Tagged , , , | Leave a comment

Things and Stuff

This is going to be a rather random post–just a list of some of the cooler things I’ve been up to. I’ve been noticing how this feels more and more like a blog, but I do try to keep the personal details out of it. I don’t think anyone (maybe Kaylen) cares what I had for dinner last night (Pork Lo Mein), what I last watched on TV (CNN), or when I stumbled out of bed today (3PM).

Since the spring semester of college was over a couple weeks ago (one A, two B’s, and a C), Kaylen and I finally got a chance to go camping. Her school, UVA, is only 30 minutes from the lovely Shenandoah National Park, so we went there and stayed at a centrally-located campground called Lewis Mountain. It was a decent campground (well-maintained), albeit pricey (want a 10 minute shower? 2 bucks). It was surprisingly popular, too; most days there were almost no free spots by the evening. I enjoyed making fires and gathering firewood so we could cook the food, but the low abundance of good wood meant short-lived fires. The second day, we went hiking on a trail called White Oak Canyon, but alas we turned around not far from the actual falls and only saw cascades; we’ll be sure to carry trail maps in the future. I’ve uploaded most of the pictures we took (including some impressive panoramas) to the photo album in this directory.


I said "Don't you like popsicles?"

When we got back home, I uncovered a set of popsicle makers in the basement. Kaylen and I had much fun trying out different frozen snacks such as Dr. Pepper, Code Red, apple juice, orange juice, pudding, and raspberry snowcone syrup. The only problem is the amount of water in the substances. Many of the drinks just have too much water; causing mostly ice crystals and little flavor. So we tried experimenting with reducing the water by heating the beverage on the stove; it works perfectly for sodas. About half syrup and half water is the best blend. Delicious.

With my new time off, I’ve been back to work on several things, of course. I dabbled with the code to my as-of-yet-unreleased alarm program some a few days ago, mainly touching on a few bugs and missing features (buttons that go to nowhere). It’s been a little hard going back to it since I haven’t really looked at the code much since last summer (it’s a shame); I’m wishing now that I had commented the code more. But with any luck, I might be able to finally get the few kinks out of it and release it publicly, maybe even to some download sites. The reason I only gave it out to a select few beta testers previously is that it was proving to be unreliable in a few rare instances, and an alarm that’s unreliable is no good.

But for the last few days, I’ve been putting together a new column on PC air cooling. I took some logs from MBM and turned the data into some pretty graphs in Excel and then analyzed the results. It’s mostly just neat to see how the temperatures interact to certain events, as my conclusions are pretty obvious for any computer professional. You can find it here.

As for entertainment, I’ve been getting back into Rise of Nations after being disappointed with Stalker’s linear, buggy gameplay. I finally finished Alexander the Great’s campaign for the first time and now I’ve moved on to a mod version of the Entire World (Baryonyx’s Extended mod). This could be good news for anyone still playing RoN as I may get into making some more scripts and improvements to my ScriptMaker, as well as finally releasing my map pack mod.

I’ve also been having some fun with the new Sam & Max season. I tried playing some adventure games before, but just couldn’t get into all the walking around and trying every combination of things to progress the story. With Sam & Max, either the puzzles are easier than they used to be or I’m just more intelligent enough to figure them out now. Either way, it’s an amusing little game that I can’t get enough of.

Posted in Gaming, Miscellaneous, Modding | Tagged , , , | Leave a comment

Rise of Legends Beta

It arrived today! Twas direct from Microsoft in Washington. Of course, they send it and the preceding email while I was away on family business, but at least it’s finally here. There are 4 CDs; I hope to fuck that the retail version is DVD. Here’s a couple pics. I’ll post again when I’ve had some time to really dig into it. Spring break is saved!

I’ve also been working on some new apps (one using DirectX) and stuff, but nothing releasable. I suppose they’ll be put on the backburner, now.

Posted in Miscellaneous | Tagged | Leave a comment