Welcome, Guest. Please login or register.

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

Description:

0 Members and 1 Guest are viewing this topic.

Offline bloodlineTopic starter

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Fun Maths problem (probably to Karlos at least)
« on: November 25, 2004, 04:28:56 PM »
My main Miggy HD appears to be dead, very dead. I had assumed that all my old Programming efforts would have been lost... but I did find some of my workings that I did for a Softsynth I was working on about 8 years ago...

To my surprise I have found that my idea of a "low pass filter" was, (how shall I put it?)... "novel".

It seems that I would take an average of the previous x (the higher the value of x the steeper the cutoff frequency)amount of samples and use them to generate the new value...

While this does attenuate the higher frequencies it does so in a linear fasion, also for high values of x it creates some very weird waveforms... and probably accounts for the weird sound that my soft synth produced :-D
In my defence at small values of x, it's great for cleaning up a noisey recording.

In Pseudo code (from memory):

Code: [Select]

Input_Audio_array[]
Output_Audio_array[]

x=cutoff_frequency

For i=0 to Audio_array_lenght

    accumulator=0
    For v=0 to x
        accumulator = accumulator + Input_Audio_array[ i - v ]
    Next

Output_Audio_array[x] = accumulator / x

Next


Made me smile... now to implement one properly I think :-D

Offline bloodlineTopic starter

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Fun Maths problem (probably to Karlos at least)
« Reply #1 on: November 25, 2004, 05:03:01 PM »
The DSP sources wouldn't be of much use to me but it would be fun to disscuss the theory.

I just wantd to create a simple 4pole lowpass filter an then add resonance to it... my best resource is http://www.musicdsp.org

What do you know about VSTs?

Offline bloodlineTopic starter

  • Master Sock Abuser
  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 12113
    • Show all replies
    • http://www.troubled-mind.com
Re: Fun Maths problem (probably to Karlos at least)
« Reply #2 on: November 26, 2004, 11:26:40 PM »
Now I remember why I came up with my "filter approximation" from the first post... you try getting an 020 to process proper filter math in real time :-D

Your formula look cool I'll give 'em a try cheers!