Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Set incredibly precise volume levels using AppleScript' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Set incredibly precise volume levels using AppleScript
Authored by: Andrew J Freyer on Mar 02, '10 08:09:02AM
I believe that this hint is ignoring the fact that applescript ultimately recasts the float to an integer from 1-100.

It is misleading to say that "you can set the volume as precise as you want" because there are only 100 volume levels. A quick verification shows this:


display dialog 
	"Enter number." with title 
	"Number Of Squares?" buttons {"Set"} 
	default button 1 default answer ""
set numberSquares to text returned of result
set numberHalved to numberSquares / 2
set volume numberHalved

output volume of (get volume settings)

The output of the above "output volume" line shows that no matter how "precise" you think you're setting the volume, the computer is rounding to the nearest step of 100 (i.e. the maximum precision of the 0-8 volume setting method above is 0.08.)

The best way to set volume to the highest precision level is:


set volume output volume 7.5

output volume of (get volume settings)

Notice that the output volume here is rounded to 8.

Edited on Mar 02, '10 08:13:09AM by Andrew J Freyer


[ Reply to This | # ]
Set incredibly precise volume levels using AppleScript
Authored by: Andrew J Freyer on Mar 02, '10 08:15:20AM

I might also note that holding COMMAND + SHIFT while adjusting the volume will allow more delicate volume control.



[ Reply to This | # ]
Not Command - Shift
Authored by: DCJ001 on Mar 02, '10 10:36:54AM

Actually, depressing Option - Shift while increasing or decreasing the volume makes changes in 1/3 increments.



[ Reply to This | # ]
Not Command - Shift
Authored by: jiclark on Mar 02, '10 10:42:36AM

Which is mentioned in the hint!



[ Reply to This | # ]
Not Command - Shift
Authored by: mkhaw on Mar 02, '10 11:00:04AM

On my Snow Leopard MBP, I get 1/4 steps with option+shift for a total of 64 steps across the entire scale.

shift (with or w/o cmd) instead changes the volume silently (i.e., without audio feeback).

option alone brings up the Sound prefpane.



[ Reply to This | # ]
Not Command - Shift
Authored by: Andrew J Freyer on Mar 02, '10 12:56:09PM

oops - haha, typing too quickly is always a risk these days.



[ Reply to This | # ]
1/4 not 1/3
Authored by: DCJ001 on Mar 02, '10 02:21:38PM

I forgot that Option-Shift gives 1/4 increment changes in volume, not 1/3 as I said in my previous post.



[ Reply to This | # ]