Sound filtering... with the Gimp!
Make Gimp work as an ideal digital sound filter
Download the whole article as PDF
Short URL: http://fsmsh.com/2541
- 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
- 5649 reads
- Printer friendly version (unavailable!)




Two fantastic free software companies that make Free Software Magazine possible:
Buzz authors
Free Software news
- autohokey, autohotkey download, free script, Free Software, 매크로, 매크로프로그램, 무료프로그램, 오토핫키, 유용한 프로그램, 좋은 유틸리티, 추천 매크로, 추천 유틸리티, 추천스크립트
- Two More Bills in the SCO Bankruptcy and Some Trademark Oddities
- Psystar Files Motion to Leave Chapter 11
- Swiss court: Gov can buy M$ licenses, but has to be aware of risk that contracts could be declared void during main process !freesoftware
- after using the #gimp for more than 3 years for my modest needs, I start to get familiar with it ;) #freesoftware #linux
Similar entries
Other sites
- The Top 10 Everything (Dave). The good, the bad and the ugly.
- Free Software news (Dave & Bridget). All about free software -- free as in freedom!
- Book Reviews: Illiterarty (Bridget). Book reviews, blogs, and short stories.
Hot topics - last 60 days
-
2009: software installation in GNU/Linux is still broken -- and a path to fixing it
Tony Mobily, 2009-06-23 -
The Bizarre Cathedral - 44
Ryan Cartwright, 2009-06-08 -
Free Software Magazine caught in the 3fn shutdown crossfire
Tony Mobily, 2009-06-05 -
Is Android the key to the GNU/Linux desktop? Really?
Tony Mobily, 2009-06-12 -
The Bizarre Cathedral - 45
Ryan Cartwright, 2009-06-15
Hot topics - last 21 days
-
2009: software installation in GNU/Linux is still broken -- and a path to fixing it
Tony Mobily, 2009-06-23 -
The Bizarre Cathedral - 45
Ryan Cartwright, 2009-06-15 -
Will Google Wave revolutionise free software collaboration?
Ryan Cartwright, 2009-06-15 -
The Bizarre Cathedral - 46
Ryan Cartwright, 2009-06-22
