JavaScript library for FourBeat