Smoothing Filter

Sun, 14 Oct 2007

Most audio filters are linear, which means that the maths behind them is pretty well understood (not by me, but by smart people), and their behaviour can be predicted, and duplicated easily. There are even devices you can buy that will let you plug an expensive filter into it, give it a moment, and then it will have a perfect duplicate of that effect (see convolution reverbs (and a reverb is just a type of filter)).

But, not all filters are linear, and in my opinion, the interesting ones aren't (like the sorting filter). Mainly because you get a bit more surprised when you hear them applied to different sounds.

So todays filter is a smoothing filter. We start out with a sound wave, and we try to approximate the wave by just picking a few key points on it, and fitting a curve through those points. I've chosen to do it the super inefficient way:

  1. Approximate the whole sound wave with 2 points, one at the start and one at the end.
  2. Find the place where the approximated wave is the most different to the actual wave.
  3. Refine the approximation by adding a new point at this spot with the most error.
  4. Go to 2, until we are close enough to the original wave.

So, for this to work, we need to have the entire sound available (you can't do this on a live sound - though you could do it on short windows of sound), and a fair bit of computer time (depending on how long the sound is). The actual effect it produces is probably best explained by a picture:

Original waveform, filtered waveform, aggressively filtered waveform

(top is original, middle is quite filtered, bottom is very much filtered)

And of course, the actual clips (as FLAC):

Original Filtered Aggressively Filtered

I interpolate using a cosin-ish thing, based on the two points either side of the point we are interpolating. Just because it is simple, and it isn't linear.

Hmmm, it sounds like I mixed up the two filtered versions. Or something really cool is going on.
Andy
1 minute after story
Take a look at predictive filters, they're pretty fun too!
Seb Ruiz
6 hours after story
I think you did swap the two versions. Looking at the graphs and listening to the sounds, the "med" file is WAAAAY bassier, and it does indeed have much larger wavelengths.
The "med" file gives me a headache, which I guess is a cool effect in some cases :)
The "heavy" one sounds very cool.
I tried just putting the two over each other and it sounds quite funky like that.
Just listening to it, the effect sounds a lot like "palm muting" on a guitar, where you kinda kill the sound a lot faster by having your palm dampen the string's vibration.
IGTHORN
34 days after story
Name & email are optional. Email will not be obfuscated.
HTML tags will be removed except hyperlinks.
 

About

I'm a nerd living in Sydney. This is a place where I can write stuff about my interests and not care that no one else is reading.

I like music, maths, programming, pretty pictures, filters and other good things.

(more info)

It should be fairly obvious that this isn't connected to my employer at all.

Email me (not a catchpa)

Email policy

Subscribe

RSS Feed RSS

Get an aggregator

Liferea (Linux)

Vienna (OSX)

Feedreader (Windows)

Google Reader (Web based)

I've only used Liferea, so I can't vouch for the other ones.

About this site

This site runs a (modified) version of blosxom.

The host is GeekISP, and they seem to do an excellent job.