It's not easy by any stretch and would probably involve javascript because you'd have to analyse the frequency of the music.
If the music has a very strong repetitive beat, you may be able to use that as the basis for your vibration - if it is all over the place, you are looking at solutions like analysing the music externally and creating a data item which has the song rythym.