thetwom / Tuner

Tuner app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Make some settings more clear

Glitchy-Tozier opened this issue · comments

This is the main one. No idea what it does:
Screenshot_20210627-150202_Tuner.jpg

In general though, it might be a good idea to help users understand the settings. Sound analysis is a complicated subject for most peope.

Not sure how this best is achieved though without adding tons of explanatory popups.

Well, I fully agree that most settings are not really useful to most users. Most of them are there, because they are part of the analysis but it should be just fine in default settings. In future I might have to think of hiding most of the parameters in an expert section ...
I renamed Überlappung/Overlap not to Fensterüberlappung/Windowoverlap, but I guess this does not help much. It will go into one of the next versions.
In case you are interested what overlap means, here some background.
For analyzing the frequency, first we record some samples (e.g. 8192 samples). These are then analyzed for the frequency. Then we record new samples and analyze again ... and so on. An overlap of 0% means, that we sample 8192 samples, analyze, then record the next 8192 samples, analyze, and so on. An overlap of 50% means, that we record 8192 samples, analyze, then only record 4096 samples and reuse the second half of the previous record, so that in total we still analyze 8192 samples.

Lets put it in user perspective: Recording 8192 samples takes about 0.17seconds. This means that for 0% overlap, you get a new frequency value every 0.17 seconds. If you set it to 50%, you will get a new frequency value every 0.85s ... going to even more overlap, the updates become even more frequent. On the other side, more overlap means more work since you are analyzing for frequencies more often.

A cheaper way to get more frequent updates is decreasing the window size. But this means that the minimal frequency you can resolve goes up. So it depends on your instrument's frequency range, if you can decrease the window size or not.

In future I might also think about "help" buttons which offers an explanation of what the settings mean. But not sure, if this is worth the effort ...
Best regards

I renamed Überlappung/Overlap not to Fensterüberlappung/Windowoverlap, but I guess this does not help much.

That's definitely an improvement! The only thing i want to add is that in the English language, you can't connect words that easily. Therefore I'd call the english version Window Overlap or Window-Overlap. Not sure whether to capitalize the second word though.

Lets put it in user perspective:…

Thank you for the explanation!
Funnily enough, this sounds kind of similar to what i did for my Matura/Abitur-Project. I tried to make my script draw sheet music from prerecorded samples though. (I used a basic fourier transformation though)

A cheaper way to get more frequent updates is decreasing the window size. But this means that the minimal frequency you can resolve goes up. So it depends on your instrument's frequency range, if you can decrease the window size or not.

This brings up an interesting idea: Sould you ever happen to have a lot of free time, having presets for certain instruments would be interesting. I play piano meaning that i probably can't decrease window size... for other instruments it might be helpful though.

But not sure, if this is worth the effort ...

Agreed, there probably are more important things to do.

Thank you for the detailed response :)

Sorry, but I'll steal this issue a lil' bit to ask: What's "Moving average"? 😇 And a "Help"-doc that just explains every option would be cool, just down by "About" or something

Thanks for your interest.

Moving average ...

  • First you must understand, that we detect tones always for short packages of time. E.g. the app records 0.3ms and the analyzes it for the underlying tones.
  • No averaging means, that we record one bunch of data, analyze it and present the result. But without averaging result can fluctuate quite a bit. So you would see a not so smooth line in the pitch-history plot.
  • Averaging means, that we analyze e.g. 5 packages of data and average the result before presenting it in the history plot. Moving average means, that we internally store the the analyzed results of several packages. And when a new result is available, we compute the average of the last e.g. 5 results.

Or to make it a bit more practical, lets name recorded datackages d1, d2, d3, ... where

  • d1 contains data of the first 0.3ms
  • d2 contains data of the second 0.3ms
  • ...

Then we will have resulting frequencies of f1, f2, f3, f4, ... where

  • f1 is the analyzed frequency of data package d1,
  • f2 is the analyzed frequency of data package d2,
  • ...

Then what will be presented in the plot (if we have a moving average of 5) will be

  • First value: (f1 + f2 + f3 + f4 + f5) / 5
  • Second value: (f2 + f3 + f4 + f5 + f6) / 5
  • Third value: (f3 + f4 + f5 + f6 + f7) / 5
  • ...

Hope this explanation helps. I understand that docs would be nice. In-app docs would be quite some work to do it nice, maybe I should start with some pdf-document at some time ...

commented

Thanks for the excellent explanation! 🙏

PDF would be cool!