-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature request] option to visualize on logarithmic scale #15
Comments
I actually want to look into this. I had originally tried to do something logarithmic, but I am not too well versed in the magic of audio analysis. I had done a logarithmic scale before, but the output was very sparse. I believe I need to fill out the missing bars with some smoothing algorithm that will follow the existing bars. If you check out the code, it was supposed to be an attempt at some sort of non-linear distribution, but it ends up just being linear with a lot of wasted work. This is definitely something I will be working on. |
I think it should just be a matter of transforming the linear datapoints with a log function, but you would also have to decrease the spacing of samples for lower frequencies. I haven't taken a look at the code tho, and I don't really know how to program in go lol Something I found that could help with the sampling frequency issue: https://stackoverflow.com/questions/32320028/convert-linear-audio-frequency-distribution-to-logarithmic-perceptual-distributi |
It'd also be cool to have a toggle/setting that flips between logarithmic and linear axis scales, since right now I think the low frequencies are being squished together.
For reference, here's what an audio spectrum with a logarithmic scale looks like:
![image](https://user-images.githubusercontent.com/84431899/162534140-52102516-42fc-40fa-8b59-84d35fc5cddd.png)
![image](https://user-images.githubusercontent.com/84431899/162534381-f91f43bf-7baa-4816-aab8-ec05d502a640.png)
, versus a linear scale like
, which is what the visualizer looks like right now.
The text was updated successfully, but these errors were encountered: