how to slice a video using jit.gen ?

Julien Bayle's icon

Hi there,
I'd like to cut a video into bands (horizontally)
The purpose is : slice the vid and move the slices horizontally considering some other data coming from outside max.
I know how to do that using jit.scissors, jit.concatenate and play with offset.

Because it talks about sampling in Gen, I'm a bit weak. I didn't play a lot with that.

Anyone would help me here?
I'd like to be able to set dynamic number of slices, especially.

Graham Wakefield's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Here's a starting point. It offsets each slice by some multiple of the slice number.