Dear List,
Lasse Scherffig and me have made a small change to the pix_buffer in GEM. With the message cyclic 1/0, you get a cyclic behavior of the buffer. Maybe it is worth considering to include.
You find the sources and a testpatch here http://www-lehre.inf.uos.de/~lscherff/pdstuff/cyc_pix_buffer.zip.
Cheers,
Florian Grond
Florian Grond wrote:
Dear List,
Lasse Scherffig and me have made a small change to the pix_buffer in GEM. With the message cyclic 1/0, you get a cyclic behavior of the buffer. Maybe it is worth considering to include.
hi. thanks for the input.
however i don't like the idea very much of setting the whole pix_buffer into a "cyclic" mode, just to make [pix_buffer_read] read out the buffer cyclically. what if you want 1 [pix_buffer_read] to loop through the buffer and another one to read the same buffer in the "old fashioned" way ?
furthermore, your proposal does 2 things at the same time, which are not necessarily related: + turn the pix_buffer into a cyclic buffer + automatically increment the currentFrame-index
the solution i prefer (as attached), basically just modifies [pix_buffer_read] to read a buffer cyclically or not, so you can modify the behaviour on a per-reader basis.
there are 2 new messages to [pix_buffer_read]: [loop 1/0( to turn on/off cyclic buffer, and [auto <f>( to give a (floating-point) increment, so you read out the cyclic buffer at variable speed.
i haven't done so with the [pix_buffer_write] yet (because your example-patch showed that there was no actual need for this...)
mfg.a.sdr IOhannes
PS: i will check this into the CVS, but with a major modification: put [pix_buffer_read] and [pix_buffer_write] into separate cpp-files