Sound filtering... with the Gimp!
Make Gimp work as an ideal digital sound filter
Download the whole article as PDF
- 2008-02-25
- User space | Easy
-
Write a full post in response to this!
Gimp is universally used for image manipulation. However, with a bit of creativity and a couple of tricks, it can also be used as an audio filter! Here is how…
Sound filters
If you are familiar with sound filters, you can skip this introduction. For those of you who don’t know about filters, here is a brief explanation.
A sound, like all signals, is measured in Hz (Hertz). That measure expresses the signal frequency. The lower the measure, the lower the frequency. A filter is a tool that enhances one or more signal frequencies, according to a criterion. In an ideal world, a filter completely suppresses undesired frequencies. Unfortunately, we don’t live in an ideal world.
A real low-pass filter is something that receives an input signal and outputs its low frequency components
I will concentrate on a single filter: low-pass. A real low-pass filter is something that receives an input signal and outputs its low frequency components. To be more precise, it attenuates those frequencies higher than a set one (the cut-off frenquency). As you see in figure 1, it just approximates theoretical behavior.
In this article I propose a three-step method to achieve an ideal low-pass filter for sound signals. Gimp is the key tool for this method. Of course, I’m cheating: I need to use a program that transforms a sound file into a suitable image. Then, I can “low-pass filter” that image and get back the filtered sound from it.
Note that I put “low-pass filter” in quotes: I won’t get Gimp to apply an image low-pass filter (i.e., a blur operator). But, be patient: in a few lines I’ll unveil the “trick”.
Pre- and post- sound processing with Arse
Before passing it to Gimp, the input sound needs to be processed. I chose Arse as the preprocessing tool. Arse, short for “Analysis and Reconstruction Sound Engine”, is a command line tool divided into two main parts: a spectrographer and a spectrogram synthesizer. I’ll use both its tools to pre- and post-process an audio file. In the pre-processing step I input a sound to Arse, which outputs a spectrogram (that is an image, good to input to the Gimp). In the post-processing step, I provide Arse with the filtered spectrogram, to have an audio file as output.
Unfortunately, generating a signal’s spectrogram and synthesizing it again with Arse won’t lead to the original signal
Unfortunately, generating a signal’s spectrogram and synthesizing it again with Arse won’t lead to the original signal. It means that the method I’m proposing is theorically perfect, but you can’t use it effectively without accepting some sound tranformations (i.e., a bass sound played as a piano sound, or a human voice played as a synthetic voice). Anyway, go ahead: a clever use of Arse will give you pretty good results. I don’t know whether a tool more efficient and reliable than Arse exists or not; if yes, use it and verify the results—and let me know!
Write a full post in response to this!
Similar articles
Do you like this post?
Vote for it!
Copyright information
This article is made available under the "Attribution-NonCommercial-Sharealike" Creative Commons License 3.0 available from http://creativecommons.org/licenses/by-nc-sa/3.0/.
Biography
Gianluca Pignalberi: Gianluca is Free Software Magazine's Compositor.
- Login or register to post comments
- 1947 reads
- Printer friendly version (unavailable!)




Best voted contents
-
The Bizarre Cathedral - 1
Ryan Cartwright, 2008-04-18 -
Free Software Magazine Awards 2008
Tony Mobily, 2008-04-22 -
Google App Engine: Is it evil?
Terry Hancock, 2008-04-24 -
The Bizarre Cathedral - 2
Ryan Cartwright, 2008-04-27
Similar entries
Buzz authors
All news
From the FSM staff...
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). A site about short stories and writing.
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
Installing an all-in-one printer device in Debian
Ryan Cartwright, 2008-05-05 -
What is the free software community?
Tony Mobily, 2008-03-29 -
Things you miss with GNU/Linux
Ryan Cartwright, 2008-05-01 -
Why Microsoft should not lose (and free software will still win)
Ryan Cartwright, 2008-04-21 -
Drigg (the pligg alternative) vs. Pligg: why should people switch?
Tony Mobily, 2008-04-13

Dedicated server