Use this to toggle between settings for desktop speakers and the MacBook Pro’s less capable small speakers.
Sponsored Links:
Applescript to Toggle iTunes Equalizer Presets
Applescript
set theEqPresetName to ""
tell application "iTunes"
if the current EQ preset is EQ preset "Flat" then
set the current EQ preset to EQ preset "Small Speakers"
else
set the current EQ preset to EQ preset "Flat"
end if
set theEqPresetName to name of the current EQ preset
end tell
I saved this script to ~/Library/Scripts/iTunes/Toggle Equalizer Preset.scpt, (you may need to create this folder yourself) then added that folder to Lauchbar’s configuration, so that I can toggle this using the keyboard.
Note the equalizer’s On checkbox needs to be checked for this to have any effect on audio. I couldn’t find an easy & reliable way to switch that on using Applescript.
Bonus Feature - Growl Notifications
Add this to the bottom of the same Applescript to receive a Growl notification including the name of the new preset:
tell application "GrowlHelperApp"
-- Make a list of all the notification types
-- that this script will ever send:
set the allNotificationsList to ¬
{"EQ Preset Changed"}
-- Make a list of the notifications
-- that will be enabled by default.
-- Those not enabled by default can be enabled later
-- in the 'Applications' tab of the growl prefpane.
set the enabledNotificationsList to ¬
{item 1 of allNotificationsList}
-- Register our script with growl.
-- You can optionally (as here) set a default icon
-- for this script's notifications.
register as application ¬
"Toggle Equalizer Preset" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"
-- Send a Notification...
notify with name ¬
"EQ Preset Changed" title ¬
"EQ Preset Changed" description ¬
theEqPresetName application name "Toggle Equalizer Preset"
end tell
Download
Toggle Equalizer Preset.zip (1 KB)
Toggle Equalizer Preset Growl (4 KB) (With Growl Notification)