Never mind GarageBand. Here's a drum machine that works in a web browser!
Roland's TR-808 is the legendary drum machine responsible for some of hip-hop and electronica's most recognizable sounds. Now it's emulated on an HTML5-based web site, along with other popular drum machines.
HTML5 Drum Machine operates in a web browser. I couldn't get it to work in Safari 8.0.5 on my Retina MacBook Pro running a beta version of 10.10.3, but Firefox worked just fine.
The site features not only the TR-808 but also Roland's TR-909, Elektron's Machinedrum, the LinnDrum and plain old acoustic drums too. Just choose the "Drum Kit Select" menu to cycle through the different options.
What's more, you can save samples and export loops in WAV format for use in your own projects.