Page 1 of 1

How to make plugin for Audacity?

Posted: Wed Jul 09, 2014 6:18 am
by spicyfajita
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,

Thanks.
Spicyfajita

Re: How to make plugin for Audacity?

Posted: Wed Jul 09, 2014 10:22 am
by Gale Andrews
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.


Gale

Re: How to make plugin for Audacity?

Posted: Wed Jul 09, 2014 11:21 am
by steve
spicyfajita wrote:Reference for making a plugin like this would be useful,
For Nyquist plug-ins, see here: http://wiki.audacityteam.org/wiki/Nyqui ... _Reference

Other useful references for Nyquist plug-ins are listed here: http://forum.audacityteam.org/viewtopic ... 39&t=77214

Re: How to make plugin for Audacity?

Posted: Wed Jul 09, 2014 12:15 pm
by steve
spicyfajita wrote: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.
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:

Code: Select all

 (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.

Re: How to make plugin for Audacity?

Posted: Thu Jul 10, 2014 8:49 am
by spicyfajita
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.

Re: How to make plugin for Audacity?

Posted: Thu Jul 10, 2014 11:02 am
by Gale Andrews
spicyfajita wrote:in the Nyquist prompt I'm only getting a return value for that code (I must be using it wrong)
It works for me. Are you sure it's a mono track?

Gale

Re: How to make plugin for Audacity?

Posted: Fri Jul 11, 2014 5:50 am
by spicyfajita
Ohh, I see. I got it working, thanks!

I guess I have added my first Nyquist plug-ins now :-)
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