p5.gibber

I’ve done a little bit of work making sure Gibber can play nice with p5.js. Mostly refactoring Gibber.lib and then wrapping it to support both the global and “instance mode” styles of programming found in p5.

Examples:

Download examples and library to play with.

Below is the first example listed, a completesketch.js file that starts a drum loop playing and changes the background color based on current amplitude.

function setup() {
  createCanvas( windowWidth, windowHeight )

  drums = EDrums('x*o*x*o-')
  follow = Follow( drums )
}

function draw() {
  background( follow.getValue() * 255 )
}

You can also find p5.gibber.js on github and on npm.

Note that Gibber’s manual was written for the coding environment, not this standalone library. However, all the audio code in chapters 3 and 4 and all code in chapters 5-7 will still work with the standalone library. One note is that currently the Drums object (which uses samples) is not supported in the library; use the EDrums object (which uses synthesis) instead.