How to make plugin for Audacity?

I can not currently find a starting point. I want to make a plugin which will do a bunch of random speed-ups and speed-downs on each song, within -20% and +40% speed, changing speed every 5 to 20 seconds.

Reference for making a plugin like this would be useful,


First you must decide if you make a VST, LADSPA, LV2, Audio Unit or Nyquist plug-in.

You will only find help with Nyquist plug-ins here.

For affecting one project at a time, you can use Audacity’s built-in Time Tracks instead of making a plug-in.

Or you can try Turntable Warping v3 which is a Nyquist plug-in. Therefore you can use that plug-in in a Chain and apply it to multiple files.


For Nyquist plug-ins, see here: Missing features - Audacity Support

Other useful references for Nyquist plug-ins are listed here: Manuals and reference material

As a starting point, try this code in the Nyquist Prompt on a reasonably short mono track. For testing purposes it changes the speed every 3 seconds:

 (defun rand3 ()
  (+ 1 (* 0.25 (1- (* 2 (rrandom))))))

(setf result (s-rest 0))
(setq start 0)
(setq n (truncate (get-duration (/ 3.0))))
(dotimes (i n result)
  (setq randx (rand3))
  (setf a (extract-abs (* i 3) (* (1+ i) 3)(snd-copy s)))
  (setf result 
    (sim result
      (at-abs start (cue 
         (force-srate *sound-srate* (stretch-abs randx (sound a)))))))
  (setq start (max 0 (+ start (* 3 randx)))))

Note that this code runs in RAM and requires that the sound is loaded into RAM, so for long tracks you may need to process in sections.

Thanks for the response guys.

@Gale, Time tracks is great
@steve, thanks for the reference, however in the Nyquist prompt I’m only getting a return value for that code (I must be using it wrong), I’ll look into it later

Thanks guys.

It works for me. Are you sure it’s a mono track?


Ohh, I see. I got it working, thanks!

I guess I have added my first Nyquist plug-ins now :slight_smile:
This is perfect for making old songs sound fresh, with just a single effect.
Nyquist seems quite powerful and handy. Entire songs can be totally revamped wholesale using Nyquist without lifting a finger… holy crap.
I had no idea Audacity had this level of audacity. This is insane.

All the algorithm possibilities of revamping songs… it’s like touchless auto-remixing