Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to i use this BiQuad.cs filter script in Unity3d?

Discussion in 'Audio & Video' started by drudiverse, Mar 29, 2016.

  1. drudiverse

    drudiverse

    Joined:
    May 16, 2013
    Posts:
    218
    How do i use this monobehaviour's BandPass() function in unity?

    Normally for a bandpass i would use a loop:
    For (sample in samples)Bandpass(sample,Freq,SampleRate);

    except that the monobehaviour has a function code:
    public class BandpassFilter : BiQuad
    {
    public BandpassFilter(int sampleRate, double frequency)
    : base(sampleRate, frequency)
    {
    }

    How do i used this biquad code?
    https://github.com/filoe/cscore/blob/master/CSCore/DSP/BiQuad.cs (function is at line 248 - 255)
     
  2. drudiverse

    drudiverse

    Joined:
    May 16, 2013
    Posts:
    218
    OK so the code runs fine in unity, the bandpass() function seems fine, and after, there is a process() function which doesnt even have a return value so i don;'t know how it can work??