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.
http://wavesjs.github.io/waves-masters/
npm install [--save] waves-masters
// explicit default export import masters from 'waves-masters'; // or named exports import { Scheduler } from 'waves-masters'; // create the scheduler with an arbitrary clock const getTime = () => new Date().getTime(); const scheduler = new Scheduler(getTime); // create a time engine that will log the scheduled time every second const engine = { period: 1, advanceTime(time) { console.log(time); return time + this.period; } } // add egine to scheduler const startTime = Math.ceil(getTime()); scheduler.add(engine, startTime);
PriorityQueueSchedulingQueueTimeEngine
PlayControlSimpleSchedulerSchedulerTransport
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).