Can somebody please convert the following macro to a clean Nyquist only script?

NyquistPrompt:Command="(setf repeats 10000)  ; Number of repeats\n(setf delay 0.0001)\n\n(defun normalize (sig)\n  (setf max-samples 100000000)\n  (if (soundp sig)\n      (setf factor (/ 1.0 (peak sig max-samples)))\n      (setf factor (vector (/ 1.0 (peak (aref sig 0) max-samples))\n                           (/ 1.0 (peak (aref sig 1) max-samples)))))\n  (mult sig factor))\n\n(defun make-impulse ()\n  (setf impulse-array (make-array (truncate (* *sound-srate* delay))))\n  (dotimes (i (length impulse-array))\n    (setf (aref impulse-array i) 0))\n  (setf (aref impulse-array 0) 1)\n  (snd-from-array 0 *sound-srate* impulse-array))\n\n(defun do-repeats (sig impulse)\n  (let* ((convolved (convolve sig impulse))\n         (tail (extract 1 2 convolved)))\n    (extract 0 1 (sim convolved tail))))\n\n(defun process ()\n  (let ((impulse-train (seqrep (i repeats) (cue (make-impulse)))))\n    (setf repeated (multichan-expand #'do-repeats *track* impulse-train))\n    (normalize repeated)))\n\n\n(process)"
Amplify:Ratio="0.0079432823"
NyquistPrompt:Command="(setf repeats 10000)  ; Number of repeats\n(setf delay 0.0001)\n\n(defun normalize (sig)\n  (setf max-samples 100000000)\n  (if (soundp sig)\n      (setf factor (/ 1.0 (peak sig max-samples)))\n      (setf factor (vector (/ 1.0 (peak (aref sig 0) max-samples))\n                           (/ 1.0 (peak (aref sig 1) max-samples)))))\n  (mult sig factor))\n\n(defun make-impulse ()\n  (setf impulse-array (make-array (truncate (* *sound-srate* delay))))\n  (dotimes (i (length impulse-array))\n    (setf (aref impulse-array i) 0))\n  (setf (aref impulse-array 0) 1)\n  (snd-from-array 0 *sound-srate* impulse-array))\n\n(defun do-repeats (sig impulse)\n  (let* ((convolved (convolve sig impulse))\n         (tail (extract 1 2 convolved)))\n    (extract 0 1 (sim convolved tail))))\n\n(defun process ()\n  (let ((impulse-train (seqrep (i repeats) (cue (make-impulse)))))\n    (setf repeated (multichan-expand #'do-repeats *track* impulse-train))\n    (normalize repeated)))\n\n\n(process)"
Amplify:Ratio="0.0079432823"
NyquistPrompt:Command="(setf repeats 10000)  ; Number of repeats\n(setf delay 0.0001)\n\n(defun normalize (sig)\n  (setf max-samples 100000000)\n  (if (soundp sig)\n      (setf factor (/ 1.0 (peak sig max-samples)))\n      (setf factor (vector (/ 1.0 (peak (aref sig 0) max-samples))\n                           (/ 1.0 (peak (aref sig 1) max-samples)))))\n  (mult sig factor))\n\n(defun make-impulse ()\n  (setf impulse-array (make-array (truncate (* *sound-srate* delay))))\n  (dotimes (i (length impulse-array))\n    (setf (aref impulse-array i) 0))\n  (setf (aref impulse-array 0) 1)\n  (snd-from-array 0 *sound-srate* impulse-array))\n\n(defun do-repeats (sig impulse)\n  (let* ((convolved (convolve sig impulse))\n         (tail (extract 1 2 convolved)))\n    (extract 0 1 (sim convolved tail))))\n\n(defun process ()\n  (let ((impulse-train (seqrep (i repeats) (cue (make-impulse)))))\n    (setf repeated (multichan-expand #'do-repeats *track* impulse-train))\n    (normalize repeated)))\n\n\n(process)"
Amplify:Ratio="0.0079432823"
NyquistPrompt:Command="(setf repeats 10000)  ; Number of repeats\n(setf delay 0.0001)\n\n(defun normalize (sig)\n  (setf max-samples 100000000)\n  (if (soundp sig)\n      (setf factor (/ 1.0 (peak sig max-samples)))\n      (setf factor (vector (/ 1.0 (peak (aref sig 0) max-samples))\n                           (/ 1.0 (peak (aref sig 1) max-samples)))))\n  (mult sig factor))\n\n(defun make-impulse ()\n  (setf impulse-array (make-array (truncate (* *sound-srate* delay))))\n  (dotimes (i (length impulse-array))\n    (setf (aref impulse-array i) 0))\n  (setf (aref impulse-array 0) 1)\n  (snd-from-array 0 *sound-srate* impulse-array))\n\n(defun do-repeats (sig impulse)\n  (let* ((convolved (convolve sig impulse))\n         (tail (extract 1 2 convolved)))\n    (extract 0 1 (sim convolved tail))))\n\n(defun process ()\n  (let ((impulse-train (seqrep (i repeats) (cue (make-impulse)))))\n    (setf repeated (multichan-expand #'do-repeats *track* impulse-train))\n    (normalize repeated)))\n\n\n(process)"
Amplify:Ratio="0.0079432823"
NyquistPrompt:Command="(setf repeats 10000)  ; Number of repeats\n(setf delay 0.0001)\n\n(defun normalize (sig)\n  (setf max-samples 100000000)\n  (if (soundp sig)\n      (setf factor (/ 1.0 (peak sig max-samples)))\n      (setf factor (vector (/ 1.0 (peak (aref sig 0) max-samples))\n                           (/ 1.0 (peak (aref sig 1) max-samples)))))\n  (mult sig factor))\n\n(defun make-impulse ()\n  (setf impulse-array (make-array (truncate (* *sound-srate* delay))))\n  (dotimes (i (length impulse-array))\n    (setf (aref impulse-array i) 0))\n  (setf (aref impulse-array 0) 1)\n  (snd-from-array 0 *sound-srate* impulse-array))\n\n(defun do-repeats (sig impulse)\n  (let* ((convolved (convolve sig impulse))\n         (tail (extract 1 2 convolved)))\n    (extract 0 1 (sim convolved tail))))\n\n(defun process ()\n  (let ((impulse-train (seqrep (i repeats) (cue (make-impulse)))))\n    (setf repeated (multichan-expand #'do-repeats *track* impulse-train))\n    (normalize repeated)))\n\n\n(process)"
Amplify:Ratio="0.79432823"

I am on an Arch Linux PC, running the Appimage version 3.7.6 of Audacity.

Many thanks,
Bryan