Moving buffer
[streaming/Moving buffer]
Stores the last N inputs received via sample
and sends them via buffer
.
Errors on invalid size
.
Data sent via buffer
is immutable.
Example:
size
set to 2"A"@0 received via
sample
["A"] sent via
buffer
"B"@1 received via
sample
["A","B"] sent via
buffer
"C"@2 received via
sample
["B", "C"] sent via
buffer
Keywords: buffer, overflow, stream, rotate, window
Input ports
sample:
any
Receives individual samples to be buffered.
size:
number
Specifies the maximum number of samples stored in the buffer. Must be parameter.
Output ports
buffer:
any[]
Sends current contents of moving buffer.
error:
{"message": string}
Sends error when:
size is equal or less than 0 or not set
bounced:
any
Forwards input received via
sample
on error.
Last updated