Skip to content

Repository files navigation

waves-masters

Low level components for transport and scheduling

note: while implemented toward WebAudio applications, waves-masters components can be used in any contexts as they can use arbitrary clocks.

Documentation

http://wavesjs.github.io/waves-masters/

Installation

npm install [--save] waves-masters

Usage

// explicit default exportimportmastersfrom'waves-masters';// or named exportsimport{Scheduler}from'waves-masters';// create the scheduler with an arbitrary clockconstgetTime=()=>newDate().getTime();constscheduler=newScheduler(getTime);// create a time engine that will log the scheduled time every secondconstengine={period: 1,advanceTime(time){console.log(time);returntime+this.period;}}// add egine to schedulerconststartTime=Math.ceil(getTime());scheduler.add(engine,startTime);

Available Components

core

  • PriorityQueue
  • SchedulingQueue
  • TimeEngine

masters

  • PlayControl
  • SimpleScheduler
  • Scheduler
  • Transport

Credits

This library has been initiated (formerly in the context of the waves-audio library) in the framework of the WAVE (ANR-12-CORD-0027) and CoSiMa (ANR-13-CORD-0010) research projects, funded by the French National Research Agency (ANR).

License

BSD-3-Clause

Releases

Packages

Used by

Contributors

Languages