Are you looking to take a collection of .IT, .MOD, .XM, or .ST3 modules with overlapping samples and compress them into a much smaller package, effectively deduplicating any sample data across the tracks? Well, you’ve found the right corner of the internet for that.
WSF is a format designed to reduce redundancy in modules. In a collection of modules that uses the same samples (game soundtracks), a lot of data for these samples will be contained twice. Obviously, this is not ideal.
WSF stores samples in a separate sample pack container (the WSP) – any duplicate samples (including samples derived from others) will dupe-checked and stored appropriately.
A side benefit: WSF also allows music to be protected using a very primitive password-encoding scheme, to encourage those who enjoy music to seek it through more appropriate channels.
Check out WSF Library Source on github if you want to get deep, or simply download the tools here:
WinWSFTool.exe – a simple program for converting, packaging, extracting, and manipulating “WSF” files. I think this tool is straight forward, but curious souls should ask me on Twitter, or create a Github Issue.
wsftool.exe – a command line tool designed to achieve the same results as the windows equivalent. I just compiled this sucker yesterday!
Flat out apologies now about the source, which is quite outdated, and could use a port for usefulness in UNIX/MAC – I just haven’t had the time. 🙁 I’ve also had no luck recovering the WinWSFTool source, even though it is mentioned in the git repository, but I’m fairly confident it’s backed up on 1 of at least 20 DVDs in my basement…
Much thanks to @_aquellex on Twitter for opening this amazing can of worms that led to this post.
The Story Behind WSF
In early 2004, preceding the release of The Spirit Engine 1, I was faced with an interesting challenge.
How would I fit a 76 track soundtrack into a package people could actually download?
The soundtrack itself was 28mb, and at the time of release, the download for the full game was 40mb. So how did it happen? (Well, we got it down to 14,576kb, or ~14mb!)
Impulse Tracker songs, along with its sister formats, ScreamTracker, MODULEs, and XMs, were unique in that they contained both song data, and sound data. This is in stark contrast to general MIDIs, which relied entirely on built-in soundfonts or instrument definitions (FM cards) to operate.
Around the same time, I had witnessed the birth of the PSF Sound Format, which allowed users to listen to music from Playstation and Playstation 2 games by means of sound emulation. One neat trick they used was to compress redundant code into a master library file, creating MiniPSFs.
So, I began to create two things. A module player extension for Clickteam products (Multimedia Fusion 2, Click n Create at the time) called ONU, and a tool for deduplicating the samples called WSFTool.
While I was hoping the idea would catch on in the “One Hour Compo” scene, where participants compose modules using a “sample pack” in an hour, and ultimately had to download those songs and vote on them, improvements in bandwidth outpaced the complication.
That said, the uses applied to game soundtracks well, and WSF files were used in The Spirit Engine, Noitu Love 2, and Bonesaw: The Game, to name a few.
I did something similar later on for GunGirl 2 and The Spirit Engine 2, but those soundtracks were ultimately rendered to OGG Vorbis files when they were distributed because they were created in hybrid tools like Renoise and Sonar.