Skip to content

feat: adjust volume mapping for linear perceived loudness#681

Closed
Guanran928 wants to merge 1 commit intojpochyla:mainfrom
Guanran928:linear-perceived-loudness
Closed

feat: adjust volume mapping for linear perceived loudness#681
Guanran928 wants to merge 1 commit intojpochyla:mainfrom
Guanran928:linear-perceived-loudness

Conversation

@Guanran928
Copy link
Copy Markdown

This improves how the volume control works by making the loudness feel more natural to our ears.
Instead of changing volume linearly (which sounds uneven), it applies a logarithmic curve so that when you move the volume slider, the perceived loudness changes smoothly and evenly.

@Guanran928
Copy link
Copy Markdown
Author

Wait... It is already implemented in #339

It's weird that the volume still sounds uneven to me.

@Guanran928 Guanran928 marked this pull request as draft July 23, 2025 13:00
@Guanran928
Copy link
Copy Markdown
Author

Guanran928 commented Jul 23, 2025

😅 It turns out pow(4.0) was too much for me. The volume sounds muted when the slider is below 50%, and I thought this thing wasn't implemented.

The blue line is the original implementation.
The purple line is my change stacked on top of pow(4.0).

I think pow(2.0) is good enough.

image

Also sorry for my English :P, I'm not really sure how to express this abstract thing in English so I might've made mistakes.

(I'm still in middle school and I literally just learned how logarithmic functions work this semester)

@Guanran928 Guanran928 force-pushed the linear-perceived-loudness branch from 8535f94 to c2bbd59 Compare July 23, 2025 13:17
@Guanran928 Guanran928 marked this pull request as ready for review July 23, 2025 13:17
@Guanran928 Guanran928 closed this Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant