A Collection of Useful C++ Classes for Signal Processing

DSP, Plugin and Host development discussion.
Post Reply New Topic
RELATED
PRODUCTS

Post

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).

Post

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)

...

Post

AUTO-ADMIN: Non-MP3, WAV, OGG, SoundCloud, YouTube, Vimeo, Twitter and Facebook links in this post have been protected automatically. Once the member reaches 5 posts the links will function as normal.
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!

Post

Can these filters be used in Arduino IDE for Arduino products?

Post

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.

Post

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.

Post

You can always try ATK ;)
What do you call higher orders? IIR filters can be numerically unstable :/

Post

> 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

Post

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.

Post

Hi, excellent work. I was wondering if it can be compiled to ARM processors. Has anyone ever tried that?

Post

Try Audio ToolKit, I'm compiling for ARM.

Post

Thanks, but I was able to compile it for ARM :)

Post

Has anybody figured out how to set the number of channels in run-time, instead of compile-time? I saw somebody asking a similar question some time ago in this forum but haven't seen a proper response.

Post

insomniac wrote:
insomniac wrote:Hey guys!

I'm having trouble working with the filters on Visual Studio 2012, I've been working with JUCE for about a month now - this is my first post here.

I'm trying to build the project in "users/Workspace/", but get a flood of errors like so:

Code: Select all

\juceamalgam\juce_audio_basics_amalgam.cpp(730): error C3646: 'noexcept' : unknown override specifier
Got the demo working...

For anyone reading this after struggling with Visual Studio 2012, this is what helped me fix it.

1. Errors about macro's overriding: Use this bit of code

Code: Select all

#if defined (_MSC_VER) && _MSC_VER > 1600
  #define _ALLOW_KEYWORD_MACROS 1 // (to stop VC2012 complaining)
#endif
2. LNK1104 link error for 'JuceAmalgam.lib'

Navigate to :
\DSPFilters\user\Workspaces\VisualStudio2010\dspfilterscpp-Output\Products\Win32Debug

Copy the object file you see there, and paste it here

\DSPFilters\shared\DSPFiltersDemo\Builds\VisualStudio2010\DSPFiltersDemo-Output\Products\Win32Debug

Ugh, thanks for this. It helped me move forward. However, I'm still having a bunch of issues getting this to build. Of course the DSPFilters code builds fine, the issue seems mostly to be with JUCE. Moving libraries around surely isn't the right way to deal with improperly defined dependencies in the project/solution, no? In any case, there seems to be many link issues with the juceamalgam library and that's after I make brutal and improper changes to the source where it calls ftello and friends just to get it to compile.

Has anyone managed to get this to compile and link properly on VS2012?

I'm going to remove the moved libraries and add the other projects to the demo solution, however, if anyone has managed to get this working properly, I'd appreciate any tips.

On Edit: So yes, to answer some parts of my own question. It strikes me that the cleaner solution is to add the DSPFilter and JuceAmalgam projects to the DSPFilterDemo solutions. Add both projects as references to DSPFilterDemo (right click, choose references, select both projects) and remove the linker references to $(OutputDir)<LibraryName> for both of these libraries in the demo project. Clean and build all.

This still doesn't solve the JUCE issues with ftello and friends, but, it does build this way and you don't have to manually move files around.

Post

Audio Toolkit can be integrated as several JUCE modules, simpler than this!
And maintained...

Post Reply

Return to “DSP and Plugin Development”