Movie file out save image sequence

Hi ! Im working with movie file out, trying to save a certain amount of image sequences from a patch following movement with a Kinect, my question is - Is there any python language that I can use to limit the number of pictures that are being saved on my computer and every time this limit around 20 images are saved the following 20 images can replace the other 20 and this way sequentially?
something like - every time the saver reaches 20 frames, restart the counting and replace the last 20 saved images

notes, for controlling the movie file out I’m using a timer, so everything in the patch is following the same timer for each change that is happening

Have a look at the attached .toe file:

  • Timer: counts up to 9999 seconds
  • Math: floors the seconds to an int
  • Limit: loops/wraps the timer-count back to 1 after 20
  • Text: feeds the increasing count to the movieoutTOP
  • Chopexec: pulses the add frame on valueChange
  • moviefileoutTOP: N-parameter gets its value from op(‘limit1’)[0] which will cause the cyclic overwrite of your images

If you start the .toe it will start creating 20 images next to your .toe-file that are updated/overwritten with the current timer value:

Hope this helps? :wink:

cyclicImgSequence.toe (5.3 KB)