Blog Archives

Quodlibet: Sound Processing

Quodlibet & most media players with awesome media management(specially on Linux) has lacked a proper audio effects system that wraps around GStreamer’s existing plugin set. Most of the players use GStreamer as their backend but there’s little or no need to implement an effect system(because hey, most people just listen to what it plays!). For the people who need to customize what they listen to can use this patch for Quodlibet. Here goes the features,

* Multiple plugins in one pipeline – you can load up any number of plugins you want, audio will be routed in order of the plugins are loaded.

* Every plugin has an interface – not just one interface for every plugin, it builds the interface at runtime reading the plugin’s properties.

Still I haven’t made an interface for configuring what plugins are loaded. For this users will have to edit the ~/.quodlibet/config file manually. You have to change the ”gst_effect_list = ladspa-tap-equalizer” line to something like “gst_effect_list = ladspa-tap-equalizer,equalizer-10bands” to load up two plugins in this scenario the ladspa tap eq’s output is the 10 band eq’s input(make sure you have installed the necessary GStreamer packages).

Download the patch

File encryptor/decryptor

This is a rather simple file encryptor/decryptor which uses a byte mapped table for encryption. It just needs a byte array of length 256, first we have to put in numbers from 0 to 255 in to that array(no duplicates). And then jumble this up according to anyway you want(on this application, it’s done by swapping two places of the array). Because we know that all the bytes are there in the array we are sure that doing stuff like swapping it wont make the array fill up with duplicates or any alien number which was not in that array when we started. This array can be used to map a certain byte to another byte, this will be the encryption table. For decryption it’s good and fast to make a reverse mapped array based on the first array.

So what’s special on this? This one has all that and a fairly good way to jumble the numbers up(this will improve along the way, I just came up with this in two days!). The best thing about this little app is that it’s output and input both are buffered, meaning that it doesn’t need the whole file loaded to RAM. By default the buffer is 8 kB, you can change it if you want.

It should be noted that this is not entirely _that_ cross platform at the moment due to it using the ‘no echo’ feature of Unix terminals through termios.h. If this is removed, someone watching you type on Windows can see the password other than that, there’s no risk in removing that feature.

Since you read all that, or I think that you did you can now download the app(it includes compiled version for Linux x86 and the source, may be I’d compile a Windows version, may be I won’t.)

UPDATE 06-02-2011!
The previous versions may give out a mostly human readable output if you encrypt some text file with a key like “abcd” and use “abc” as decryption key — NOT good! I changed everything from the ground up, now it changes the table as it encrypts and decrypts.

Source and Linux x86 binary

PS: Oh and one last thing, DO NOT think that I made this by referring to documentation or books on encryption(hell no!). I just thought of it and coded it, so it may contain not so good approaches, and there might be vulnerabilities. Do comment on those! And I must say that I DO NOT ENSURE SAFETY OF YOUR DATA that is encrypted by this application, you are provided the source! It’s your responsibility not mine, :) . On the other hand I can’t think of a way to reverse engineer it yet, so I use it for my stuff.