I managed to find this code;
;nyquist plug-in
;version 1
;type process
;name "Reverso..."
;action "Processing..."
;info "by Steve Daulton (http://easyspacepro.com). Released under GPL v2.\n"
;; reverso.ny by Steve Daulton June 2011
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
;control clipsec "Section Length (seconds)" real "" 0.75 0.1 2
;; 'Window' envelope to cross-fade sound clips
(defun win (dur)
(let ((step (hz-to-step(/ 2.0 dur))))
(abs-env
(mult 0.5 (sim 1
(at 0 (cue
(osc step (/ dur 4.0) *sine-table* -90)))
(at (/ dur 4.0)
(cue (control-srate-abs *sound-srate* (const 1 (/ dur 2.0)))))
(at (* dur 0.75)(cue
(osc step (/ dur 4.0) *sine-table* 90))))))))
(defun reverso (s-in cl)
(do* ((maxcount (truncate (/ len (* 0.75 cl))))
(lastbit (truncate (- len (* maxcount (* 0.75 cl)))))
(hcl (round (* cl 0.75)))
(temparray
(snd-fetch-array s-in cl hcl)
(if (< count (1- maxcount))
(setq temparray (snd-fetch-array s-in cl hcl))
(setq temparray (snd-fetch-array s-in lastbit hcl))))
(temp2 (make-array cl))
(tempsound (s-rest 0))
(newsound (s-rest 0))
(count 0 (setq count (1+ count))))
((not temparray) newsound)
(if (= count maxcount)
(progn
(setf temp2 (make-array lastbit))
(setq cl lastbit)))
(dotimes (i cl)
(setf (aref temp2 i)(aref temparray (- cl i 1))))
(setf tempsound (snd-from-array 0 *sound-srate* temp2))
(setf newsound (sim
(at-abs 0 (cue newsound))
(at-abs (* count (* clipsec 0.75))(cue (mult tempsound (win clipsec))))))))
(cond
((< clipsec 0.1)
(format nil "Error.\nSection Length must be at least 0.1 seconds."))
((> clipsec (get-duration 1))
(format nil "Error.\nSection Length is set longer than the selected audio."))
(T
(setq cliplen (truncate (* clipsec *sound-srate*))) ; clip length in samples
(multichan-expand #' reverso s cliplen)))
I was trying to set the value from “0.75” to “get-duration” so it selects all of the selected (or all of the audio), with no luck. It does nothing when I try, but the reason I want to reverse the audio like this is so I can combine a speed effect and make a “Fix rewinding” effect, correcting fast and backward to normal and forward (manually adjust speed to a slower speed and reverse to do so). Could you give me some info on how to select the entire audio clip and reverse it in NY using the required code? Instead of a few seconds of reverse, I want to change that few seconds to the duration of the selection or the entire clip.
Please, Help? Thank you.