Login / Register  0 items | $0.00 NewWhat is KVR? Submit News Advertise
Fluky
KVRist
 
383 posts since 28 May, 2010, from Finland

Postby Fluky; Sat Apr 16, 2016 11:14 am Re: A Collection of Useful C++ Classes for Signal Processing

Any idea if this lib actually supports multiple instantiation?

I'm instantiating many SmoothFilterDesigns and it seems like just the latest one works (produces audible output).
user125
KVRer
 
26 posts since 8 Oct, 2014

Postby user125; Tue Aug 30, 2016 3:49 am Re: A Collection of Useful C++ Classes for Signal Processing

I've been successful using DSPFilters.lib with x86 compiler, but now I'm trying to compile it w x64, and I've got a bunch of 'unresolved externals' errors :

Code: Select all
error LNK2001: unresolved external symbol "public: virtual __cdecl Dsp::Filter::~Filter(void)" (??1Filter@Dsp@@UEAA@XZ)

error LNK2001: unresolved external symbol "public: void __cdecl Dsp::RBJ::HighPass::setup(double,double,double)" (?setup@HighPass@RBJ@Dsp@@QEAAXNNN@Z)

...
yc2986
KVRer
 
1 post since 7 Oct, 2016

Postby yc2986; Fri Oct 07, 2016 11:04 am Re: A Collection of Useful C++ Classes for Signal Processing

Hi KVR,

I am trying to use the DSPFilters library but I have run into some weird bug.

I have downloaded the shipped version of source code and compiled the DSPFilters project in user/Workspaces/VisualStudio2010 using VS2015 Pro version under Release config. I am able to link the header and static lib into my own project. But when I try something like this the code always crash during the Filter object destruction step.

Code: Select all
#include <DspFilters\Dsp.h>

int main() {
    Dsp::Filter* f = new Dsp::FilterDesign<Dsp::Butterworth::Design::BandPass<5>>;
    Dsp::Params params;
    params[0] = 48000;     // sample rate
    params[1] = 8;         // order
    params[2] = 4000;      // center freq
    params[3] = 200;       // linewidth
    f->setParams(params);  // this line cause crash probably due to order too high
    /* I have check the poles zeros here */
    delete f;    // clean up, it crashes here
    return 0;
}


I found that if I set the filter order greater than 5 the program will throw exception during Filter destruction. I have checked the poles and zeros after setParams call to find if there is parameter overflow but what I got is a bunch of valid poles zeros values compared to reference from Octave/Matlab. Could somebody here please explain why the destructor cause problem? Thank you very much!
steven32bits
KVRer
 
1 post since 10 Oct, 2016

Postby steven32bits; Mon Oct 10, 2016 9:39 am Re: A Collection of Useful C++ Classes for Signal Processing

Can these filters be used in Arduino IDE for Arduino products?
windfish
KVRer
 
1 post since 6 Dec, 2016

Postby windfish; Tue Dec 06, 2016 3:03 am Re: A Collection of Useful C++ Classes for Signal Processing

Thank heavens for this library! I had this exact problem you state on your Github page:

The black art of Infinite Impulse Response ("IIR") filtering has remained veiled in secrecy with little publicly available source code...until now.


I needed IIR filters in a C# project and have been using a Java-based library which I converted with IKVM until now. I don't need all functionality your library provides, just some basic Butterworth low/high/bandpass filtering of measured data.

I just had to set the "Runtime Library" in Visual Studio to "Multi-Threaded DLL" / "Multi-Threaded Debug DLL" and write some .net wrapper code around, it nearly worked out of the box.
chipnix
KVRer
 
28 posts since 18 Sep, 2011

Postby chipnix; Sat Jan 14, 2017 4:13 am Re: A Collection of Useful C++ Classes for Signal Processing

for the record,

it seems that some numerics function from the standard library which are used by this library, behave differently when you switch the Standard Library to "libc++" in XCode ( from libstdc++ ), which is needed to support c++11 language features.

Especially std::polar
http://lists.llvm.org/pipermail/cfe-dev ... 33572.html

So if you use libc++ some filters like "low shelf butterworth" will not work with higher orders, any help appreciated.
Miles1981
KVRian
 
1175 posts since 26 Apr, 2004, from UK

Postby Miles1981; Mon Jan 16, 2017 4:36 am Re: A Collection of Useful C++ Classes for Signal Processing

You can always try ATK ;)
What do you call higher orders? IIR filters can be numerically unstable :/
chipnix
KVRer
 
28 posts since 18 Sep, 2011

Postby chipnix; Mon Jan 16, 2017 10:15 am Re: A Collection of Useful C++ Classes for Signal Processing

> You can always try ATK ;)
Yes, but if you have an existing project, its not so easy to change

What do you call higher orders?
> because i need it

IIR filters can be numerically unstable :/
> yes, i'm aware of, but my issue is about a broken functionality with a different std::library

I just back-ported std::polar and complex std::sqrt from libstdc++ (gnu-lib) and anything works like before
user125
KVRer
 
26 posts since 8 Oct, 2014

Postby user125; Mon Mar 20, 2017 4:28 am Re: A Collection of Useful C++ Classes for Signal Processing

Not VST, but console application:

In header file:

Code: Select all
#include "DspFilters\Dsp.h"

class effects
{
  effects();
  ...
  Dsp::Filter* lowpass1;

}


In .cpp file

Code: Select all

effects::effects()
{
  lowpass1 = new Dsp::SmoothedFilterDesign <Dsp::RBJ::Design::LowPass,(1024);
}



Error:
Unhandled exception at 0xacf7a05c in FX.exe: 0xC0000005: Access violation reading location 0xacf7a05c.
Previous

Moderator: Moderators (Main)

Return to DSP and Plug-in Development