Logger:
Filter:
sc3-plugins/Classes (extension) | UGens > Buffer

Logger
ExtensionExtension

Store values to a buffer, whenever triggered

Description

Writes a series of (control-rate) values to a Buffer, storing them strictly sequentially. Whenever trig crosses from non-positive to positive, the current value of the input will be written to the buffer. Storage starts at the buffer beginning and increments the write position until the buffer is full. If reset crosses from non-positive to positive, then the buffer will be zero'ed (all values set to zero) and the next write will begin again at the first entry.

in can be an array - it should be of the same size as the number of channels in the buffer.

NB: Logger zeroes the buffer upon first instantiation, to ensure that out-of-date data is not confused with new data. So it will definitely clobber any data you may have had in the buffer before it runs. It makes no sense to use multiple instances of Logger on the same buffer, since data will be overwritten.

Output is 1 in normal operation, then changes to 0 if triggers are received but there's no more space in the Buffer. (Flips back to 1 if you reset it.)

Examples