PanHandler - a Tone.js plugin

For my midterm I developed PanHandler, a Tone.js plugin that pans an arbitrary number of inputs in interesting, random ways. To showcase its abilities I built a simple visualization which can be controlled with the keyboard.

I love music that takes advantage of aural space so I wanted to create a utensil for panning multiple inputs at the same time. PanHandler has two main functions that handle panning:

  • shuffle() - randomizes the pans across the aural space (e.g. a random value between 0 and 1)
  • flip() - reverses the pans and their respective magnitudes across the aural space (e.g. 0.9 becomes 0.1, 0.6 becomes 0.4, etc.)
Additionally, each of these methods can take an argument specifying the time to ramp the pan (e.g. shuffle(1) would randomize the pans of all of the inputs over 1 second).

In order to visualize the inputs moving across the aural space, I created grayscale bars for each one (in the demo there are four inputs, so there are four bars). These represent each distinct sound/note. As you use PanHandler to manipulate the pans, you can simultaneously see and hear the movement of the sound.

PanHandler code: GitHub

No comments:

Post a Comment

Speak now...