Gstreamer-delta: Audio Sharpening plugin

04Nov10

I have written the gstreamer-delta plugin which applies sharpening to an audio stream. Foobar users will know this as the Noise Sharpening plugin (a.k.a. foo_dsp_delta). One of my favourite dsp plugins from the Windows world which was sadly missing from the land of Linux. I set out looking for a way to insert a dsp plugin into Linux audio players such as Rhythmbox. Luckily the task was much easier than I had expected for players which use the Gstreamer backend (e.g. Rhythmbox, Banshee).

Thanks to this post on the Ubuntu Forums I found that there is a gconf key which Gstreamer based players use to determine which audio sink to connect to. It turns out that you can modify the key with a partial pipeline. Elements can be inserted before the audio sink in effect creating a custom dsp chain. The gconf key on Ubuntu 10.10 is /system/gstreamer/0.10/default/musicaudiosink. Now the default audio sink is autoaudiosink. To add plugins to the pipeline simply add the plugin id and it’s options prior to the audio sink. Each plugin is separated by a “!“.

For example:

delta gain=120 !  autoaudiosink

The above setting will insert the audio sharpening plugin before the audio output plugin in the Gstreamer music playback with a gain setting of 120%.

The plugin is hosted on my PPA:

If the plugin is working then something similar to the following should be shown in the terminal when a Gstreamer based audio player begins playing music. The values may be different depending on your audio file/output format.

Caps negotiation succeeded with 1 is_int @ 2 channels, endianness 1, width 32, depth 32, sign 1

This plugin supports mono and stereo (un)signed int and floating point inputs to maximize compatibility with audio streams (Although I have not tested this to an great extent). The gain parameter works much like the setting on the Foobar plugin. The accepted values are from 0-200%, with the default at 100%. There is a debug parameter (silent) which defaults to true. Set it to false to print some useless debug info (mostly used to check whether the plugin/dsp chain is actually working).

There is another plugin which I use is called the crossfeed plugin. This is a Bauer stereophonic-to-binaural DSP by lazka which can be obtained here. A stereo mix is usually designed for listening from speakers. The sound from each channel is meant to reach both ears which does not happen when listening on headphones. This is plugin mixes the right and left channels for headphone listeners to simulate that.

Finally, here is what my gconf key looks like:

delta gain=120 ! crossfeed preset=1 ! autoaudiosink

 

There are a number of other plugins for Gstreamer included by default a lot of which have nothing to do with audio processing. Many that do don’t seem to be very useful for listening to music. At least none that I have found yet from looking briefly through the list.  There are a few limiter plugins which some might find useful however they don’t seem to be immediately usable since some only support 1 channel pads or float data (it seems like most audio players prefer to output in int format).

Advertisements


6 Responses to “Gstreamer-delta: Audio Sharpening plugin”

  1. 1 Anonymous

    THANK YOU! Noise sharpening was the only thing left that kept me running fb2k through WINE.

  2. 2 Christian

    Im completely new to linux.
    I use foobar in windows without any issue, I tried several audio players but foobar is the best by far because of the noise filter.
    I only play flac files with a very high quality headphones to enjoy the experience.
    So in linux, I have to install this plugin in what program?
    Thanks

  3. 3 John

    I am very eager to try your delta plugin, but – as a Linux noob – I am unsure how to download it. I have run
    sudo add-apt-repository ppa:decatf/testy
    and the repository does show up when I look for it in Synaptic. Now I assume I must download something from the repository, but I don’t know the name of the package. I tried
    sudo apt-get install delta
    but that didn’t seem to work. When I run
    gst-inspect
    I do not see any delta plugin.
    I guess I just don’t know what I’m looking for. Sorry to bother you with something that is probably trivial. Can you give me a step-by-step on how to download and how to verify that it was successful? Many thanks.

  4. yeah!! noise sharpening in linux, the one that i’ve been waiting till this time. \m/ thank you decatf

  5. ok tried it!

    sudo add-apt-repository ppa:decatf/testy
    sudo apt-get update && sudo apt-get install delta

    then run

    Code:
    gconftool –type string –set /system/gstreamer/0.10/default/musicaudiosink “delta gain=100 ! autoaudiosink”
    Gstreamer delta: Audio sharpening plugin
    – Valid gain values [0 200]. Default 100


  1. 1 noise sharpening versi linux | ngibul123

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: