How to make plugin for Audacity?

Audio software developers forum.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
Post Reply
spicyfajita
Posts: 6
Joined: Wed Jul 09, 2014 6:00 am
Operating System: Please select

How to make plugin for Audacity?

Post by spicyfajita » Wed Jul 09, 2014 6:18 am

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

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: How to make plugin for Audacity?

Post by Gale Andrews » Wed Jul 09, 2014 10:22 am

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
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to make plugin for Audacity?

Post by steve » Wed Jul 09, 2014 11:21 am

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
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

steve
Site Admin
Posts: 81609
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: How to make plugin for Audacity?

Post by steve » Wed Jul 09, 2014 12:15 pm

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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

spicyfajita
Posts: 6
Joined: Wed Jul 09, 2014 6:00 am
Operating System: Please select

Re: How to make plugin for Audacity?

Post by spicyfajita » Thu Jul 10, 2014 8:49 am

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.

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: How to make plugin for Audacity?

Post by Gale Andrews » Thu Jul 10, 2014 11:02 am

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
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

spicyfajita
Posts: 6
Joined: Wed Jul 09, 2014 6:00 am
Operating System: Please select

Re: How to make plugin for Audacity?

Post by spicyfajita » Fri Jul 11, 2014 5:50 am

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

Post Reply