audiolib.js scheduling API

Hello all!

Some of you may have noticed that I've been working on a fast pace with
audiolib.js lately, and I thought I'd point out and share an interesting new
API I've just implemented to it.

It's called Scheduling, and what it basically means is that you can schedule
events to happen attached to a certain frame position, allowing for
synchronization between UI controls and the audio processing. For instance,
when the user would turn oscillator pulse width knob, you would call the
schedule function with a callback that changes the oscillator's pulse width
value.

This API offers a more seamless data interchange between the UI and the
processing, reducing audible steps and so, however it also introduces a
rather major performance hit, so for now, the API is only experimental and
can be called explicitly via audiolib.AudioDevice.createScheduled(). If
anyone were to try the new API out I would love to hear some feedback and if
you have ideas on how to reduce the performance hit, I'd appreciate it!

Here are some links to hear the difference between the scheduled and
non-scheduled APIs, the demo is kinda like a theremin, mouseX defines pulse
width, mouseY pitch:

http://niiden.com/audiolib.js/tests/scheduling.html

http://niiden.com/audiolib.js/tests/nonscheduling.html

The code is on github:
https://github.com/jussi-kalliokoski/audiolib.js

Jussi

Received on Thursday, 19 May 2011 17:07:53 UTC