Welcome, Guest. Please login or register.

Author Topic: Fun Maths problem (probably to Karlos at least)  (Read 3289 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Fun Maths problem (probably to Karlos at least)
« on: November 25, 2004, 04:57:42 PM »
Ah, filters. You have to love 'em...

Reminds me of a self adjusting bandpass filter I was experimenting with (in fact I remember making a thread about just that very idea here some time ago)...

-edit-

here, in fact...

-/edit-

I have the maths and source (albiet zilog DSP asm) for the various hamming High Pass / Low Pass / Notch Reject / Band Pass filters someplace at home from a Zilog DSP/IceBox developer kit I managed to acquire a while ago.

I can dig them out later if you want :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Fun Maths problem (probably to Karlos at least)
« Reply #1 on: November 25, 2004, 05:08:54 PM »
VST as in Virtual Studio Tech or?

Either way, probably not very much :-) But I am generally a fast learner ;-)

(and still at work so I better not get too involved just now!)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Fun Maths problem (probably to Karlos at least)
« Reply #2 on: November 26, 2004, 10:53:32 PM »
@Bloodline

I dug around my notes, I dunno if you will find this useful.

For a given N-Tap filter, the ith output value is

O = Sum(n=0 to N-1) { Cn . I[i-n]}

where

N = number of taps
O = output samples
I = input samples
C = filter coefficients of the N tap filter.

Depending on how you calculate Cn, you can create high, low, bandpass and notch reject filters.

For a basic low pass filter:

Cn = Sn . Wn

where

S are the impulse samples
W is the hamming window

Sn = sin(2.pi.Fcp.(n-(N-1)/2)/2.5/Fmax) / pi.(n-(N-1)/2)

where

n is the tap number of interest
N is the total number of taps
Fcp is the filter cut-off frequency
Fmax is the maximum possible input frequncy

The 2.5 factor is to satisfy the Nyquist rate such that the sampling frequency is 2.5*Fmax

The Hamming Window (W) is used to get a better filter behaviour, eliminating unwanted ripple:

Wn = cos(1) + (1-cos(1)).cos({2.pi.(n-(N-1)/2)}/(N-1))

By adjusting the function for S, you can create all kinds of  resonance effects.

Enjoy :-)
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Fun Maths problem (probably to Karlos at least)
« Reply #3 on: November 26, 2004, 11:29:29 PM »
int p; // A
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show all replies
Re: Fun Maths problem (probably to Karlos at least)
« Reply #4 on: November 26, 2004, 11:41:59 PM »
Two maths related problems in as many days. I need to get out more :lol:
int p; // A