Working with samples

you can easily achieve that by multiplying by an absolute square wave at frequency 1/1000 samples, it will reach 0 every 1000 samples and the rest of the time will be 1 or some factor. Anyway I’m here just to know how to work at the slice level.