Applescript: Fade iTunes to Selected Track
Ever playing music for other people from iTunes? And want to change the song without everyone noticing? Trying to do a manual fade is tough. This script lets you select the next song you want to play, and then fade the volume out and in to that track. Download: itunes-fade-to-selected-track.zip
property initialVolume : null
tell application "iTunes"
set speed to 5 -- lower means slower fade
if sound volume = 0 then -- if volume is all the way down, fade in
play
set initialVolume to 60
repeat until (sound volume) is greater than or equal to (initialVolume - speed)
set sound volume to (sound volume + speed)
end repeat
set sound volume to initialVolume
else -- fade out, skip to selected track, fade in
set initialVolume to (get sound volume)
repeat until (sound volume - speed) is less than or equal to 0
set sound volume to (sound volume - speed)
end repeat
set sound volume to 0
play selection
repeat until (sound volume + speed) is greater than or equal to initialVolume
set sound volume to (sound volume + speed)
end repeat
end if
end tell
A Smarter Shuffle for iTunes
Apple has the digital music industry in a stronghold, but how can they innovate to keep us happy?
Listening to my iPhone on shuffle on my walking commute this morning, I got to thinking about how Apple's over-marketed shuffle feature could actually live up to the hype.
Here's the idea: Think Pandora, but better, and with your own music. What I mean is Pandora's system for suggesting music, but more automated and without having to give a thumbs up / thumbs down explicitly. A key concept is that a playlist's total quality is not just in terms of the quality of each individual track, but also the order in which the tracks are arranged. So, if you hate listening to indie rock right after 'gangsta' rap, your media player could learn this and prevent you from such discomfort.
How it would work: You listen to your iPod/iTunes on shuffle like normal, skipping songs when you feel like it. iTunes keeps track of how long into a song you skip it, and records this data in the track's metadata along with the ID of the previous track. iTunes would also keep this metadata in its index.
So, when you first hit shuffle, iTunes picks a random song. Then, if you skip that song quickly, the next track will be dissimilar from the previous track. If however, you listen through the whole thing, iTunes will pick a similar track, based on whether that song was played through in a similar succession before.
Track selection would probably be best if it relied on multiple criteria, including, for example, tags. The ability to assign tags to your music is something I've wanted for some time, but that's a topic for another discussion. Still, tags would help a track selection system to better calculate similarities between genres.
There's a lot of tweaking that would have to be done, but I think the introduction of a smarter shuffle would help Apple maintain their lead in the digital music market.
