A Collection of Useful C++ Classes for Signal Processing
-
- KVRian
- 1096 posts since 28 May, 2010 from Finland
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).
I'm instantiating many SmoothFilterDesigns and it seems like just the latest one works (produces audible output).
-
- KVRer
- 27 posts since 9 Oct, 2014
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)
...
-
- KVRer
- 1 posts since 7 Oct, 2016
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;
}
-
- KVRer
- 1 posts since 10 Oct, 2016
Can these filters be used in Arduino IDE for Arduino products?
-
- KVRer
- 1 posts since 6 Dec, 2016
Thank heavens for this library! I had this exact problem you state on your Github page:
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.
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.The black art of Infinite Impulse Response ("IIR") filtering has remained veiled in secrecy with little publicly available source code...until now.
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.
-
- KVRist
- 37 posts since 18 Sep, 2011
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.
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.
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
You can always try ATK
What do you call higher orders? IIR filters can be numerically unstable :/
What do you call higher orders? IIR filters can be numerically unstable :/
-
- KVRist
- 37 posts since 18 Sep, 2011
> 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
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
-
- KVRer
- 27 posts since 9 Oct, 2014
Not VST, but console application:
In header file:
In .cpp file
Error:
In header file:
Code: Select all
#include "DspFilters\Dsp.h"
class effects
{
effects();
...
Dsp::Filter* lowpass1;
}
Code: Select all
effects::effects()
{
lowpass1 = new Dsp::SmoothedFilterDesign <Dsp::RBJ::Design::LowPass,(1024);
}
Unhandled exception at 0xacf7a05c in FX.exe: 0xC0000005: Access violation reading location 0xacf7a05c.
-
- KVRer
- 3 posts since 6 Jun, 2017
Hi, excellent work. I was wondering if it can be compiled to ARM processors. Has anyone ever tried that?
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
Try Audio ToolKit, I'm compiling for ARM.
-
- KVRer
- 3 posts since 6 Jun, 2017
Thanks, but I was able to compile it for ARM
-
- KVRer
- 3 posts since 6 Jun, 2017
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.
-
- KVRAF
- 15517 posts since 13 Oct, 2009
insomniac wrote:Got the demo working...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
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
2. LNK1104 link error for 'JuceAmalgam.lib'Code: Select all
#if defined (_MSC_VER) && _MSC_VER > 1600 #define _ALLOW_KEYWORD_MACROS 1 // (to stop VC2012 complaining) #endif
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.
-
- KVRian
- 1379 posts since 26 Apr, 2004 from UK
Audio Toolkit can be integrated as several JUCE modules, simpler than this!
And maintained...
And maintained...