Is there a way to increase the Apple Music volume by 1% instead of 10%?

Hi everyone, while I understand that keyboard maestro has a built-in action in which the volume level of Apple Music can be raised by 10%, is there any easy way to change the volume with smaller increments? (Namely, 1%?). Thanks so much, I am so grateful to this forum for the invaluable advice I have received thus far.

Addendum; I have gotten it to work with a 1% volume increase using the following:

The only problem is: when the volume reaches 100 or 0, it no longer wants to change. However, it is able to change as long as the value is not 100 or 0. (For example, if the Apple Music slider value is at 50, I can raise it to 51; but I cannot go from 0 to 1 or 100 to 99). Would anyone have any insight? Thanks so much!

1 Like

There might be more elegant ways. But, how about this:

Add an IF THEN statement,

if the volume = 100, 
  then change the volume to 99, 
if the volume = 0, 
  then change the volume to 1.

Hi there; I have a similar request but with Apple Music specifically. Is there a special way to apply the an incremental volume change within Apple Music (and not system volume) using keyboard maestro?

Right now, the only option available to me from, among the actions list is to increase it by 10% at a time. Thanks!

You can use AppleScript to change the volume in Apple Music.

tell application "Music"
   set the sound volume to 80
end tell

So you of course need to build some logic around it to increase/decrease it.

Addendum; I have gotten it to work with a 1% volume increase using the following:

The only problem is: when the volume reaches 100 or 0, it no longer wants to change. However, it is able to change as long as the value is not 100 or 0. (For example, if the Apple Music slider value is at 50, I can raise it to 51; but I cannot go from 0 to 1 or 100 to 99). Would you have any insight? Thanks so much!

Maybe try to change Greater than to Greater than or equal.
And Less than to Less than or equal.

How perplexing, I am still running into the same problem even after making this change. Would you have any other suggestions? Maybe I am missing something fundamental? Thanks again for your help.

Try adding a "say" statement in your AppleScript code to say what the value of vol is. That might help you figure out what's happening.

My knowledge of AppleScript is quite low, but I think you just say "say vol".

I am not that good at AppleScript, so lets hope somebody else can chime in with their knowledge.

Not sure how to implement this ): Would you mind furnishing an example if possible? I'm just confused why it works for all volume states except for 0 and 100

Ok. I tested the code. It works for me. I began with 0, and it successfully increased to 1, 2, 3, 4. . .

2021-07-30 21-13-48.2021-07-30 21_14_44

This is from 100 to 99, 98...

2021-07-30 21-18-23.2021-07-30 21_18_48

1 Like

Thanks so much for taking a look!

Sorry to be so annoying--but I've just implement your code exactly, and I still have the same issue. How could this be? Is it something to do with my machine somehow?

Sorry. I'm not competent enough to answer this question.

Have you tested it in the Script Editor?

I know it's years later, but I had the same problem as you (for whatever reasons volume wouldn't go up from 0 or down from 100.) I just figured out why your if/then statement didn't work. Apparently the Music app doesn't go from 0 to 100, but it goes from 1 (no volume) to 99 (max volume.).

This worked for me

Up by 1%

tell application "Music"
set vol to sound volume
set vol to vol + 1
if vol is less than or equal to 1 then
set vol to 2
end if
set sound volume to vol
end tell

Down by 1%

tell application "Music"
set vol to sound volume
set vol to vol - 1
if vol is greater than or equal to 99 then
set vol to 98
end if
set sound volume to vol
end tell

Screenshot 2023-07-04 at 3.40.47 PM

I hope this helps someone!

2 Likes

Hey, I actually abandoned this, but was so pleased to see that you found a solution. Thank you so very much! Really made my whole week.

1 Like