Monday, October 31, 2011

Simple Range Compressor

I made brief mention in the previous post about a little Windows tool that I wrote.  It's called Simple Range Compressor.  You can download it from here.  There's a good reason that the word 'simple' is in the title:

The purpose of this program is to perform dynamic range compression.  What this means is that it will attempt to make all sound play at the same volume.  In terms of PseudoTV, it will try to make each show / movie play at the same volume.  It will also keep those shows / movies playing at that volume no matter what is happening on screen.  Going from dialog to explosions shouldn't make any difference.

First the why
There are two main reasons to use this.  First is equalizing volume across shows.  If you play back a few shows in a row then you know that they aren't the same volume.  If you then switch to a movie, those are generally much different.  I hate messing with the volume control all of the time...this prevents that need.

The second reason is for those that don't want to wake their roommate / wife / baby.  You can watch a movie and not have to worry that it will suddenly get extremely load, or that you turn it down and can no longer hear the dialog.  They are the same volume.

Now for the how
Windows Vista and Windows 7 changed how they did audio quite a bit from previous versions.  They allow easy access to many things that used to be driver-dependent.  Simple Range Compressor is a very small program.  I took the easy, but effective, way out.  When the program starts, it notes the volume level that you have set.  It will then try to have all sounds play at that level.  It does this by actually adjusting the volume position itself.  If you click on the volume control you can see that it will slide up and down on its own.  This is also why you don't want the volume to be set to the maximum when using this: there is no room for changing the volume of the sound...explosions are already at that maximum, and it can't increase the volume in order for you to hear dialog.

Why is it simple
There are a few things that all dynamic range compression algorithms have to deal with...threshold, attack time,  and release time.  This program deals with those concepts as well.  Thing is, I just don't think that anyone cares.  If I set a threshold to -75db, does someone really care enough to change that to -70?  If I have an attack time of 20ms, will it make a big difference if it's 15ms instead?  I've set these things to what sounds best on my videos.  Since, after finding the values that I liked, I have no desire to change them anymore, I decided that I just wouldn't make them options at all.  Start the program, minimize it to put it in the system tray, and forget about it.

I hope people find some value in this.  I've been searching for a while for something to do this sort of thing, and I think this is a good solution.  I'm asking that if you try it and like it, please donate $1.00.  Not a lot, but I'm considering it an 'app' and that seems like a reasonable price.


Friday, October 28, 2011

Version 2.0 Released

Version 2.0 is finally out the door.  Here are some of the new features:

Channel Rules

This is the big feature for this release.  You're now able to customize every channel with a set of (currently) 12 different rules.  Here is a quick rundown:

Scheduling - Want to watch The Daily Show every night at 7:00?  Schedule your channel to play it.

Don't play this channel - Since some rules use other channels as modifiers (scheduling and interleaving), you may not want to actually play your channel that only has dozens of Battlestar Galactica episodes.  Hide it with this rule.

Don't play a show on this channel - I want to watch my episodes of Alias in order, but they keep showing up on my ABC channel.  Excluding them is only a rule away.

Force Random / Real-Time / Resume - While most people use Real-Time mode (as recommended), you can now have a channel be different from the rest.

Rename a channel - Don't like the default channel name?  Rename it to "Chick Stuff" to show that only your wife wants to watch the crap that plays on this channel*.

Interleaving - Are you one of those people that likes bumpers?  Then just create a channel that has only the bumpers and use this rule on your main channel to interleave those bumpers in between your shows.

Only play unwatched shows - If the channel contents change a lot, there's no reason to watch the same shows over and over.  Hide things you've watched from this channel with ease.

Only play watched shows - Don't want to spoil a movie by accidentally seeing part of the middle?  Hide shows that haven't been watched yet.

Play shows in order - Now you can make sure that when you're watching Top Chef, the next episode that comes on will actually be the next episode in the series.

Always Keep Paused - Don't want to miss an episode of The Big Bang Theory?  Make sure that if you're not watching it, it stays paused.  This rule goes great with the "Play shows in order" and "Force resume" rules!

* this is really the channel name I have for where my wife's crappy shows play.

Channel Sharing

I'm an old man, so my bed time is 10pm.  If I'm in the middle of a show at 9:15 and want to go from downstairs to upstairs, I just turn off the TV and turn on my system in my bedroom.  The channels are shared between the two so I can keep watching where I left off.  Huzzah!

Setting this up is a simple matter of pointing each computer to the same directory in the addon settings:

Background Channel Loading

As someone without patience, I want everything to start as quickly as possible.  Can I get rid of the loading time all together?  No...sorry.  I can cut it down, though.  As long as at least one channel is ready to go, that channel will be started.  Every other channel will be updated and added to the system as soon as they are ready.  A little notification will be given to show that channels are loading:

And another is shown when a new channel is available:

Other Changes

There are some other new things going on, although they may not be as obvious.  Here's a quick rundown:

Directory-type channels are supported now.
The EPG clock can be set to use a 12-hour or 24-hour clock.
Channel creation for first-time users has been significantly improved.
Time accuracy between restarts is essentially perfect now...or close enough for government work.
The EPG should function a bit quicker now.

I hope you enjoy the changes.  There are still a couple of bugs to be worked out (IceLibrary doesn't work, yet) and a couple of features, but this version feels pretty solid to me.

As a side note, I've created a little Windows program (Vista and Windows 7 only) called the "Simple Range Compressor" that tries to maintain the same volume between shows by performing some dynamic range compression using the Windows volume slider...wacky, but it works:

Download it here, discuss it here.