Incompatible Plugin

I found this plugin, it changes the tempo of a selection to lengthen or shorten it. Then I did some modification, removing the input box, and fixing the target length to original_length + 0.1, it works in Nyquist Prompt, but when I tried to install it, there was an compatibility issue. How can I solve this? Thanks a lot for any help.

Code

;nyquist plug-in
;version 5
;type tool
;name "Increase Silence Duration"

;; Original project: https://audionyq.com/stretching-audio-to-length/
;; Adjusts the length of a track to a specified length

(aud-import-commands)

(defun get-selected-length ()
  (let ((start (get '*selection* 'start))
        (end (get '*selection* 'end)))
    (- end start)))

(defun change-tempo ()
  (let ((trk-len (get-selected-length)))
  (setf TARGET-LEN (+ trk-len 0.1))
    (if (<= TARGET-LEN 0)
        (throw 'err "Error.\nTarget length too short."))
    (setf percent (* 100 (/ (- trk-len TARGET-LEN) TARGET-LEN)))
    (aud-ChangeTempo :percentage percent))
    "")

(change-tempo)

Error message
image

The latest version for Nyquist plug-ins is version 4. More info here: Nyquist Plug-in Headers - Audacity Wiki

Oh, that’s awesome, thank you, you just saved my life!

This topic was automatically closed after 30 days. New replies are no longer allowed.