Nick Fishman

  • Archive
  • RSS

Plink, a collaborative HTML5 music game

tulpinspiration:

Plink is a very original idea. It’s an online, collaborative, multiplayer music making toy made byDinahmoe. It uses Node.js and WebSockets to create an multi-user “chatroom” but instead of entering text to have a chat, the interface generates music!

Pulsating circles are generated by moving the mouse over a <canvas> element. Clicking and holding the mouse generates a musical tone. The colour of the circle determines the type of audio you play such as high or low notes, and is created using Google’s Web Audio JavaScript API. What a great combo of web technologies, and great fun too!

Check out a video of it in action: http://vimeo.com/26271666

There are some cool things going on here. On the client, they’re using the Web Audio API (available in recent versions of Chrome and Safari) to dynamically play sounds, and WebSockets to make the experience live and interactive. They’re using Node.js on the server.

It’s worth noting that the sounds all come from a pentatonic scale. This is why the music miraculously doesn’t sound cluttered or discordant, even when lots of people are playing. You’ve probably experienced something similar if you’ve ever tried playing just the black keys on a piano: no matter what order you play them, you just can’t go wrong.

Each instrument is sampled across 16 tones. Try some of them to hear what I mean:

  • http://labs.dinahmoe.com/plink/sounds/bziaou_11.ogg
  • http://labs.dinahmoe.com/plink/sounds/bziaou_12.ogg
  • http://labs.dinahmoe.com/plink/sounds/bziaou_13.ogg
  • http://labs.dinahmoe.com/plink/sounds/bziaou_14.ogg
  • http://labs.dinahmoe.com/plink/sounds/bziaou_15.ogg
  • http://labs.dinahmoe.com/plink/sounds/bziaou_16.ogg

On a tech note, the client code isn’t the cleanest thing in the world. It would be easier to read (and maintain) if it used Socket.IO instead of raw WebSockets, and if it used jQuery or some other JavaScript library to manipulate the DOM.

Still, a very innovative use of the Web Audio API and quite fun to play with.

    • #music
    • #nodejs
    • #socket.io
    • #tech
    • #websockets
    • #javascript
  • 1 year ago > tulpinspiration
  • 3
  • Comments
  • Permalink
Share

Short URL

TwitterFacebookPinterestGoogle+

3 Notes/ Hide

  1. nickfishman reblogged this from tulpinspiration and added:
    video of it in action: http://vimeo.com/26271666 There are some cool things going on here. On the client, they’re using...
  2. tulpinspiration posted this

Recent comments

Blog comments powered by Disqus
← Previous • Next →

Nick Fishman

Portrait/Logo

About

I'm a software engineer and entrepreneur. I like to solve high-impact problems with technology. I'm also the CTO and co-founder of sonicpanther.
Follow @nickfishman

Social

  • @nickfishman on Twitter
  • Google
  • Linkedin Profile
  • nickfishman on github
  • RSS
  • Random
  • Archive
  • Mobile

© 2013 Nick Fishman. All rights reserved..

Effector Theme by Pixel Union