The last time I coded something along these lines was way back in the day for pulsing the Amiga's power/disk drive LEDs in time to music and sound effects, instead of their usual on/off/half brightness states. Not quite so useful, but I remember having fun coding it :D I was surprised at just how effective it was, without any noticeable flicker.