Posts: 1,000
Threads: 253
Joined: Feb 2008
Gintaras,
I would like to monitor for a 25Hz tone and a 35Hz tone on the line input of a computer to use for program control.
I did a quick google search and came across this Frequency Analyzer program with source code:
http://www.relisoft.com/freeware/freq.html
Frequency Analyzer program:
http://www.relisoft.com/freq.zip
They have the source code available in C++
http://www.relisoft.com/freeware/source.zip
Could you give an example (when/if you have time):
Watches for user defined frequencies that are longer than a user defined length?
Thanks,
Jimmy Vig
Posts: 12,073
Threads: 140
Joined: Dec 2002
Many years ago I also worked with a frequency analyzer using FFT, and know that QM would be too slow. Need to write in C++. Try to make dll from the source code, and call it from QM.
Posts: 1,000
Threads: 253
Joined: Feb 2008
So a dll called from QM would be fast enough to do the trick?
Now this opens up a whole can of worms for me and is going to force me way outside my comfort zone of programming.
I can barely work with dll's that are already made. Really the only ones I've ever gotten to work are ones you've given an example in QM first.
2nd I don't know C++ at all...let alone how to compile it into a dll file.
3rd...once I get it all into a dll...what the heck do I do with it then?!?
This is going to take a lot of questions of you. Most likely I would grow exponentially in my abilities through a project like this.
I can only cross my fingers and hope that you are down to teach me and guide me through this.
Found these googling around:
http://www.fftw.org/
http://heliso.tripod.com/programm/fft/fftdll.htm
http://www.ultimaserial.com/FFT1024.html
So why would QM not be fast enough to handle this?
Thanks again,
Jimmy Vig
Posts: 12,073
Threads: 140
Joined: Dec 2002
Try to ask the authors of the program for a dll or ActiveX dll. Converting a C++ program to QM, or to dll, I cannot do it, unless it would be something useful to many QM users.
Posts: 1,000
Threads: 253
Joined: Feb 2008
Can you advise on how to make a dll from C++ and other languages?
That would be very useful to many QM users
Also can you advise if any of the links I provided in my previous post would provide a viable solution with QuickMacros?
Thanks,
jimmy vig
Posts: 12,073
Threads: 140
Joined: Dec 2002
Posts: 12,073
Threads: 140
Joined: Dec 2002
Also can you advise if any of the links I provided in my previous post would provide a viable solution with QuickMacros?
Yes, I think.
Posts: 1,000
Threads: 253
Joined: Feb 2008
Looks good. Thanks for the forum link, I admit I did not search the forum before I posted the question about making dll files. Usually I scour the forum before I post anything
I can't wait to download one of the programs and compile my first dll and use it QM! Also getting a chance to work with C++ for the first time will be a neat experience. I'll be sure to post what I have as I go along in case anyone else ever comes across the need to do this, plus I'm sure I'll screw up really simple things on my first go around with all of this.
Thank you so much Gintaras for all of you help so far along my way. I sure owe you big time for everything! Seriously, less than two years ago I google searched for something to automate keyboard strokes because I was tired of hitting "TAB" 17 times to go from one edit box to another during data entry. Now I am writing programs for the same company that perform complex engineering tasks. I've gotten two raises and a hell of a lot more respect. Not once when I started did I ever think I would eventually become a "computer programmer." For sure I have a long way to go before I understand multiple languages, advanced programming techniques, dll's, .NET, COM, and the ever expanding MSDN website! Once again. Thank you very, very much!!
jimmy Vig
Posts: 1,000
Threads: 253
Joined: Feb 2008
I found a little program that does exactly what I need!!
http://www.nch.com.au/action/tdsetup.exe
I can even use command line arguments to run QM functions from the "Run exe:" triggered by the tones!
Example QM function triggered by ToneDet.exe:
c:\program files\quick macros 2\qm.exe M "Start_25hz"
By the way...can variables be passed through the command line?
Posts: 12,073
Threads: 140
Joined: Dec 2002
...M "Start_25hz" A var1 var2
--------------
function var1 var2
...
Posts: 1,000
Threads: 253
Joined: Feb 2008
Well isn't that nifty. Really just about have everything in quick macros don't you Gintaras. Yet again you prove to amaze me, especially since I spent last night changing C++ to a DLL. I am definitely far behind working with C++ because QM has spoiled me.
With the ToneDet program I'm working on using it for DTMF tones...works so far, but I need to handle the two different threads generated by the ToneDet because it responds to each tone....in different orders. I think passing the variables through the command line into one function will help with some of the problems I was having.
Thanks,
jimmy Vig.