Scheduler = function(audiolet, bpm) {
    PassThroughNode.call(this, audiolet, 1, 1);
    this.linkNumberOfOutputChannels(0, 0);
    this.bpm = bpm || 120;
    this.queue = new PriorityQueue(null, function(a, b) {
        return (a.time < b.time);
    });

    this.time = 0;
    this.beat = 0;
    this.beatInBar = 0;
    this.bar = 0;
    this.seconds = 0;
    this.beatsPerBar = 0;

    this.lastBeatTime = 0;
    this.beatLength = 60 / this.bpm * this.audiolet.device.sampleRate;
}
A sample-accurate scheduler built as an AudioletNode.  The scheduler works
by storing a queue of events, and running callback functions when the
correct sample is being processed.  All timing and events are handled in
beats, which are converted to sample positions using a master tempo.

**Inputs**

- Audio

**Outputs**

- Audio

@constructor
@extends PassThroughNode
@param {Audiolet} audiolet The audiolet object.
@param {Number} [bpm=120] Initial tempo.