Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Audio processing

Audio processing

Scheduled Pinned Locked Moved Algorithms
csharpquestion
5 Posts 5 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Guy007
    wrote on last edited by
    #1

    I would like to create a program in C# to process audio and perform low pass and high pass filtering on it. Can anyone tell me where I should start to implement these filters? Is there any source code you are aware of, or maybe ready made DLLs which I can use?

    A B M 3 Replies Last reply
    0
    • G Guy007

      I would like to create a program in C# to process audio and perform low pass and high pass filtering on it. Can anyone tell me where I should start to implement these filters? Is there any source code you are aware of, or maybe ready made DLLs which I can use?

      A Offline
      A Offline
      Albert Holguin
      wrote on last edited by
      #2

      Don't know specifically about stuff in C#... but the low and high pass filter design algorithms are all digital signal processing (DSP) algorithms, so as far as study and design of the algorithm itself, you can use Matlab (or the open source alternative Octave) to lay out the design. Once understood, you can code it yourself onto C#. Try Google to see if there's open source libraries for this, they're fairly common audio synthesis operations so there must be libraries out there (although unfortunately I couldn't direct you right to one).

      1 Reply Last reply
      0
      • G Guy007

        I would like to create a program in C# to process audio and perform low pass and high pass filtering on it. Can anyone tell me where I should start to implement these filters? Is there any source code you are aware of, or maybe ready made DLLs which I can use?

        B Offline
        B Offline
        BobJanova
        wrote on last edited by
        #3

        For frequency filters the general pattern is: fourier transform input, filter transform, fourier inverse (which is magically the same transform! :)) the filtered transform to get a new sound stream. I haven't done it but I did, a while back, look for fast fourier transform in C# and there was a pretty good library out there. I realise this is minimally helpful but hopefully that gives you some search pointers at least.

        S 1 Reply Last reply
        0
        • G Guy007

          I would like to create a program in C# to process audio and perform low pass and high pass filtering on it. Can anyone tell me where I should start to implement these filters? Is there any source code you are aware of, or maybe ready made DLLs which I can use?

          M Offline
          M Offline
          molesworth
          wrote on last edited by
          #4

          I've done a bit of work on this in the past, and one very useful resource is the audio biquad cookbook - http://www.musicdsp.org/files/Audio-EQ-Cookbook.txt[^]. Biquads are a quick and easy way to get the sorts of effects you're looking for. If you want to explore more, or need higher quality, do some searches for digital filter designs or DSP designs - there are loads of sites which have examples as well as the maths behind them. I should add that I wrote my filter code in C, rather than C#, and although it probably will be OK on modern machines, you might not get as high performance (throughput).

          Days spent at sea are not deducted from one's alloted span - Phoenician proverb

          1 Reply Last reply
          0
          • B BobJanova

            For frequency filters the general pattern is: fourier transform input, filter transform, fourier inverse (which is magically the same transform! :)) the filtered transform to get a new sound stream. I haven't done it but I did, a while back, look for fast fourier transform in C# and there was a pretty good library out there. I realise this is minimally helpful but hopefully that gives you some search pointers at least.

            S Offline
            S Offline
            sgorozco
            wrote on last edited by
            #5

            Fast Fourier Transform filtering is certainly an option. It's a very intuitive solution since, like BobJanova states, band-pass filtering can be easily achieved by doing these steps: 1) Forward FFT of the input data, 2) Zeroing the result bins of the frequencies that we want to remove, and finally, 3) Perform reverse FFT on the same data. However, this is a very expensive approach, if fast execution is a must, I would recommend trying a FIR digital filter instead. I have no experience designing such a filter myself, but there used to be a really great freeware tool around named DSPlay. I Googled for a while and unfortunately can't find it any more. This GUI tool allowed you to easily create band-pass filters by specifying a few input parameters and generated very simple C code that was directly usable in C#. Let me take a look as I'm certain I have the DSPlay tool in a pervious hard disk backup... :)

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups