Login / Register  0 items | $0.00 New#KVRDeals
soundmodel
KVRian
 
515 posts since 28 May, 2010, from Finland

Postby soundmodel; 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
 
27 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
 
1265 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
 
27 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.
felipeduque
KVRer
 
3 posts since 6 Jun, 2017

Postby felipeduque; Tue Jun 06, 2017 6:33 am Re: A Collection of Useful C++ Classes for Signal Processing

Hi, excellent work. I was wondering if it can be compiled to ARM processors. Has anyone ever tried that?
Miles1981
KVRian
 
1265 posts since 26 Apr, 2004, from UK

Postby Miles1981; Tue Jun 06, 2017 7:39 am Re: A Collection of Useful C++ Classes for Signal Processing

Try Audio ToolKit, I'm compiling for ARM.
felipeduque
KVRer
 
3 posts since 6 Jun, 2017

Postby felipeduque; Fri Jun 09, 2017 8:02 am Re: A Collection of Useful C++ Classes for Signal Processing

Thanks, but I was able to compile it for ARM :)
felipeduque
KVRer
 
3 posts since 6 Jun, 2017

Postby felipeduque; Fri Jun 09, 2017 10:11 am Re: A Collection of Useful C++ Classes for Signal Processing

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.
ghettosynth
KVRAF
 
9840 posts since 13 Oct, 2009

Postby ghettosynth; Wed Aug 23, 2017 9:44 am Re:

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.
Miles1981
KVRian
 
1265 posts since 26 Apr, 2004, from UK

Postby Miles1981; Wed Aug 23, 2017 11:25 am Re: A Collection of Useful C++ Classes for Signal Processing

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

Moderator: Moderators (Main)

Return to DSP and Plug-in Development