pulse is a small node.js server and client that pipes MIDI Clock messages to your browser through a WebSocket. It also interpolates the bpm and current phase. This means you pick up the beat from a drumcomputer, a DAW or DJ software, and use this information to sync up all sorts of cool stuff in a browser!
Grab the code from GitHub. To run the server you'll need node.js using midi and socket.io. The client is pure JavaScript.
pulse.connect('http://yourserver:9000');
This will sync up pulse to the MIDI Clock provided by the server. You have a number of ways to use this information:
pulse.bpmpulse.beat()pulse.pulse()You want to see it in action, don't you? Well, if you are running the server, connect to it below. Oh, you're not? You can just tap a beat to see the time tracking in action. Check out the source code to this page to see how the data provided by pulse is used to animate the page. Everything is on GitHub.