A Collection of Useful C++ Classes for Signal Processing
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
No more feedback?
Anyone try the filters to see the result?
Anyone try the filters to see the result?
-
- KVRAF
- 8388 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
Quite the opposite I have been getting feedback from the music-dsp mailing list and incorporating as much of it as possible.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..
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.
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
I have no idea what that meanscoops2 wrote:prewarping/orfanidis?
-
- KVRAF
- 8388 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
simple lowpass: y[n] = (x[n] + y[n-1])/2thevinn 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?
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
Does that help?
DSP
-
- KVRAF
- 8388 posts since 11 Apr, 2003 from back on the hillside again - but now with a garden!
-
- KVRian
- 995 posts since 25 Apr, 2005
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.thevinn wrote:I have no idea what that meanscoops2 wrote:prewarping/orfanidis?
Might be nice to add to your code?
http://www.ece.rutgers.edu/~orfanidi/ece521/peq.pdf
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
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.
- 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.
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
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.Caco wrote: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.thevinn wrote:I have no idea what that meanscoops2 wrote:prewarping/orfanidis?
Might be nice to add to your code?
http://www.ece.rutgers.edu/~orfanidi/ece521/peq.pdf
-
- KVRer
- 11 posts since 6 Jan, 2005 from ch - zürich
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
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
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
Thanks! It wouldn't be possible without the contributions listed in the credits though.BRP wrote:first of all i want to thank you for youre really great work!!
Thanks for pointing this out. I have not compiled it on other platforms or environments. I will replace "T" with "Ty".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..
- KVRian
- Topic Starter
- 775 posts since 30 Nov, 2008
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.
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.