Sure it is, Fun Jumps 2 does it.
You need an object that counts up by 1 for every beat so you need to find the bpm and then find the amount of frames per beat as lawatson said. Of course, this object should be persistent.
framesPerBeat = (framerate*60)/(BPM)
or
framesPerBeat = framerate/(/BPM/60)
I think.
I would recommend instead of setting it back to 0, just having it count up and use MOD to find the beat to move on. Then you can find any specific beat in the song and do stuff there. You should probably reset it to 0 when the song loops though.
With this method if you need every beat just MOD 1, every other beat MOD 2 and so on, like this:
if (beat mod 2 == 0) pulse=true;
Of course only check this once per beat, not once per frame.
if (beat!=previousbeat && beat mod 2 == 0){
pulse=true;
previousbeat=beat;
}
This will desync if you use show_message or in any way pause the game, change the music etc without regard for the beat timer. So remember to keep track of this.
There is probably a better way but I think this is more or less how I did it.