Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come
out every day, so no prevention program can catch 100% of them. For your own safety, please:
Re-scan downloaded files using your personal virus checker before using it.
NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
Scan the source code with Minnow's Project Scanner
If you don't have a virus scanner, you can get one at many places on the net
Terms of Agreement:
By using this code, you agree to the following terms...
You may use
this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
You may link to this code from another website, but ONLY if it is not wrapped in a frame.
You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.
Very neat Ulli ***** An aside, interesting playing around with the timer interval and with and without Priority. EG setting timer to 2 milli-secs and no priority is very fast but 70% CPU usage etc. (If this comment was disrespectful, please report it.)
Creating the lookup table with n/2 entries plus looking up would probably be equally slow. All I can think of is Robert's MASM. In ASM it can be done in a loop with three machine instructions using registers only. (If this comment was disrespectful, please report it.)
Are sure about 3 instructions? I had a spare hour this afternoon and made a version of your class that uses a class patch to reverse the bit order in machine code. If you email me I'll send it over. No extra files, it's all encapsulated in clsFourier.cls (If this comment was disrespectful, please report it.)
Thanks Paul, I didn't think of the VTable and to be honest I never got quite round to investigate them properly. This is surely faster than calling CallWindowProc. I more or less did a quick and dirty copy of Robert's ASM-mechanism. (If this comment was disrespectful, please report it.)
As I see it the more complicated VTable method is only worth it if the alternative was to call CallWindowProc a large number of times else the extra time is only for one call which is negligible. (If this comment was disrespectful, please report it.)
@Robert: Well - the next thing to tackle is the butterfly calculation. Transfering from one table to another plus two fp-divisions just takes 100 µsecs for 2048 samples as you can see: reverse transforming adds about that amount of time due to the normalizing loop which is then performed additionally. (If this comment was disrespectful, please report it.)
This code has proved invaluable to me. I commend you on your efforts and kickass code. You've literally saved my neck from DSP slowness. I owe you a beer. (If this comment was disrespectful, please report it.)
I am glad to learn that this project has "survived" in another app (If this comment was disrespectful, please report it.)
Add Your Feedback
Your feedback will be posted below and an email sent to
the author. Please remember that the author was kind enough to
share this with you, so any criticisms must be stated politely, or they
will be deleted. (For feedback not related to this particular code, please
click here instead.)