loop-recorder
Buffers all streamed in trigger events and creates range loops on demand.
npm
Install via$ npm install loop-recorder
API
var LoopRecorder = var recorder =
LoopRecorder([retainThreshold=64])
Specify how many beats back in time to retain in buffer with retainThreshold
.
Returns an instance of LoopRecorder - a WritableStream.
recorder.write(event)
Accepts an input of events in the ditty v2 output format. Usually you would pipe in events from something like soundbank-trigger.
Stores each id
channel separately.
recorderrecorderrecorderrecorder
recorder.getLoop(id, from, length)
Specify the channel using id
. Choose the in point using from
and the out with length
.
Returns an array of [[position, length], [position, length], ...]
with position
relative to the chosen length
(event.position % length
).