A.D.A. Amiga Demoscene Archive

  Welcome guest! Please register a new account or log in

  

  

  

Demos Amiga Demoscene Archive Forum / Coding / How to code a low / high pass filter?

 

Author Message
h0ffman
Member
#1 - Posted: 22 Feb 2013 18:34
Reply Quote
Hey Guys

I really should stop by here more often! Anyways, I've just finished work on the Revision 64K Intro Music and Code. Its basically a little bit of hackery which generates / copies / phases / boosts etc samples after P61 has unpacked the samples. It was all a bit of an experiment to be honest, but it worked and we've essentially got a 500k module sat inside our 64k intro! :)

Now that's all finished I've got a bit more of an interest for sound coding. I was wondering where do I start with regards to coding a low or high pass filter? Of course it would need to be in assembly. Bare in mind that I'm not too good at maths and can't read C++ too well.

Any pointers would be mega awesome!
Azure
Member
#2 - Posted: 23 Feb 2013 14:45
Reply Quote
To start from the simplest angle possible: A low pass filter simply means averaging samples around the current one, like blurring in graphics. You can for example use a box or gaussian function here. The more samples you average, the lower your cut-off frequency. A high pass filter is simply the signal minus the low pass filtered one.

This type of filter is known as FIR filter (finite impulse response). The art is now to calculate the exact filter coefficients, the weights of your blurring function. However, even the simplest approaches get the job done.
dalton
Member
#3 - Posted: 25 Feb 2013 07:24
Reply Quote
I think Yehar's old "DSP tutorial for the braindead" is still a good starting point:
http://yehar.com/blog/?p=121
h0ffman
Member
#4 - Posted: 25 Feb 2013 13:59
Reply Quote
Cheers guys, that DSP tutorial looks pretty good. Time for some lunch and some reading.

 

  Please register a new account or log in to comment

  

  

  

 

A.D.A. Amiga Demoscene Archive, Version 3.0