This will give you 1000 repeats. It is too slow for 100000 repeats.
If you test this with a short, audible speech recording, you may be surprised by what it sounds like.
I’ve not tested with long tracks, but it works for me with a 4 minute track.
(setf repeats 1000) ; Number of repeats
(defun normalize (sig)
(setf max-samples 1000000)
(mult sig (/ 1.0 (peak sig max-samples))))
(defun do-repeats (sig n)
(let ((s (mult (/ (sqrt (float n))) sig))
(out (s-rest 1)))
(dotimes (i n)
(setf out (sim out
(at-abs (* i 0.001) (cue s)))))
;; If normalization is required
; (setf out (normalize out))
out))
(multichan-expand #'do-repeats *track* repeats)