Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: how to determine the peak frequencies (Read 11403 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

how to determine the peak frequencies

I need to solve following problem on multiple files (see the image below)



how to determine the peak frequencies

Reply #2
Write code to do it yourself

Interested to know if this is commercial or academic work. (continued from previous thread).

Cheers,
David.

how to determine the peak frequencies

Reply #3
Write code to do it yourself

Interested to know if this is commercial or academic work. (continued from previous thread).

Cheers,
David.


not commercial. not academic. I'm just a curious person and the one of a few people who understands the rest of picked research area. I need/want to solve a small puzzle. when it is done - research results will be public and free. and - If I could write the code by my self - I would do this. but I'm not a crazy scientist, I just know what I'm looking for, and what kind of tools I need.

how to determine the peak frequencies

Reply #4
You should look at the literature on feedback suppressors. This problem needs to be solved quickly, accurately and efficiently there. Start by searching patents.

how to determine the peak frequencies

Reply #5
matlab/gnu octave:

Code: [Select]
ft = abs(fft(signal, 524228));
[amp, max_peak_index] = max(ft);
fprintf('Peak occurred at index %d\n', max_peak_index)


Throw in your sampling rate and you can make that print statement tell you the exact frequency and not just the index.

how to determine the peak frequencies

Reply #6
saratoga's code is quite effective but there are a huge number of potential improvements to make. Whether or not those are worthwhile largely depends on what sort of constraints the domain problem has in terms of noise levels, how stationary the tonal signals are (ie whether or not the frequencies change over time), desired accuracy of peak measurements, etc.

how to determine the peak frequencies

Reply #7
certain qualities of sound files are similar. background is the same, frequencies are constant, only the amplitudes fade down (different fade speed). peaks are at least 20-30dB over the background level, and long enough to detect them.

so to make it easier. let say, that the user specifies the lower and upper frequency limit, and the peak detection level in (-dB). then what you have got - are only peaks to measure and to report as frequencies. sound files are long enough to perform the high-resolution (524288 pts) measurement (at least 15-20 seconds per file is enough to such resolution).

I'm trying to use/understand matlab, but all I can - is to start it. everything else is a black magic for me :-D I don't know what would be easier/faster - matlab learning or manual data processing with some spectral software  :-]

how to determine the peak frequencies

Reply #8
11 seconds!? For peak frequency detection with a resolution of 0.2hz?? No. Use a Hann window, upsample your FFT by at least 4x and you'll be able to do with considerably fewer samples.

Quote
I'm trying to use/understand matlab, but all I can - is to start it. everything else is a black magic for me :-D I don't know what would be easier/faster - matlab learning or manual data processing with some spectral software  :-]

General purpose spectral analysis tools are great for run-of-the-mill analysis operations. This is not one of them.

how to determine the peak frequencies

Reply #9
11 seconds!? For peak frequency detection with a resolution of 0.2hz?? No. Use a Hann window, upsample your FFT by at least 4x and you'll be able to do with considerably fewer samples.

Quote
I'm trying to use/understand matlab, but all I can - is to start it. everything else is a black magic for me :-D I don't know what would be easier/faster - matlab learning or manual data processing with some spectral software  :-]

General purpose spectral analysis tools are great for run-of-the-mill analysis operations. This is not one of them.


spectral analysis software that I use for manual data rewriting - says that for that resolution - I need that long samples (offline analysis). what I'm saying here is, that the samples I have - are longer anyway.

I'm not a scientist if you ask ;-) I just found a passion and curiosity in understanding the properties of certain sound sources. Sometimes I feel like a monkey that was obligated to drive a modern airplane, but... I'm a happy monkey anyway :-D

how to determine the peak frequencies

Reply #10
here is a sound example. and measure parameters are: 1000Hz -1300Hz, and -60dB detection level across the file. theoretically there should be 4 peaks detected.

how to determine the peak frequencies

Reply #11
Spectral analysis is conceptually simple but hides a tremendous amount of complexity. In an academic setting, one would be expected to have completed a couple years of calculus and probably at least one other course covering analog signal processing before moving on to digital signal processing (and even then, in an engineering context, distributions were not covered when I went through college, and that's been hurting when I want to learn the finer points of eg delta functions.)

I didn't fully realize from your problem description that you are trying to discriminate peaks potentially as small as 0.2hz apart, as opposed to having a frequency estimate with that fine an accuracy. In that case I was more or less wrong in my sampling estimates; you will always need at least 1/0.2=5 seconds of data per FFT to do that, which at this samping rate is 220500 samples. I also didn't realize you were actually analyzing numeric data that was not (directly) related to human-hearable sound.

If you want to poke around further with manual analysis, you should try varying the number of samples read while also padding the beginning and end of the data with an arbitrary number of zeroes. This is (roughly) equivalent to upsampling the spectrum output and can improve the precision of the estimates. Beyond that, besides learning Octave (and I highly recommend learning a tool like that for general numeric pursuits), you might have luck finding some sort of spectral app with a decent frequency estimation capability, but most of those sorts of things are either very specific to an esoteric field, or are going to be toolboxes or languages designed for engineers and scientists and may not be any easier than Octave. (Or they cost $$$.)

A not-half-bad DSP textbook which is available online is http://www.dspguide.com/, if you want to look at a reference.

how to determine the peak frequencies

Reply #12
yes. what is measured are "frequencies", "tones" and "differential pulsations" of multiple sound sources and in multiple bands. frequencies are something that evoke pulsating tones (for example pair of freq's, let say 120 and 122 Hz produces tone with pitch equal to 121Hz and 2Hz pulsation), in most cases - measured frequencies correspond with audible effects (freq's of pulsations, audible tones). another aspect of this measurement is - it shows frequencies that in certain situations - can have audible amplitudes (can have audible effect on sound). what is then analyzed - is a large library of such sounds in order to understand the sound map of something. initial accuracy is required for further generalization.

I was told that matlab-like thing should do this very easy to do such peak/freq detection, but such tools are beyond my area of understanding; learning takes time. what I need - are data - "now" (for yesterday); learning thing like matlab - "now" - means that I would have no time to get any data (and such data, small but usable portions - I can get by manually check, paralel to initial conclusions and analysis). learning has also another aspect; it is easier to learn how to manipulate ready scripts (like people who don't know javascript, but are able to use and modify it), than to start from beginning.

I have a passion and curiosity for what I do, and I hope - that someone who understands this way of life (and has a passion and curiosity for things like matlab or other programming language) - can help. Nothing else.

how to determine the peak frequencies

Reply #13
I have a passion and curiosity for what I do, and I hope - that someone who understands this way of life (and has a passion and curiosity for things like matlab or other programming language) - can help. Nothing else.


well, could you be specific about what the problem you're having with saratoga's script is? do you know how to run it, for instance? how to load the sound file into octave?

how to determine the peak frequencies

Reply #14
here is a sound example. and measure parameters are: 1000Hz -1300Hz, and -60dB detection level across the file. theoretically there should be 4 peaks detected.
There's white noise, higher level band limited noise approximately across the range you quote, a 1127.4Hz tone pulsing at 2.3 times per second (i.e. probably 1128.5Hz + 1126.3Hz), something at 1069Hz, and just maybe something around 1246Hz.

To differentiate such close peaks, you do need silly sized FFTs. In a case like this (i.e. 44.1kHz sampled, but all the wanted content lying below 2kHz) you could resample to 4kHz sampling, and then used the same number of FFT points to give you far finer frequency resolution, or get the same frequency resolution with far fewer FFT points.

Cheers,
David.

how to determine the peak frequencies

Reply #15
well, could you be specific about what the problem you're having with saratoga's script is? do you know how to run it, for instance? how to load the sound file into octave?


octave is so foreign to me as matlab or other stuff like that. neither I know how to use it (of course I don't mean the double-click on exe file...) nor how to load files within it. and I'm afraid I have not enough... what you call it in english... not enough "energy" to involve myself in learning new stuff like this. I am involved in some other job/life related activities, and I'm simply not able to learn a new programing tool right now, without loosing my integrity, efficiency or health. that why I'm looking for "working solutions". don't get me wrong. I respect the job of other people, perhaps even more than one can imagine, but I also understand that other people can do things easily and quickly, things that I'm not able to.

@2Bdecided:

within the database, there are groups of files with peak frequencies in various ranges: from about 100Hz to 5500Hz. I try to not interfere with additional, manual resampling of these probes. but I assume, that such thing could be made virtually by measuremental app.

how to determine the peak frequencies

Reply #16
I am involved in some other job/life related activities, and I'm simply not able to learn a new programing tool right now, without loosing my integrity, efficiency or health. that why I'm looking for "working solutions". don't get me wrong. I respect the job of other people, perhaps even more than one can imagine, but I also understand that other people can do things easily and quickly, things that I'm not able to.


So you want to research a problem without putting in any effort at all or learning anything in the process?

No offense, but just give up now and find an easier hobby.  If you don't care enough to work at it, you're not going to be able to do it.

how to determine the peak frequencies

Reply #17
So you want to research a problem without putting in any effort at all or learning anything in the process?

No offense, but just give up now and find an easier hobby.  If you don't care enough to work at it, you're not going to be able to do it.


nope, a lot more of things is done around this. data must be analyzed, compared, organized. so the development of protocols (excel is one of things, that I just learn "on-the-go"), data management, sound probes preparation, a lot of listening versus measurement, not to mention summaries... that why I'm looking for automations of certain things. if you believe that there is no effort in my work, I can put you in my place. I guess you would resign after 2-3 days, not knowing what are you looking for and not knowing why you do what you do.

I'm going to perform this work, with or without help, so as I did with other projects before. but there is a difference between "effective progress" and "amount of effort", don't you think? you find another hobby you smart guy :-)

how to determine the peak frequencies

Reply #18
@2Bdecided:

within the database, there are groups of files with peak frequencies in various ranges: from about 100Hz to 5500Hz. I try to not interfere with additional, manual resampling of these probes. but I assume, that such thing could be made virtually by measuremental app.
Is the source a simulation, digital, or analogue? Is the source expected to be time-stable?

I ask because such long FFTs aren't going to work very well if there's any jitter, wow, flutter etc.


Assuming that's all fine, the task is conceptually simple, though I'm sure there will be some "gotchas" along the way. It should take someone competent a couple of hours.

Either some kind soul will do it for free here, or you'll have to pay someone. Or you explain more about what you're doing anything someone here thinks "hey, that sounds cool, I'd like to help - especially if I get credited on a published paper or something". That's usually how it works.

Cheers,
David.

how to determine the peak frequencies

Reply #19
Is the source a simulation, digital, or analogue? Is the source expected to be time-stable?

I ask because such long FFTs aren't going to work very well if there's any jitter, wow, flutter etc.

Assuming that's all fine, the task is conceptually simple, though I'm sure there will be some "gotchas" along the way. It should take someone competent a couple of hours.

Either some kind soul will do it for free here, or you'll have to pay someone. Or you explain more about what you're doing anything someone here thinks "hey, that sounds cool, I'd like to help - especially if I get credited on a published paper or something". That's usually how it works.

Cheers,
David.


the source is analogue, but recorded to a computer; these are a spectral components of a certain kind of exotic-instrument-like units, used for therapy. the frequencies are time-stable, the amplitudes are fading. noise floor is relatively low, but differs in spectra.

according to my understanding (I'm not a programmer neither high-tech scientist), and according to my observation with spectral software that I have access to - indeed what I need shouldn't be complicated to do, and knowledge about the details is not necessary to do this. such tool would be probably nice also for other folks who work in other areas of sound, where peak searching is useful thing to do.

sure I can pay, but the question "how much"? $10? $50? $100? $300? $1000? and "how long" it will take? a day? a week? a month? what I'm afraid of - are the situations when someone is trying to cheat or simply makes "emotional noise" around the topic, and that why I don't share details if I don't have to. I prefer to stay cautious when I'm on public forums. a few years ago, I would be more open in sharing my thoughts, but few years ago - people were somewhat different than now. now - most everyone seems to be somewhat suspicious :-D after certain "new" experiences versus "old" experiences with "a kind souls" - I began to stop to believe into such ones in the programming area. ;-)

and - yes, sure, people who help - can be credited in this paper if they want to be, I thought it is obvious.

p.s.: http://www.monroeinstitute.org/thehub/ideas-sex/
found yesterday. the movie explains everything. :-D

how to determine the peak frequencies

Reply #20
solution found, topic closed.

 

how to determine the peak frequencies

Reply #21
Sorry, but this is out of line. I'm not interested in this particular topic, as it seems like common matlab/octave or sox solution if you need it, but just look at this new-age member who wants to make money out of it (just contact him):
- he came here and asks for solution (but the one that he can understand/make as the topic if bigger then he is)
- he hosted OP image on his site, and deleted it afterwards (so if you see this thread for the first time you can't easily follow)
- he asked for help (help was given in various forms, but not according his arrogant replies) and when he supposedly found solution, he comes here and waves 'I found solution - thread closed'

I need/want to solve a small puzzle. when it is done - research results will be public and free.

solution found, topic closed.

Can you believe that he took project names by old classic Monroe Instutute products. - I guess I can
There is no need to ban such low life. It justifies my feeling toward this 'quasi-movement' where mistakenly also some fine artists are binned
Only I feel bad when some new user, obviously noob asking curious pirate things, got bashed in various degrees and don't get answer, but members are trying to provide one for such phonies