If you have a problem or need to report a bug please email : support@dsprobotics.com
There are 3 sections to this support area:
DOWNLOADS: access to product manuals, support files and drivers
HELP & INFORMATION: tutorials and example files for learning or finding pre-made modules for your projects
USER FORUMS: meet with other users and exchange ideas, you can also get help and assistance here
NEW REGISTRATIONS - please contact us if you wish to register on the forum
Users are reminded of the forum rules they sign up to which prohibits any activity that violates any laws including posting material covered by copyright
frequency readout
17 posts
• Page 1 of 2 • 1, 2
frequency readout
Hello all,
Could some kind person show me a simple fsm frequency readout (meter) for reading oscillator and such outputs.
Thank you, BobF.....
Could some kind person show me a simple fsm frequency readout (meter) for reading oscillator and such outputs.
Thank you, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: frequency "readout"
There is no such thing as a frequency readout. You can readout sample values, but frequency is another quality. What you can do is analyze the signal and try to extract a frequency. Clearly, that will not work for polyphonic signals.
There are pitch extractors around here and in the SM forum based on different algorithms including counting zero crossings, ADSF, heterodyning and FFT. Perhaps that would be a good FS Guru blog topic. Hmmm...
There are pitch extractors around here and in the SM forum based on different algorithms including counting zero crossings, ADSF, heterodyning and FFT. Perhaps that would be a good FS Guru blog topic. Hmmm...
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
Re: frequency readout
Thanks a lot Martin, I should have know that one. Just was not thinking clearly I guess.
Take care, BobF.....
Take care, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: frequency readout
You can estimate the peak freqency quite easily... but it's not accurate, and sometime you might not even get any close to what you want.
- Attachments
-
- Peak Frequency (MyCo).fsm
- (8.5 KiB) Downloaded 1190 times
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: frequency readout
Hi MyCo,
and thanks a lot. I guess for now anything is better than nothing !
Take care, BobF.....
and thanks a lot. I guess for now anything is better than nothing !
Take care, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: frequency readout
Hi
I just made this quick and dirty one and it seems to work well, especially in the lower ranges (unlike the FFT one above which gets better at higher frequencies but very inaccurate for Bass).
When you trim mine to give middle A an output of 440 Hz then you get an accuracy of better than 0.3% across the useful audio range. There's also a Period output provided.
Free to a good home!
Cheers
Spogg
I just made this quick and dirty one and it seems to work well, especially in the lower ranges (unlike the FFT one above which gets better at higher frequencies but very inaccurate for Bass).
When you trim mine to give middle A an output of 440 Hz then you get an accuracy of better than 0.3% across the useful audio range. There's also a Period output provided.
Free to a good home!
Cheers
Spogg
- Attachments
-
- Period and Frequency detector 1.0.fsm
- Detects the frequency and period of an audio input.
- (33.29 KiB) Downloaded 1212 times
-
Spogg - Posts: 3358
- Joined: Thu Nov 20, 2014 4:24 pm
- Location: Birmingham, England
Re: frequency readout
Hmm... I remember Martin was working on some pitch detection stuff that he wanted to use with bass ranges. It never occurred to me that certain methods work better for high freq while others work better for low...
Maybe there's a way to combine them!?
Maybe there's a way to combine them!?
- Perfect Human Interface
- Posts: 643
- Joined: Sun Mar 10, 2013 7:32 pm
Re: frequency readout
Hello Spogg,
Hey, thanks a lot. With yours and MyCo's I should be set.
Again thanks and take care.
Later then, BobF.....
Hey, thanks a lot. With yours and MyCo's I should be set.
Again thanks and take care.
Later then, BobF.....
- BobF
- Posts: 598
- Joined: Mon Apr 20, 2015 9:54 pm
Re: frequency readout
Perfect Human Interface wrote:It never occurred to me that certain methods work better for high freq while others work better for low...
There are many methods. They all have their pros and cons.
The FFT version above is just a good starting point. When you have an estimate, you could use eg. autocorrelation to fine trim your results. And this can be done fairly efficient. eg. when you have the FFT estimate, you position 2 autocorrelations, with a delay of sample_rate/(fft_peak_freq (+/-) offset). Then you'll find out, which of those 2 autocorrelations was better and in the next run you'll finetune the delays to sample_rate/(fft_peak_freq (+/-) last_best_offset + offset/2) ... and so on...
Never tested it though...
-
MyCo - Posts: 718
- Joined: Tue Jul 13, 2010 12:33 pm
- Location: Germany
Re: frequency readout
It is not hard to extract the frequency of a static sine wave. You get a single peak in the FFT spectrum which you can take as it is, or you could get sub-bin resolution by taking the neighbor bins into account. Or simply measure the time between two successive zero crossings, use linear interpolation for subsample accuracy. The true challenge, however, is with real world signals: they are varying in pitch and have harmonics often stronger than the fundamental. Pitch or fundamental frequency estimation of such material requres more sophisticated algorithms than simple zero crossings or FFT peak location. A good pitch tracker should lock on the fundamental, should be accurate, and should adapt fast to pitch changes without producing artifacts. The task is even tougher if you want to do it in real time and with finite resources.
-
martinvicanek - Posts: 1328
- Joined: Sat Jun 22, 2013 8:28 pm
17 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: Google [Bot] and 24 guests