A nice idea to use SND-COMPOSE with QUANTIZE.
A slightly modified version in one line - I think the modern expression is “fugly”
(setq factor 4)
(multichan-expand #'snd-compose s (mult (/ *sound-srate*)(quantize (snd-pwl 0 *sound-srate* (list (truncate (* len factor)) len (truncate (* len factor)))) 1)))
Perhaps the most “elegant” solution I’ve found:
(setq factor 4)
(control-srate-abs *sound-srate*
(let ((sig2 (mult (/ *sound-srate*)
(quantize (pwl factor len factor) 1))))
(multichan-expand #'snd-compose s sig2)))
I’m not sure about “officializing” it but here’s a plug-in. I’ve called the effect “Repeat Samples…”
RepeatSamples.ny (621 Bytes)