Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Even in iTunes 11, there is no fade out when pausing playback or fade in when starting playback. How can I achieve this?

share|improve this question
add comment

1 Answer

In Automator, create a new Service, add a Run AppleScript action to it, and enter the following script:

set current_application to (path to frontmost application as Unicode text)
tell application "System Events"
    if process "iTunes" exists then
        tell application "iTunes"
            set current_volume to the sound volume
            if (player state is playing) then
                repeat
                    repeat with i from current_volume to 0 by -1
                        set the sound volume to i
                        delay 0.01
                    end repeat
                    pause
                    set the sound volume to current_volume
                    exit repeat
                end repeat
            else
                set the sound volume to 0
                play
                repeat with j from 0 to current_volume by 1
                    set the sound volume to j
                end repeat
            end if
        end tell
        tell application current_application
            activate
        end tell
    end if
end tell

You can assign a keyboard shortcut to it in System Preferences > Keyboard > Keyboard Shortcuts > Services.

share|improve this answer
    
This works perfectly and it should be marked as the solution. Thank you, I love it. –  Elliott Feb 10 at 18:44
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.