FlexTime Random Sounds

November 3rd, 2006

Tim Altman asks whether a “Random Sound” option might be a good enhancement for FlexTime’s “Play Sound” cue type. I think this is an interesting idea, and definitely worth considering. But what can I do for Tim right now?

Another case of AppleScript to the rescue. By setting an activity’s starting cue to “Play Sound” and its finishing cue to RandomSound.scpt, we can let FlexTime change its own sound as it runs. Everytime the activity starts, it plays a sound, and everytime it ends, it changes the sound to something different than it currently is.

Unfortunately FlexTime doesn’t expose the list of possible sounds through AppleScript. That’s another enhancement I’ll have to consider. But by hardcoding the list of possible sounds in the script, I’m able to choose a random one until I get something different than what’s already set. So you’ll never hear the same sound twice in a row.

Would it be nice if this was easier? Heck yeah. But the fact a random feature request happens to be addressable with AppleScript today is testament to the extensibility of FlexTime.

2 Responses to “FlexTime Random Sounds”

  1. Tim Altman Says:

    Sweet! Thank you!

  2. eBob Says:

    Funny. The very first program I wrote for OS X (10.0 or maybe even beta) was Random Sound. I find it still works, though the implementation is embarrassing and ancient. The code is posted where my name links.

Comments are closed.

Follow the Conversation

Stay up-to-date by subscribing to the Comments RSS Feed for this entry.