Adjust the volume in ¼ increments

Yes i tried a lot of key combinations.

Legacy code and rounding.

Over the years, you would adjust volume using different ranges. Integers 0-7, 0-10, and for a short time 0-1000, then floating point 0-1. And now we have 0 through 100 even though there are only 65 possible values (0=mute and 1 through 64). I think there is still some legacy code doing various adjustments and rounding, although I couldn't figure out the logic. 100/64 = 1.5625 but none of the typical rounding functions (up, down, to even, to odd, away from zero, "as taught in school" [yes that is a valid rounding parameter in AppleScript] ) would match to the results.

The problem with Jimmy's incremental script earlier was that the value 67 would "round down" to 66 so every time the script tried to set it to 67, it would end up at 66. There are a few other values that do the same thing.

Even worse is the value of 90 is in the list twice. I think 89 rounds up to 90 but then everything in the 90.0 - 90.9 range rounds down to 90. As you said, "very Apple".

Andres, I'm glad to hear that it is working for you.

5 Likes

8 posts were merged into an existing topic: Is there a way to increase the Apple Music volume by 1% instead of 10%?