Script Roundup: jWebAudio, Scrolling Component

2013-10-29 00:00:00 +0000 by Alex R. Young
Note: You can send your scripts and articles in for review through our contact form.


jWebAudio (GitHub: 01org / jWebAudio, License: Apache 2.0) by Wenli Zhang and published by Intel's Open Source Technology Center is an audio library focused on games:

Web Audio seeks to process and synthesize audio in web applications. jWebAudio keeps the technical details of Web Audio under the hood and makes it easier to control your audio.

It has a jQuery API and also a framework-agnostic JavaScript API. Playing a set of sounds looks like this:

$('.sound').each(function() {
  var $this = $(this);
  var url = $this.data('sound');
  $(this).jWebAudio('addSoundSource', {
    url: url,
    preLoad: true,
    callback: function() {

jWebAudio also supports synthesis and effects:

Sound effects include telephonize and cathedral currently. And you may create new sound effects using the combination of LOWPASS, HIGHPASS, BANDPASS, LOWSHELF, HIGHSHELF, PEAKING, NOTCH, ALLPASS.

There's a demo here: jWebAudio demo.

Wenli also writes about JavaScript. Here's a post about the gruesome details of Number, parseFloat, and parseInt: Converting To Numbers In JavaScript.

Scrolling.js Component

Guille Paz sent in Scrolling.js Component (GitHub: pazguille / scrolling, License: MIT, component: pazguille/scrolling). It allows you to decouple scrolling from callbacks to avoid generating too many scroll events (the old debouncing issue):

var scrolling = require('scrolling');

scrolling(document.querySelector('#box'), callback);

The project is distributed as a component, and has a demo on the homepage.