beat-sequencer

1.0.1 • Public • Published

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();

Readme

Keywords

none

Package Sidebar

Install

npm i beat-sequencer

Weekly Downloads

5

Version

1.0.1

License

none

Unpacked Size

14.5 kB

Total Files

5

Last publish

Collaborators

  • bdgrace