Hello,
So I decided for the very first time to take a go at programming a Nyquist plugin. Because there isn’t a plugin to slide the speed from one percentage to another, I thought I could write a plugin for this. However, I’m sure it doesn’t work, so I would really like your feedback as far as the format of the plugin and especially where to put what. I have only read a bit of the Nyquist manual because to me, it seems rather complicated, but I’ve tried all I could, along with my college classmate friend Brianna “Bri” (who is also really really good at camera and visual stuff), to see if I could possibly get this plugin off the ground. Here’s what we came up with so far. Note that we used the Tremolo Vibrato plugin and the Turntable Warp plugin as a baseline. Maybe the only solution is to start from pure scratch?
Slide.ny
;nyquist plug-in
;version 3
;type process
;name “Slide…”
;action “Sliding.”
;info “by Michael Kazmierski and Bri Yaroch.\nSlides from one speed to another, as in the Doppler effect or a machine turning off or on.”
;; Slide.ny - version 3 plug-in (requires Audacity 1.3 or later)
;; by Michael Kazmierski and Bri Yaroch, December 2016
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
;control idev “Initial deviation (percent)” real “%” -100 6400 0
;control fdev “Final deviation (percent)” real “%” -100 6400 0
;; Slide function
(setf dur (/ len sound-srate)) (defun slide (s-in idev fdev)
(let* ((bend (mult (env (pwlv idev 1 fdev)))
;; map to sound-time
(map (integrate (db-to-linear bend))) (snd-compose snd (force-srate sound-srate map))))
;;compensate for 95% normalizing and compose signal
(mult (/ 0.95) (snd-resamplev s-in sound-srate map))))
;; Function to generate sweep (defun sweep (idev fdev)
(mult -0.5 (sum 1.0 (env (pwlv idev 1.0 fdev))))
;; error checking
(setq idev
(/ (sanitise idev -20000 20000) 100.0)(/ (sanitise idev -20000 20000) 100.0)))
(setq fdev
(/ (sanitise fdev -20000 20000) 100.0)(/ (sanitise fdev -20000 20000) 100.0)))
(if (or (> idev 20000)(> fdev 20000))
(setq err “Maximum deviation is 20000 %”)
(progn
(setq idev (sanitise idev -20000 20000))
(setq fdev (sanitise fdev -20000 20000))))
(if (> (length err) 0)
(format nil “Error.~%~a” err)
(case type
(0 (multichan-expand #’ slide s idev fdev))
(1 ))))
I’m pretty sure it does not work, so again, any feedback is greatly appreciated. I’m aware of others who want a plugin like this one. My guess is that it’s way more complicated than this, but I figured I’d just try first.
Michael