Giter Club home page Giter Club logo

Comments (3)

skety avatar skety commented on June 14, 2024

Here is a table showing the shift between 2 volumes level, if it can help:

pactl i3pystatus
0 0
5 4
10 9
... ...
95 94
100 99
100 100

To go from 99 to 100% I need to increase the volume once more. Not sure what happens there :S. I use the following command to increase the volume: pactl set-sink-volume $sink +5%

from i3pystatus.

enkore avatar enkore commented on June 14, 2024

These are very likely rounding errors, since the calculation of the percentage value adheres to pulseaudios own implementation ( volume / PA_VOLUME_NORM yields values in 0..1 for 0..100 %, times 100 = 0..100 %).

By the way, I'd recommend using decibels for displaying and changing volume as it's much more natural and fitting for audio, since increasing volume by 5 % increases perceived volume by differing amounts (from very much at low levels to barely noticeable at high levels), while increasing by a fixed number of decibels leads to nearly the same change in perceived volume, regardless of level.

At 100 % the display is 0 dB, while at 0 % the display is -∞ dB.

A script demonstrating pulseaudio volume control can be found here: https://github.com/enkore/dot-scripts/blob/master/pavol

I use it like this with i3:

bindsym XF86AudioMute exec pavol mute
bindsym XF86AudioRaiseVolume exec pavol plus
bindsym XF86AudioLowerVolume exec pavol minus

from i3pystatus.

skety avatar skety commented on June 14, 2024

Thanks for the suggestion, I switch to db, my OCD is not kicking anymore due to some "none multiple of 5" values hehe.

from i3pystatus.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.