sloop

0.1.0 • Public • Published
npm install sloop

loop over a selected portion of a buffer now supports Typed Arrays

    var Sampler = require('./sloop')
 
    var buf = new Buffer('beepboopbaapboom')
    , start = 0 // buf index to start
    , size = 4 // size of each sample by index count (bytes, for buffers;  indecies for TAs (usually 1))
    , duration = 4 // length of the loop in the above size value
    ;
    
    sample = Sampler(buf, start, duration, size)
    
    var t = setInterval(
      function(){
      console.log(sample().toString())
    }, 333)

Readme

Keywords

Package Sidebar

Install

npm i sloop

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

2.65 kB

Total Files

5

Last publish

Collaborators

  • johnnyscript