I was listening to Survivor - "Eye of the Tiger" and writing some documentation in Vim and noticed that the cursor not flashing to the beat started to annoy me. Can this be fixed?

I'm using Terminator and bash.

  • 21
    What a delightfully horrible idea, +1 :).
    – terdon
    Jan 16, 2013 at 17:46
  • 4
    What would be hardest I suspect is programmatically determining what the "beat" of the song is.
    – K.A.Monica
    Jan 16, 2013 at 17:58
  • 12
    I need clarification on this question. @StephenMartin, do you want the beats to be just the monotonic "duh, duh, duh, duh, duh" implied in the melody? Or do you want it to be the irregular "DUNT! duh, duh, DUNT! duh, duh DUNT! dun dun duuuuuuuuuh"? Or do you want the pizzicato tympani beats as in "tztztztztztztztz"? Also, we need a way to indicate beat intensity in Terminator with variable blink brightness or something if you want the irregular beats. Jan 16, 2013 at 21:18
  • 3
    While you're at it, I want the cursor color to change appropiate to the lyrics when I'm playing Jimi's Bold As Love.
    – ott--
    Jan 16, 2013 at 21:38
  • 2
    @allquixotic I see it flashing every half beat for the duna duna duna intro, but staying on for the power chord hits. Then when it hits the the main beat hitting on the regular bpm but again pausing in the on position for the power chords.
    – squareborg
    Jan 16, 2013 at 21:48

3 Answers 3


Check out my Rhythmbox plugin, rbpitch for changing the pitch/tempo/speed of the playing song. I know it's a hack, and you'll have to manually work out the correct tempo to set to get it to flash in sync with your cursor, but for this extremely important and practical task, I thought it would be important to give you a temporary workaround until someone figures out how to work a gstreamer pipeline using the beat detection plugin into bash or whatever virtual terminal you're using.

You know, now that you mention it, doing this wouldn't be all that extremely hard, and I could probably code it up in about a day using SoundTouch's BPMDetect class.

Stop giving me ideas for how to look busy coding while actually wasting time.

  • 11
    Dude,Im glad you acknoledge the importance of this question. I will try your workaround as a temporary messure but feel that the cursor should adjust to the tempo of the track. I dont care if it only matches for this one track as its the only track I own and I listen to it constantly on a loop.
    – squareborg
    Jan 16, 2013 at 20:34
trap 'tput cnorm' EXIT
states=("$(tput civis)" "$(tput cnorm)")
while :; do
    printf %s "${states[state=!state]}"
    sleep .1

Music synchronization an exercise for reader.


Beat detection is a task in the field of Music information retrieval. Usually vocals are stripped, the arrangement is classified in ~7 frequency buckets to create a key, the arrangement is discretised in those and local maxima are denoted as beat locations. The resulting sequence is smoothed to get a rythm with constant frequency.

From there on your question is no longer an open research question but a purely technical one about bash or vim or X or whoever draws the cursor.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .