Nyquist Prompt


I have just installed Audacity on my new laptop (Windows 10) and would like to use an old Nyquist Prompt that the Audacity Helpdesk made me in around 2015. The code puts space in the audio so that when I am transcribing, I don’t have to stop and rewind each time I miss a bit. It allows me to change the pace as I go, depending on if I am fresh or fatigued - its a great code :smiley:

I have imported the audio file and can hear the recording. Previously I went to effect clicked on Nyquist, pasted the code in and pressed ok and the code put the spaces in the audio. Now the Nyquist Prompt is in the Tools tab and I have copied the code into the comand box, but nothing happens??

Can you help??


The code is below:

(setq sec-audio 10) ; number of seconds of audio
(setq sec-silence 10) ; number of seconds of silence
(setq overlap 4) ; number of seconds overlap

(defun spread (sig adur sildur olap)
(let* ((dur (get-duration 1))
(sections (/ (- dur olap) adur))
(audiolen (+ (* (- sections 2)(+ adur olap))(* 2 adur)))
(sillen (* (1- sections) sildur))
(new-dur (+ audiolen sillen)))
(do ((new-s (abs-env (s-rest new-dur)))
(pos 0 (+ pos adur olap sildur))
(start 0 (+ start adur))
(end (+ adur olap) (+ end adur)))
((>= start dur) new-s)
(setf new-s
(sim new-s
(at-abs pos (cue (extract-abs start end sig))))))))

(multichan-expand #'spread s
(float (- sec-audio overlap))
(float sec-silence)
(float overlap))

That looks like very old code, so I think you will need to select the “Use legacy (version 3) syntax” option in the Nyquist Prompt.

Hi Steve,

Thank you, yes that worked perfectly!