I got it here
https://forum.audacityteam.org/t/pauken-add-silence-and-repeat-chunk/29659/2
I used the trim/extend plugin to make the versions with silence before, but I’d really like the other one to have the option to put the silence at the beginning because it dynamically sets the amount of silence it adds.
If I knew how to modify the plugin to optionally add the silence at the beginning of the file rather than the end, that would be really awesome. Right now, I have to set up different chains for different durations.
You wouldn’t know of a simple change in the plugin to change where the silence is added do you?
;nyquist plug-in
;version 1
;type process
;name "Pauken - add silence and repeat chunk"
;action "Pauken - add silence and repeat chunk"
;info "Pauken adds silence and multiplies a selected fragment.nIt helps when you learn foreign languages bynlistening and repeating phrases after a speaker.nnby Oleg Parashchenko, olpa@ http://uucode.com/nReleased under GPL v2n"
;control parameters factor-dur n-repeats
;control factor-dur "Silence duration factor" real "1=the same duration, 2=twice longer, etc" 2 0 5
; number of repeats
;control n-repeats "N of repeats" int "" 20 1 40
(defun pauken (sound)
(setq coeff-dur (1+ factor-dur))
(setq dur (* (get-duration 1) coeff-dur))
(setq chunks (cons
(s-rest (* coeff-dur n-repeats)) ; expected total duration
'()))
(dotimes (i n-repeats)
(setq chunks (cons
(at-abs (* i dur) (cue sound)) ; repeat at location
chunks)))
(apply #'sim chunks)
)
(multichan-expand #'pauken s)