A Collection of Useful C++ Classes for Signal Processing

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

Post

No more feedback?

Anyone try the filters to see the result?

Post

sorry - hadn't seen your last post about SF - excellent idea.. I did think of that, but didn't know if you saw it as just your baby..

thank you :)

DSP
Image

Post

thevinn wrote:No more feedback?

Anyone try the filters to see the result?
It's high on my list but I'm swamped with work.. I think next week I'll have time.

Post

duncanparsons wrote:sorry - hadn't seen your last post about SF - excellent idea.. I did think of that, but didn't know if you saw it as just your baby..
Quite the opposite I have been getting feedback from the music-dsp mailing list and incorporating as much of it as possible.

I want this set of classes to represent the most advanced, high performance, and state of the art public-domain implementation available on the Internet, with an unlimited commercial-use license.

So anything that moves me towards that goal is good.

Post

Thank you thevinn, it is a nice example of using templates :)

Post

Hi thevinn - this looks awesome, have you used prewarping/orfanidis?

Thanks for sharing :)

Post

coops2 wrote:prewarping/orfanidis?
I have no idea what that means

Post

thevinn wrote:I wrote a simple loop to time the performance of the filter. I generate random noise in a buffer and then run the low pass on the data over and over again.

After just 3000 iterations, I get denormals. The debugger shows the samples as -1.#IND00000000

Is running a filter on the same block of data over and over again supposed to do that?
simple lowpass: y[n] = (x[n] + y[n-1])/2
Consider that y[n] will get progressively smaller when passed over the same buffer again and again.. 3000 passes over the buffer may well do it, depending on the source values. If it was a dirac impulse, you'd end up with ~1e-38 in only 125 iterations which would blow out a float. With a double it takes 1022 iterations to reach 1e-308: try it in excel..
Random/ white noise may contain denormals to start with (unless you put a check in against that), which might not help :shrug:

Does that help?
:)

DSP
Image

Post

:oops: apologies, just realised I was looking at page 1, and this has been discussed; tho' the discussion went a different way - hope my last answer helps in some way!!
Image

Post

thevinn wrote:
coops2 wrote:prewarping/orfanidis?
I have no idea what that means
Using Robert Bristow Johnson's transformation for a peak filter you get deformation in the shape of the bell curve approaching nyquist. Using Orfanidis' transformation instead should give less deformation in the upper frequencies.

Might be nice to add to your code? :)

http://www.ece.rutgers.edu/~orfanidi/ece521/peq.pdf

Post

Updated to version 0.8.1:

- Added Elliptic low pass, high pass, band pass, and band stop
- Improvement in the performance of making parameter changes
- Uses std::complex instead of the home-brew
- Miscellaneous bug fixes

I'm still working on this project. The next step is to refactor all the classes into more general algorithms, with classes to perform explicit s and z plane transformations (low pass to low pass, low pass to high pass, low pass to band pass, low pass to band stop, low pass to low shelf, high pass to high shelf, band pass to peaking). I am adding some more IIR filters like comb. There will be a new flexible interface for setting up each filter using a variety of specifications (for example, setting an explicit 3dB point, or band pass by corner frequencies). I want to add some calculations for matching parameters given a set of specifications (for example, determining the number of poles required to reach a certain rolloff steepness).

I am incorporating information from the following resources:

"Introduction to Signal Processing" Sophocles Orfanidis
"Digital Filters: Analysis, Design, and Applications" Andreas Antoniou
"DSP Filters" John Lane, et. al.
"Digital Signal Processing" Steven W. Smith

As always, any feedback is appreciated.

Post

Caco wrote:
thevinn wrote:
coops2 wrote:prewarping/orfanidis?
I have no idea what that means
Using Robert Bristow Johnson's transformation for a peak filter you get deformation in the shape of the bell curve approaching nyquist. Using Orfanidis' transformation instead should give less deformation in the upper frequencies.

Might be nice to add to your code? :)

http://www.ece.rutgers.edu/~orfanidi/ece521/peq.pdf
I am able to understand some of this paper now. I understand the concept behind prewarping but I am not completely solid on it just yet.

Post

hi thevinn

first of all i want to thank you for youre really great work!!

however, i tryed to use youre code within the juce framework, but it got me all the time some compiler errors. i then found out, that it'll mixes up the variable "T" from youre code with the one from juce used for some text input..

i am relativly new to c++ and dsp coding (few weeks). so maybe i make somewhere a mistake.
all i can say, is that when i change the "T" everywhere in your code to say "Tt", then it compiles without error!

so maybe you'd like to change youre variable "T".

cheers pascal

Post

BRP wrote:first of all i want to thank you for youre really great work!!
Thanks! It wouldn't be possible without the contributions listed in the credits though.
however, i tryed to use youre code within the juce framework, but it got me all the time some compiler errors. i then found out, that it'll mixes up the variable "T" from youre code with the one from juce used for some text input..
Thanks for pointing this out. I have not compiled it on other platforms or environments. I will replace "T" with "Ty".

Post

I just have to tell everyone - I have FINALLY designed and added my own filters by taking an analog filter and transforming it into a digital filter! I implemented butterworth low shelf and butterworth high shelf, working on the butterworth peaking now! And, the technique is generalizable to any low pass, high pass, or band pass, so I will have the Chebyshevs and Elliptic in short order.

I would also like to point out that I will be rewriting the entire interface. The parameters for specifying the filters are going to change and so is the method of instantiation. So don't get too attached. The results will be worth it.

Post Reply

Return to “DSP and Plugin Development”