How to get input volume level value in mac? As the title says, is there a way to get the input level in mac?



I want to get the value indicating in the input level bar(System Preferences -> Sound -> Input) in the pic.

Is it possible?

There are solutions on how to set the input and output volume but I can't find any solution to get the input level value.
Sorry, I got that you wanted the input volume, I just failed to word that comment a bit better. I was just looking at that code and thinking "it would push you to the right direction". Kinda like, if there is a piece of code that is like get window width... and I wanted the height instead, then the logical step is probably get window height.

I did come back to this before, but I thought someone answered this already...



Here are some examples of setting input volume.

You can find get volume settings documentation here.

Input Volume

-- Get input volume
input volume of (get volume settings)

-- Set input volume
set volume input volume 40

-- Increment input volume (+)
set volume input volume ((input volume of (get volume settings)) + 5)


Output Volume

-- Get output volume
output volume of (get volume settings)

-- Set output volume
set volume output volume 40

-- Increment output volume (+)
set volume output volume ((output volume of (get volume settings)) + 5)


You can test these in the /Applications/Utilities/Script Editor.app. If you stick this: return (get volume settings) at the very  end, after you've set volume levels, the result panel will give you the current values at the bottom of the window. Of course you could have the Sound preferences window open as well.