beat-sequencer
v1.0.1
Published
Downloads
2
Readme
Beat Sequencer
const beat = beatSequencer({
vent: true
// if the beat is somehow stopped,
// vent skipped events
});
const child_process = require('child_process');
beat.at(1, () => {
child_process.execSync("sleep 3");
console.log(1, new Date());
});
beat.at(2, (skipped) => {
console.log("skipped", skipped);
console.log(2, new Date());
});
beat.at(3, () => {
console.log(3, new Date());
});
beat.at(5, () => {
console.log(5, new Date());
});
beat.at(8, () => {
console.log(8, new Date());
});
beat.at(9, () => {
console.log(9, new Date());
});
console.log(new Date());
beat.start();