├── 10bandeq.ny ├── 15bandEQ.ny ├── Acx-check.ny ├── BCXoj.zip ├── Bandstop.ny ├── BassToCenter.ny ├── BassToCenter.ny.1 ├── Bbdelay.ny ├── Changespeedsemitones.ny ├── Changespeedsemitones.ny.1 ├── Channel-mixer.ny ├── ChebyI.ny ├── Crossfadein.ny ├── Crossfadeout.ny ├── De-hum.ny ├── Desk-eq.ny ├── Dtmf.ny ├── Enhancer.ny ├── Equasplit.ny ├── Firex.ny ├── Flangerl.ny ├── Isomod.ny ├── Limiter.ny ├── MmbQV.zip ├── Mutron.ny ├── Noiseband.ny ├── Noisegate.ny ├── Panrand.ny ├── Parametric.ny ├── Peakfinder-rft.ny ├── Pitch-detect.ny ├── Pluck-hz.ny ├── Popmute.ny ├── Pseudostereo.ny ├── RFT-Limiter-II.ny ├── RFT-Limiter-III.ny ├── Randomamp.ny ├── Repair_channel.ny ├── Resonant.ny ├── Ringmod.ny ├── Shelf.ny ├── Tapesat.ny ├── TextEnvelope.ny ├── TrimExtend.ny ├── TrimSilence.ny ├── Vari-tremolo.ny ├── amplr.ny ├── anal ├── bbdtone.ny ├── bitone2.ny ├── bouncingball.ny ├── buttrfly.ny ├── buttrlfo.ny ├── buttrramp.ny ├── buzz.ny ├── centerpanremover.ny ├── chimesdelay.ny ├── comb.ny ├── cur ├── delayfli.ny ├── delaypit.ny ├── delayreb.ny ├── down.sh ├── dtmfrand.ny ├── dualtapedecks.ny ├── duration.ny ├── eqcustom.ny ├── equalabl.ny ├── extract.ny ├── fade-io.ny ├── gen ├── generate.ny ├── harmonicnoise.ny ├── highpass2.ny ├── hpdelay.ny ├── hplfo.ny ├── hyperexp.ny ├── kU6Nf.zip ├── klstrbas.ny ├── lfohp.ny ├── lfolp.ny ├── lowpass2.ny ├── lpdelay.ny ├── lplfo.ny ├── multibandeq.ny ├── notch.ny ├── pan.ny ├── panlfo2a.ny ├── panramp.ny ├── pwm.ny ├── randomlp.ny ├── randompitch.ny ├── rbbdtone.ny ├── rbell.ny ├── rndtone.ny ├── seq2.ny ├── sq1.ny ├── surf-lfo.ny ├── surf-oxy.ny ├── tempo.ny ├── timeshif.ny ├── tonedelay.ny ├── tuning.ny ├── turntablewarp-ms.ny ├── varsilence.ny └── widener.ny /10bandeq.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Ten band E Q..." 5 | ;action "Applying one band of the Ten Band E Q..." 6 | ;info "(1:28) (2:56) (3:112) (4:224) (5:448) Ten Band E Q by David Sky\n(6:893) (7:1.8k) (8:3.6k) (9:7.1k) (10:14k) " 7 | 8 | ;control band "Band number(1-10)" int "band" 1 1 10 9 | ;control gain "Gain" real "db" 0.0 -24.0 24.0 10 | 11 | ;; Choose band number 1 - 10 and apply gain to it 12 | ;; [between -24 and +24 db]. 13 | 14 | ; make sure band is an integer 15 | (truncate band) 16 | 17 | ; This plug-in tests the following: 18 | 19 | ; if band < 1, set band to 1 20 | (setf band (max 1 band)) 21 | 22 | ; if band > 10, set band to 10 23 | (setf band (min band 10)) 24 | 25 | ; set the width of each band in octaves 26 | ; [convert to linear scale using octaves] 27 | ; [almost ten octaves between 20 Hz and 20 kHz] 28 | (setf width (/ 9.96578428466 10)) 29 | 30 | ; calculate center f of band [in octaves above 20 Hz] 31 | (setf center (mult width 0.5 (- (mult band 2) 1))) 32 | 33 | ; convert center of band n [in octaves above 20 Hz] to frequency 34 | (setf f (mult 20 (expt 2 center))) 35 | 36 | ; apply E Q to the band [f] 37 | (eq-band s f gain width) 38 | -------------------------------------------------------------------------------- /15bandEQ.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Classic EQ(15)" 5 | ;action "Equalizing..." 6 | ;info "Classic 15 Band Equalizer by Josu Etxeberria and David Sky" 7 | 8 | 9 | ;control Fre1 "25Hz" real "db" 0.0 -24.0 24.0 10 | ;control Fre2 "40Hz" real "db" 0.0 -24.0 24.0 11 | ;control Fre3 "63Hz" real "db" 0.0 -24.0 24.0 12 | ;control Fre4 "100Hz" real "db" 0.0 -24.0 24.0 13 | ;control Fre5 "160Hz" real "db" 0.0 -24.0 24.0 14 | ;control Fre6 "255Hz" real "db" 0.0 -24.0 24.0 15 | ;control Fre7 "420Hz" real "db" 0.0 -24.0 24.0 16 | ;control Fre8 "640Hz" real "db" 0.0 -24.0 24.0 17 | ;control Fre9 "1,00KHz" real "db" 0.0 -24.0 24.0 18 | ;control Fre10 "1,70KHz" real "db" 0.0 -24.0 24.0 19 | ;control Fre11 "2,56KHz" real "db" 0.0 -24.0 24.0 20 | ;control Fre12 "4,25KHz" real "db" 0.0 -24.0 24.0 21 | ;control Fre13 "6,85KHz" real "db" 0.0 -24.0 24.0 22 | ;control Fre14 "10,20KHz" real "db" 0.0 -24.0 24.0 23 | ;control Fre15 "16,00KHz" real "db" 0.0 -24.0 24.0 24 | 25 | 26 | ; [convert to linear scale using octaves] 27 | ; [almost ten octaves between 20 Hz and 20 kHz] 28 | (setf width (/ 9.96578428466 15)) 29 | 30 | 31 | 32 | ; calculate centers of different bands [in octaves above 20 Hz] 33 | 34 | (setf center1 (mult width 0.5 (- (mult 1 2) 1))) 35 | (setf center2 (mult width 0.5 (- (mult 2 2) 1))) 36 | (setf center3 (mult width 0.5 (- (mult 3 2) 1))) 37 | (setf center4 (mult width 0.5 (- (mult 4 2) 1))) 38 | (setf center5 (mult width 0.5 (- (mult 5 2) 1))) 39 | (setf center6 (mult width 0.5 (- (mult 6 2) 1))) 40 | (setf center7 (mult width 0.5 (- (mult 7 2) 1))) 41 | (setf center8 (mult width 0.5 (- (mult 8 2) 1))) 42 | (setf center9 (mult width 0.5 (- (mult 9 2) 1))) 43 | (setf center10 (mult width 0.5 (- (mult 10 2) 1))) 44 | (setf center11 (mult width 0.5 (- (mult 11 2) 1))) 45 | (setf center12 (mult width 0.5 (- (mult 12 2) 1))) 46 | (setf center13 (mult width 0.5 (- (mult 13 2) 1))) 47 | (setf center14 (mult width 0.5 (- (mult 14 2) 1))) 48 | (setf center15 (mult width 0.5 (- (mult 15 2) 1))) 49 | 50 | ; convert centers [in octaves above 20 Hz] to frequency 51 | 52 | (setf f1 (mult 20 (expt 2 center1))) 53 | (setf f2 (mult 20 (expt 2 center2))) 54 | (setf f3 (mult 20 (expt 2 center3))) 55 | (setf f4 (mult 20 (expt 2 center4))) 56 | (setf f5 (mult 20 (expt 2 center5))) 57 | (setf f6 (mult 20 (expt 2 center6))) 58 | (setf f7 (mult 20 (expt 2 center7))) 59 | (setf f8 (mult 20 (expt 2 center8))) 60 | (setf f9 (mult 20 (expt 2 center9))) 61 | (setf f10 (mult 20 (expt 2 center10))) 62 | (setf f11 (mult 20 (expt 2 center11))) 63 | (setf f12 (mult 20 (expt 2 center12))) 64 | (setf f13 (mult 20 (expt 2 center13))) 65 | (setf f14 (mult 20 (expt 2 center14))) 66 | (setf f15 (mult 20 (expt 2 center15))) 67 | 68 | ; apply EQ to sound 69 | 70 | (eq-band 71 | (eq-band 72 | (eq-band 73 | (eq-band 74 | (eq-band 75 | (eq-band 76 | (eq-band 77 | (eq-band 78 | (eq-band 79 | (eq-band 80 | (eq-band 81 | (eq-band 82 | (eq-band 83 | (eq-band 84 | (eq-band 85 | s 86 | f15 Fre15 width) 87 | f14 Fre14 width) 88 | f13 Fre13 width) 89 | f12 Fre12 width) 90 | f11 Fre11 width) 91 | f10 Fre10 width) 92 | f9 Fre9 width) 93 | f8 Fre8 width) 94 | f7 Fre7 width) 95 | f6 Fre6 width) 96 | f5 Fre5 width) 97 | f4 Fre4 width) 98 | f3 Fre3 width) 99 | f2 Fre2 width) 100 | f1 Fre1 width) 101 | ; Released under terms of the GNU Public License 102 | ; http://www.opensource.org/licenses/gpl-license.php 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | -------------------------------------------------------------------------------- /BCXoj.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nyancat18/audacity-plugin/3931af4e9426203d1092093a2252cc0d228daa84/BCXoj.zip -------------------------------------------------------------------------------- /Bandstop.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#FilterPlugin" 5 | ;name "Band-Stop Filter..." 6 | ;action "Filtering..." 7 | ;info "By Steve Daulton (http://easyspacepro.com).\nReleased under GPL v2.\n\nFor a Help screen that can be copied into other documents,\nview the help using the Debug button.\n\n" 8 | 9 | ;; bandstop.ny by Steve Daulton. December 2009. 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 | ;; version 1.1 March 2011 13 | ;; version 1.2 May 2011: text to American English. Tested on Audacity 1.3.4 14 | ;; Requires Audacity 1.3.4 or later 15 | 16 | ;control freq "Center Frequency" real "[Hz]" 1000 100 10000 17 | ;control width "Stop-Band Width" real "[Octaves]" 1 0.25 4 18 | ;control help "View Help" choice "No,Yes" 0 19 | 20 | (defun viewhelp () 21 | (let ((help 22 | "BAND STOP FILTER HELP\n 23 | Stops frequencies within the selected frequency band.\n 24 | Set the 'Center Frequency' slider, or type in a value for 25 | the center of the frequency band to block.\n 26 | Set the 'Stop-Band Width' to determine how wide 27 | the cut frequency band will be. Smaller numbers will 28 | produce a narrower 'notch' and larger numbers will cut 29 | a broader band of frequencies.\n 30 | TECHNICAL DETAILS.\n 31 | This filter uses steep high pass and low pass filters 32 | to achieve the band stop effect. The filters iterate to 33 | improve the band stop efficiency for narrow band width 34 | and can thereby perform close to total blocking down to 35 | almost 1/4 octave.\n 36 | For even more narrow notches you should use a notch filter.\n 37 | Remember to deselect Help before using this effect.")) 38 | (format T help)(format nil help))) 39 | 40 | (defun bandstop (s-in hz bandwidth) 41 | (let* ((itr (if (< bandwidth 2.0)(truncate (/ 2.0 bandwidth)) 1)) 42 | (octv (/ bandwidth 2.0)) 43 | (lpfreq (- hz (/ hz (power 2.0 (/ octv))))) 44 | (hpfreq (* hz (power 2.0 octv)))) 45 | (dotimes (i itr s-in) 46 | (setf s-in 47 | (sim 48 | (lowpass8 (lowpass8 s-in lpfreq) lpfreq) 49 | (highpass8 (highpass8 s-in hpfreq) hpfreq)))))) 50 | 51 | (if (> (* freq (power 2.0 (/ width 2.0)))(/ *sound-srate* 2.0)) 52 | (print "Error.\nFrequency or bandwidth too high.") 53 | (if (= help 1) 54 | (viewhelp) 55 | (multichan-expand #'bandstop s freq width))) 56 | 57 | -------------------------------------------------------------------------------- /BassToCenter.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#SpectralPlugin" 5 | ;name "Bass to Center..." 6 | ;action "Mixing bass to center..." 7 | ;info " By Jvo Studer . Released under GPL v2.\n\n Frequency-selective filter to crossfeed (mix) bass frequencies to center (mono).\n Works only with stereo tracks." 8 | 9 | ;control eeqfc "Crossover Frequency" int "Hz" 150 10 500 10 | ;control level "Bass Feed Proportion" int "%" 95 20 100 11 | ;control gcomp "Bass Boost" real "dB" 0.5 0 6 12 | 13 | ;; basstocenter.ny by Jvo Studer, V1.1 March 2011 14 | ;; Released under terms of the GNU General Public License version 2 15 | ;; http://www.gnu.org/licenses/gpl-2.0.html 16 | ;; Simulates the "Elliptic EQ" filter found on vinyl mastering 17 | ;; consoles by means of a first order highpass filter in the 18 | ;; side-channel (L-R difference). 19 | 20 | (setq eeqfc (max (min eeqfc (/ *sound-srate* 2.0)) 1)) 21 | 22 | (setf factl (* level -0.005)) 23 | (setf factr (* level 0.005)) 24 | (setf fcomp (* eeqfc 0.74)) 25 | 26 | ;; elliptic EQ 27 | (defun eefilt (sig eefc) 28 | (lp (diff (aref sig 0) (aref sig 1)) eefc)) 29 | 30 | ;; bass shelf EQ 31 | (defun eq-low (sig fl gain &optional (slope 1.0)) 32 | (multichan-expand #'eq-lowshelf sig fl gain slope)) 33 | 34 | (if (arrayp s) 35 | (eq-low (vector 36 | (sum (aref s 0) (prod factl (eefilt s eeqfc))) 37 | (sum (aref s 1) (prod factr (eefilt s eeqfc)))) fcomp gcomp 0.5) 38 | (format nil "Plug-In Error:\nSelected tracks must be stereo.")) 39 | -------------------------------------------------------------------------------- /BassToCenter.ny.1: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#SpectralPlugin" 5 | ;name "Bass to Center..." 6 | ;action "Mixing bass to center..." 7 | ;info " By Jvo Studer . Released under GPL v2.\n\n Frequency-selective filter to crossfeed (mix) bass frequencies to center (mono).\n Works only with stereo tracks." 8 | 9 | ;control eeqfc "Crossover Frequency" int "Hz" 150 10 500 10 | ;control level "Bass Feed Proportion" int "%" 95 20 100 11 | ;control gcomp "Bass Boost" real "dB" 0.5 0 6 12 | 13 | ;; basstocenter.ny by Jvo Studer, V1.1 March 2011 14 | ;; Released under terms of the GNU General Public License version 2 15 | ;; http://www.gnu.org/licenses/gpl-2.0.html 16 | ;; Simulates the "Elliptic EQ" filter found on vinyl mastering 17 | ;; consoles by means of a first order highpass filter in the 18 | ;; side-channel (L-R difference). 19 | 20 | (setq eeqfc (max (min eeqfc (/ *sound-srate* 2.0)) 1)) 21 | 22 | (setf factl (* level -0.005)) 23 | (setf factr (* level 0.005)) 24 | (setf fcomp (* eeqfc 0.74)) 25 | 26 | ;; elliptic EQ 27 | (defun eefilt (sig eefc) 28 | (lp (diff (aref sig 0) (aref sig 1)) eefc)) 29 | 30 | ;; bass shelf EQ 31 | (defun eq-low (sig fl gain &optional (slope 1.0)) 32 | (multichan-expand #'eq-lowshelf sig fl gain slope)) 33 | 34 | (if (arrayp s) 35 | (eq-low (vector 36 | (sum (aref s 0) (prod factl (eefilt s eeqfc))) 37 | (sum (aref s 1) (prod factr (eefilt s eeqfc)))) fcomp gcomp 0.5) 38 | (format nil "Plug-In Error:\nSelected tracks must be stereo.")) 39 | -------------------------------------------------------------------------------- /Bbdelay.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 | ;type process 4 | ;name "Bouncing ball delay with panning..." 5 | ;action "Performing bouncing ball Delay with panning..." 6 | ;info "Bouncing ball delay with panning by David Sky" 7 | 8 | ;control decay "Decay amount" real "dB" 1.00 0.00 24.00 9 | ;control delay "Delay time" real "seconds" 0.05 0.01 1.00 10 | ;control count "Number of bounces" int "times" 15 1 100 11 | ;control move "Pan spread movement" real "move" 0.020 0.001 0.100 12 | 13 | 14 | ;; Bug Fix by Steve Daulton 5th Dec 2012 15 | ;; This plug-in is still quite buggy, but it basically works. 16 | ;; 17 | ;; Note: this effect will use up memory proportional to 18 | ;; delay * count, since that many samples must be buffered 19 | ;; before the first block is freed. 20 | 21 | ;; The first delay will be 22 | ;; delay time * count, 23 | ;; speeding up to delay time... like a bouncing ball. 24 | 25 | ;; Move defines how increasingly far from center each 26 | ;; bounce will be. 27 | 28 | ; upcount is used to determine how many bounces have 29 | ; occured, whereas count goes from count to zero 30 | 31 | (setq upcount (1+ count)) 32 | (setq decay (- decay)) 33 | 34 | (defun stereo-pan (s where) 35 | (vector (mult (aref s 0)(sum 1 (mult -1 where))) 36 | (mult (aref s 1) where))) 37 | 38 | (defun next-position (count) 39 | (sum 0.5 40 | (mult move 41 | (- upcount count) 42 | (expt -1 (float count))))) 43 | 44 | (defun panbounces (s count) 45 | (if (= count 0) 46 | (cue s) 47 | (sim (cue s) 48 | (at (mult delay count) 49 | (loud decay 50 | (panbounces 51 | (stereo-pan (mult 2 s)(next-position count)) 52 | (- count 1))))))) 53 | 54 | (stretch-abs 1 (panbounces s count)) 55 | 56 | -------------------------------------------------------------------------------- /Changespeedsemitones.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 4 3 | ;type process 4 | ;name "Change Speed by Semitones..." 5 | ;action "Processing..." 6 | ;restoresplits 0 7 | ;author "Steve Daulton" 8 | ;copyright "Released under terms of the GNU General Public License version 2" 9 | 10 | ;control pitch "Semitones change" real "" 0 -24 24 11 | 12 | (setf ratio (power 2.0 (/ pitch -12))) 13 | (resample *track* (* *sound-srate* ratio)) -------------------------------------------------------------------------------- /Changespeedsemitones.ny.1: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 4 3 | ;type process 4 | ;name "Change Speed by Semitones..." 5 | ;action "Processing..." 6 | ;restoresplits 0 7 | ;author "Steve Daulton" 8 | ;copyright "Released under terms of the GNU General Public License version 2" 9 | 10 | ;control pitch "Semitones change" real "" 0 -24 24 11 | 12 | (setf ratio (power 2.0 (/ pitch -12))) 13 | (resample *track* (* *sound-srate* ratio)) -------------------------------------------------------------------------------- /Channel-mixer.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#MixerPlugin" 5 | ;name "Channel Mixer..." 6 | ;info "by Steve Daulton (http://easyspacepro.com). Released under GPL v2.\n\nSelect 'Use Custom' then set the slider values, or select a preset (slider values are then ignored).\nChoose 'Debug' to see the values that were applied. \n\n" 7 | ;action "Mixing..." 8 | ;preview "enabled" 9 | ;author "Steve Daulton" 10 | ;copyright "Released under terms of the GNU General Public License version 2" 11 | 12 | ;; channel-mixer.ny by Steve Daulton, June 2010 13 | ;; Released under terms of the GNU General Public License version 2 14 | ;; http://www.gnu.org/copyleft/gpl.html 15 | 16 | ;; Updated 28th September 2010. 17 | ;; Updated 8th March 2011. 18 | ;; Preview and Mid-Side Decoder added Dec 2014. 19 | 20 | ;control preset "Presets" choice "Use Custom,Mono (Average),Mono (Both Left),Mono (Both Right),Extra Narrow,Narrow Stereo,Wide Stereo,Extra Wide,Centre to Left,Centre to Right,Swap Left/Right,Vocal Remover (L/R invert),Vocal Remover (mono),Invert Left,Invert Right,Mid-Side Decode" 0 21 | ;control left-mix-L "<-- LEFT CHANNEL OUTPUT --> \nfrom original Left channel (%)" real "" 0 -100 100 22 | ;control left-mix-R "from original Right channel (%)" real "" 0 -100 100 23 | ;control right-mix-L "<-- RIGHT CHANNEL OUTPUT -->\nfrom original Left channel (%)" real "" 0 -100 100 24 | ;control right-mix-R "from original Right channel (%)" real "" 0 -100 100 25 | 26 | ;; Create list of values from selected preset or from the slider values 27 | (setq channels 28 | (case preset 29 | (1 (list 50 50 50 50)) ; Average 30 | (2 (list 100 0 100 0)) ; Both Left 31 | (3 (list 0 100 0 100)) ; Both Right 32 | (4 (list 70 30 30 70)) ; Extra Narrow 33 | (5 (list 85 15 15 85)) ; Narrow Stereo 34 | (6 (list 100 -30 -30 100)) ; Wide Stereo 35 | (7 (list 100 -60 -60 100)) ; Extra Wide 36 | (8 (list 50 50 -50 50)) ; Centre to Left 37 | (9 (list 50 -50 50 50)) ; Centre to Right 38 | (10 (list 0 100 100 0)) ; Swap Left/Right 39 | (11 (list 100 -100 -100 100)) ; Vocal Remover L/R invert 40 | (12 (list 100 -100 100 -100)) ; Vocal Remover mono 41 | (13 (list -100 0 0 100)) ; Invert Left 42 | (14 (list 100 0 0 -100)) ; Invert Right 43 | (15 (list 50 50 50 -50)) ; Mid-Side Decode 44 | (T (list left-mix-L left-mix-R right-mix-L right-mix-R)))) 45 | 46 | ; Print settings to debug window 47 | (format T "New Left Channel:~%Left mix = ~a %~%Right mix = ~a %~% 48 | New Right Channel~%Left mix = ~a %~%Right mix = ~a %~%\n" 49 | (nth 0 channels)(nth 1 channels)(nth 2 channels)(nth 3 channels)) 50 | 51 | ; convert percent to +/- 1 52 | (setf channels (mapcar #'(lambda (num) (/ num 100.0)) channels)) 53 | 54 | ; mix and otput as vector 55 | (if (arrayp s) ; check for stereo track 56 | (vector 57 | (sum 58 | (mult (aref s 0)(nth 0 channels)) 59 | (mult (aref s 1)(nth 1 channels))) 60 | (sum 61 | (mult (aref s 0)(nth 2 channels)) 62 | (mult (aref s 1)(nth 3 channels)))) 63 | ; or error if not stereo 64 | (format NIL "Error\nChannel Mixer can only be used on stereo tracks.")) 65 | -------------------------------------------------------------------------------- /ChebyI.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;name "Chebyshev Type I Filter" 5 | ;action "Filtering..." 6 | ;info "by Kai Fisher.\nReleased under GPL v2.\n" 7 | 8 | ;; chebyl1.ny by Kai Fisher June 2012 9 | ;; Revised by Steve Daulton October 2013 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 | ;; 13 | ;; For information about writing and modifying Nyquist plug-ins: 14 | ;; http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference 15 | 16 | ;control fType "Filter Type" choice "Lowpass,Highpass" 0 17 | ;control order "Order" choice "2,4,6,8,10,12,14,16,18,20,22,24,26,28,30" 2 18 | ;control fc "Cut-off Frequency" real "Hz" 1000 1 48000 19 | ;control ripple "Ripple" real "dB" 0.05 0.0 3.0 20 | 21 | 22 | ;; cheby1 implements a nth order chebyshev (or butterworth) filter 23 | ;; where n is a multiple of 2 (eg, 2,4,6,8,10...) using cascaded biquads 24 | ;; s1 = sound to filter 25 | ;; n = order of filter to implement (integer multiple of 2) 26 | ;; fType = 0 for lowpass, 1 for highpass 27 | ;; fc = cut-off frequency, Hz (-3dB point) 28 | ;; ripple = amount of ripple in passband, dB (0dB = butterworth filter) 29 | ;; ffc = cut-off frequency as a fraction of sampling rate 30 | (defun cheby1 (s1 n fType fc ripple) 31 | (let ((ffc (/ fc (snd-srate s1)))) 32 | (dotimes (p (/ n 2) s1) 33 | (setq coeffs (cheby1Coeffs fType n ffc ripple (1+ p))) 34 | (setq a0 (nth 0 coeffs)) 35 | (setq a1 (nth 1 coeffs)) 36 | (setq a2 (nth 2 coeffs)) 37 | (setq b0 (nth 3 coeffs)) 38 | (setq b1 (nth 4 coeffs)) 39 | (setq b2 (nth 5 coeffs)) 40 | (setq s1 (biquad s1 b0 b1 b2 a0 a1 a2))))) 41 | 42 | 43 | ;; cheby1Coeffs calculates the biquad coefficients for part of a cascade 44 | ;; filter design. The order of the total filter is n (integer multiple of 2) 45 | ;; and the current pole pair to determine coefficients for is p 46 | ;; 47 | ;; This function follows the code in Table 20-5 of 48 | ;; 1997, Smith, S. "The Scientist and Engineer's Guide to Digital Signal Processing" 49 | ;; http://www.dspguide.com 50 | ;; Note: The naming convention in Smith (1997) of the a and b coefficients 51 | ;; is reversed compared to nyquist (ie "a" coefficients in Smith (1997) 52 | ;; correspond to the "b" coefficients in nyquist and visa versa) 53 | ;; The coefficients used in this code have been changed to be the same convention as nyquist. 54 | ;; 55 | ;; Inputs 56 | ;; fType low pass = 0, highpass = 1 57 | ;; order order of the filter (integer multiple of 2, eg 2, 4, 6...) 58 | ;; ffc cut-off frequency as a factor of the sample rate 59 | ;; ripple dB of allowed ripple in pass band 60 | ;; p pole pair to evaluate (1 means poles 1 & 2, 2 means poles 3 & 4...) 61 | ;; 62 | ;; Variables 63 | ;; a0-2 a coefficients 64 | ;; b0-2 b coefficients 65 | ;; ga gain due to a components 66 | ;; gb gain due to b components 67 | ;; g gain 68 | ;; ReP real part of the pole location in z-plane 69 | ;; ImP imaginary part of the pole location in z-plane 70 | ;; wfc factored angular frequency (ie 0 to PI) 71 | ;; t step size in integration of bilinear transform (trapezoidal rule) 72 | ;; t2 t squared 73 | ;; m2 square of the magnitude of the vector to the pole 74 | ;; d temporary variable 75 | ;; 76 | ;; Chebyshev elliptical warping variables 77 | ;; es temporary variable related to the eccentricity of the ellipse for cheby1 filter 78 | ;; vx temporary variable for eliptical warping of unit circle for cheby1 filter 79 | ;; kx temporary variable for eliptical warping of unit circle for cheby1 filter 80 | (defun cheby1Coeffs (fType n ffc ripple p) 81 | ;convert ripple from dB to fraction 82 | (let* ((ripple (- 1.0 (expt 10.0 (/ (- ripple) 20.0)))) 83 | ;; Calculate pole location on unit circle in z-plane 84 | (poles (CalculatePoles n ripple p)) 85 | (ReP (first poles)) 86 | (ImP (second poles)) 87 | ;; s-domain to z-domain conversion 88 | (t (* 2.0 (tan 0.5))) 89 | (t2 (* t t)) 90 | (wfc (* 2.0 PI ffc)) 91 | (m2 (+ (* ReP ReP) (* ImP ImP))) 92 | (d (+ 4.0 (- (* 4.0 ReP t)) (* m2 t2))) 93 | ;; Lowpass prototype coefficients 94 | (x0 (/ t2 d)) 95 | (x1 (/ (* 2.0 t2) d)) 96 | (x2 (/ t2 d)) 97 | (y1 (/ (- 8.0 (* 2.0 m2 t2)) d)) 98 | (y2 (/ (- -4.0 (* 4.0 ReP t) (* m2 t2)) d)) 99 | ;; Transform Lp prototype filter coefficients to actual LP or to HP 100 | (k (if (= 1 fType) 101 | (/ (- (cos (+ 0.5 (/ wfc 2.0)))) (cos (- (/ wfc 2.0) 0.5))) 102 | (/ (sin (- 0.5 (/ wfc 2.0))) (sin (+ (/ wfc 2.0) 0.5))))) 103 | (k2 (* k k)) 104 | (d (+ 1.0 (* y1 k) (- (* y2 k2)))) 105 | ;derive coefficients 106 | (a0 1.0) 107 | (a1 (/ (+ (* 2.0 k) y1 (* y1 k2) (- (* 2.0 y2 k))) d)) 108 | (a2 (/ (+ (- k2) (- (* y1 k)) y2) d)) 109 | (b0 (/ (+ x0 (- (* x1 k)) (* x2 k2)) d)) 110 | (b1 (/ (+ (- (* 2.0 x0 k)) x1 (* x1 k2) (- (* 2.0 x2 k))) d)) 111 | (b2 (/ (+ (* x0 k2) (- (* x1 k)) x2) d)) 112 | ;Determine gain of filter 113 | (ga (+ a0 (- a1) (- a2))) 114 | (gb (+ b0 b1 b2 )) 115 | (g (/ ga gb))) 116 | ;Change sign of a1 and b1 if highpass 117 | (when (= fType 1) (setq a1 (- a1))) 118 | (when (= fType 1) (setq b1 (- b1))) 119 | ;Apply gain so that passband is unity. 120 | (setq b0 (* b0 g)) 121 | (setq b1 (* b1 g)) 122 | (setq b2 (* b2 g)) 123 | ;Output coefficients 124 | (list a0 a1 a2 b0 b1 b2))) 125 | 126 | 127 | ;; Calculate pole location on unit circle in z-plane 128 | ;; n is the filter order.;; r is the ripple value 129 | ;; p is the pole pair 130 | (defun CalculatePoles (n r p) 131 | (setq ReP (- (cos (+ (/ PI (* n 2.0)) (* (- p 1.0) (/ PI n)))))) 132 | (setq ImP (sin (+ (/ PI (* n 2.0)) (* (- p 1.0) (/ PI n))))) 133 | ;; Warp unit circle to ellipse (for chebyshev filter) (ie if ripple > 0) 134 | (when (> ripple 0.0) 135 | (setq es (sqrt (- (expt (/ 1.0 (- 1.0 r)) 2.0) 1.0))) 136 | (setq vx (/ (log (+ (/ 1.0 es) (sqrt (+ (expt (/ 1.0 es) 2.0) 1.0)))) n)) 137 | (setq kx (/ (log (+ (/ 1.0 es) (sqrt (- (expt (/ 1.0 es) 2.0) 1.0)))) n)) 138 | (setq kx (/ (+ (exp kx) (exp (- kx))) 2.0)) (setq ReP (/ (* ReP (- (exp vx) (exp (- vx)))) (* 2.0 kx))) 139 | (setq ImP (/ (* ImP (+ (exp vx) (exp (- vx)))) (* 2.0 kx)))) 140 | (list ReP ImP)) 141 | 142 | 143 | ;; Sanitize user input 144 | (setq fc (min (max fc 0.01) (/ *sound-srate* 2))) 145 | (setq ripple (min (max ripple 0) 3.0)) 146 | 147 | (setq order (* 2 (+ 1 order))) 148 | (multichan-expand #'cheby1 s order fType fc ripple) -------------------------------------------------------------------------------- /Crossfadein.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#MixerPlugin" 5 | ;name "Cross Fade In" 6 | ;action "Cross-Fading In..." 7 | 8 | (mult s (control-srate-abs *sound-srate* (s-sqrt (pwlv 0 1 1)))) 9 | -------------------------------------------------------------------------------- /Crossfadeout.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#MixerPlugin" 5 | ;name "Cross Fade Out" 6 | ;action "Cross-Fading Out..." 7 | 8 | (mult s (snd-exp 9 | (snd-scale 0.5 (snd-log 10 | (sum 1 (snd-scale -1 (ramp))))))) 11 | -------------------------------------------------------------------------------- /De-hum.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#FilterPlugin" 5 | ;name "Hum Remover" 6 | ;action "Filtering...." 7 | ;info "By Steve Daulton. http://audacity.easyspacepro.com\nReleased under GPL v2 Dec. 2009\n\nFor Audacity 1.3.8 or later.\n\n" 8 | 9 | 10 | ;control basef "Select Region" choice "Europe (50Hz),USA (60Hz)" 0 11 | ;control odd "Number of odd Harmonics" int "" 1 0 200 12 | ;control even "Number of even Harmonics" int "" 0 0 20 13 | ;control thresh "Hum Threshold Level(0 to 100%)" real "" 10 0 100 14 | 15 | (setq basef 16 | (case basef 17 | (0 50) 18 | (1 60))) 19 | 20 | (defun sanitise (var min max) 21 | (if (> var max) max 22 | (if (< var min) min var))) 23 | 24 | (setq floor 0.00002) 25 | (setq odd (sanitise odd 0 1000)) 26 | (setq even (sanitise even 0 1000)) 27 | (setq thresh (/ (sanitise thresh 0 100) 100.0)) 28 | (setq attack 0.25) 29 | (setq look attack) 30 | 31 | (if (or (> (* basef (1+ (* odd 2.0)))(/ *sound-srate* 2.0))(> (* basef (+ 2 (* even 2.0)))(/ *sound-srate* 2.0))) 32 | (format nil "Error!~%~%Sample rate of ~aHz is too low for ~a harmonics.~%~%Set fewer harmonics." *sound-srate* (max odd even)) 33 | (progn 34 | (defun dehum (s-in itr itr2) 35 | (dotimes (var itr s-in) 36 | (setq s-in 37 | (notch2 s-in (* basef (1+ (* var 2.0))) (+ (* 4 var) 2)))) 38 | (dotimes (var itr2 s-in) 39 | (setq s-in 40 | (notch2 s-in (* basef (+ 2 (* var 2.0))) (+ (* 4 var) 4))))) 41 | 42 | ; left/right tracks linked for gate-follow to prevent left/right wobble 43 | (defun gate-follow (s-in) 44 | (setq s-in (hp s-in 20)) ; hp filter to remove DC off-set 45 | (if (arrayp s-in) ; if stereo track 46 | (s-max (s-abs(aref s-in 0))(s-abs(aref s-in 1))) 47 | (s-abs s-in))) 48 | 49 | (setq gatefollow (gate-follow s)) ; audio for gate to follow 50 | 51 | ; gate envelope tracks gate-follow 52 | (setq g-env 53 | (clip (gate gatefollow look attack attack floor thresh) 1.0)) 54 | 55 | (defun noisegate (s-in env) 56 | (mult s-in env)) 57 | 58 | (defun residual (s-in env) 59 | (mult s-in (sum 1.0 (mult -1 env)))) 60 | 61 | (sim 62 | (multichan-expand #' noisegate s g-env) 63 | (dehum (multichan-expand #' residual s g-env) odd even)))) 64 | -------------------------------------------------------------------------------- /Desk-eq.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#EQPlugin" 5 | ;name "Desk EQ..." 6 | ;action "Equalizing..." 7 | ;info "By Steve Daulton (www.easyspacepro.com)\nReleased under GPL v2.\n" 8 | 9 | ;; desk-eq.ny by Steve Daulton July 2012. 10 | ;; Parameters modelled on Allen & Heath(TM) GL Series mixing console. 11 | ;; Released under terms of the GNU General Public License version 2: 12 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 13 | ;; 14 | ;; For information about writing and modifying Nyquist plug-ins: 15 | ;; http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference 16 | 17 | ;control hpf "100 Hz HPF" choice "Enabled,Disabled" 1 18 | ;control HF-gain "HF Gain" real "dB @ 12 kHz" 0 -15 15 19 | ;control HM-freq "High-Mid Frequency" int "Hz" 3000 500 15000 20 | ;control HM-gain "High-Mid Gain" real "dB" 0 -15 15 21 | ;control LM-freq "Low-Mid Frequency" int "Hz" 180 35 1000 22 | ;control LM-gain "Low-Mid Gain" real "dB" 0 -15 15 23 | ;control LF-gain "LF Gain" real "dB @ 80 Hz" 0 -15 15 24 | 25 | ;; sanitise user input 26 | (defun sanitise (var minval maxval) 27 | (max (min var maxval) minval)) 28 | 29 | (setq HF-gain (sanitise HF-gain -15 15)) 30 | (setq HM-freq (sanitise HM-freq 500 15000)) 31 | (setq HM-freq (sanitise HM-freq 500 (/ *sound-srate* 2))) 32 | (setq HM-gain (sanitise HM-gain -15 15)) 33 | (setq LM-freq (sanitise LM-freq 35 1000)) 34 | (setq LM-gain (sanitise LM-gain -15 15)) 35 | (setq LF-gain (sanitise LF-gain -15 15)) 36 | 37 | (defun highshelf (sig gain) 38 | (eq-highshelf 39 | (eq-highshelf 40 | (eq-highshelf 41 | (eq-highshelf sig 1000 (* gain 0.3) 0.5) 42 | 3000 (* gain 0.25) 0.5) 43 | 6000 (* gain 0.4) 0.75) 44 | 12000 (* gain 0.2) 0.5)) 45 | 46 | (defun lowshelf (sig gain) 47 | (eq-lowshelf 48 | (eq-lowshelf 49 | (eq-lowshelf 50 | (eq-lowshelf sig 1000 (* gain 0.3) 0.5) 51 | 320 (* gain 0.25) 0.5) 52 | 160 (* gain 0.4) 0.75) 53 | 80 (* gain 0.2) 0.5)) 54 | 55 | (defun equalise (sig) 56 | (lowshelf 57 | (eq-band 58 | (eq-band 59 | (highshelf s HF-gain) 60 | LM-freq LM-gain 2.5) 61 | HM-freq HM-gain 2.5) 62 | LF-gain)) 63 | 64 | (if (< *sound-srate* 24000) 65 | (print "Error.\nThe track sample rate must be greater than 24000 Hz") 66 | (if (= hpf 0) 67 | (highpass2 (equalise s) 80 0.6) 68 | (equalise s))) 69 | 70 | -------------------------------------------------------------------------------- /Dtmf.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "DTMF Generator" 5 | ;action "Generating DTMF ..." 6 | ;info "by David R. Sky, Dominic Mazzoni, Roger Dannenberg, W. Borgert\nReleased under terms of the GNU General Public License Version 2\nCreates Dual Tone Multi-Frequency tones also known as Touch Tones.\nEnter a tone string consisting of any of the following characters:\n0...9, A...D, *, #, a...z\nEach tone is followed by a silence of the specified duration; entering\na space in the string extends the silence by that duration.\nExamples: 1209 1336 1477 1633\n 697 1 2 3 A\n 770 4 5 6 B\n 852 7 8 9 C\n 941 * 0 # D" 7 | 8 | ;control keys "Tone string" string "" "180audacity" 9 | ;control tl "Tone duration (milliseconds)" int "" 100 1 1000 10 | ;control sl "Silence duration after tone (milliseconds)" int "" 100 0 1000 11 | ;control twist "Twist (Reduced volume of low tone in each tone; dB)" real "" 0.0 0.0 4.0 12 | ;control volume "Volume (percent)" int "" 80 1 100 13 | 14 | ; DTMF (Dual Tone Multi-Frequency) generator 15 | ; otherwise known as Touch Tones (TM) 16 | ; by David R. Sky, Dominic Mazzoni, Roger B. Dannenberg, W. Borgert 17 | ; 2004-09, 2005-04 18 | ; January 7, 2006 now includes alphabet 19 | ; for example 123audacity 1800recycle 20 | ; includes the 4 military 'numbers' 21 | ; A B C D, to the right of the regular number keypad 22 | ; Code reformatted for readability Sept 2016. 23 | ; 24 | ; Released under terms of the GNU General Public License version 2 25 | ; http://www.gnu.org/copyleft/gpl.html 26 | 27 | 28 | ; convert volume percent to flonum 29 | ; DTMF uses two tones so we cut volume by further one-half 30 | (setf volume (/ volume 200.0)) 31 | 32 | ; convert milliseconds to seconds 33 | (setf tl (/ tl 1000.0)) 34 | (setf sl (/ sl 1000.0)) 35 | 36 | ; Twist is the ratio of the high to low tone, in db 37 | ; used in real telephone applications. 38 | 39 | (defun dtmf (key volume tl twist sl) 40 | ;; XLISP does not have 2-dimensional arrays, so we'll use row and column lists. 41 | (let ((row1 (list #\1 #\2 #\3 #\A #\a #\b #\c #\d #\e #\f)) 42 | (row2 (list #\4 #\5 #\6 #\B #\g #\h #\i #\j #\k #\l #\m #\n #\o)) 43 | (row3 (list #\7 #\8 #\9 #\C #\p #\q #\r #\s #\t #\u #\v #\w #\x #\y #\z)) 44 | (row4 (list #\* #\0 #\# #\D)) 45 | (col1 (list #\1 #\4 #\7 #\* #\g #\h #\i #\p #\q #\r #\s)) 46 | (col2 (list #\2 #\5 #\8 #\0 #\a #\b #\c #\j #\k #\l #\t #\u #\v)) 47 | (col3 (list #\3 #\6 #\9 #\# #\d #\e #\f #\m #\n #\o #\w #\x #\y #\z)) 48 | (col4 (list #\A #\B #\C #\D))) 49 | (setf low 50 | (cond 51 | ((member key row1) 697) 52 | ((member key row2) 770) 53 | ((member key row3) 852) 54 | ((member key row4) 941) 55 | ( T 0))) 56 | (setf high 57 | (cond 58 | ((member key col1) 1209) 59 | ((member key col2) 1336) 60 | ((member key col3) 1477) 61 | ((member key col4) 1633) 62 | ( T 0))) 63 | (setf volume 64 | (cond 65 | ((or (member key row1) (member key row2) 66 | (member key row3) (member key row4)) 67 | volume) 68 | ( T 0))) 69 | (seq 70 | (mult volume 71 | (pwl 0.002 1 (- tl 0.002) 1 tl) 72 | (sim 73 | (osc (hz-to-step high) tl) 74 | (loud (- twist) (osc (hz-to-step low) tl)))) 75 | (s-rest sl)))) 76 | 77 | (seqrep (i (length keys)) 78 | (dtmf (char keys i) volume tl twist sl)) 79 | -------------------------------------------------------------------------------- /Enhancer.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#DistortionPlugin" 5 | ;name "Harmonic Enhancer..." 6 | ;action "Adding Harmonics..." 7 | ;info " By Jvo Studer . GPL v2.\n\n Adds high frequency harmonics to brighten up dull recordings." 8 | 9 | ;; enhancer.ny by Jvo Studer, March 2011 10 | ;; Version 1.0 11 | ;; Released under terms of the GNU General Public License version 2 12 | ;; http://www.gnu.org/licenses/gpl-2.0.html 13 | 14 | ;control freq "Enhancer Crossover Frequency" int "Hz" 3200 2000 4500 15 | ;control drive "Enhancer Drive" int "dB" 0 -10 10 16 | ;control mode "Harmonic Generator Mode" choice "Even order,Odd order" 0 17 | ;control th_ng "Enhancer Noise Gate Threshold" int "dB" -28 -40 -16 18 | ;control effmix "Enhancer Mix Level" int "dB" -10 -26 6 19 | ;control output "Output" choice "Mix (Normal),Effect Only,Effect Level" 0 20 | 21 | (setq freq (max (min freq (/ *sound-srate* 4)) 20));; limit freq selection 22 | 23 | (setf limit 0.20);; this is the max positive limiting value 24 | 25 | (setf lim1 (* -1 limit)) 26 | (setf ratio1 (/ lim1)) 27 | (if (= mode 0) 28 | (setf lim2 (* lim1 -11)) 29 | (setf lim2 (* lim1 -1.1))) 30 | (setf ratio2 (/ lim2)) 31 | 32 | (setf fcomp (* freq 0.93)); crossover compensation eq 33 | (setf gcomp (max 0 (/ (+ drive effmix 16) 5.2))) 34 | (setf wcomp 0.81) 35 | 36 | (setf fc_ng (* freq 0.125)); noise gate parameters 37 | (setf trise 0.005) 38 | (setf tfall 0.425) 39 | (setf lookah (+ trise tfall)); must be (tf+tr) or higher for correct operation 40 | (setf floor (db-to-linear -26)) 41 | 42 | ; modified 1-pole highpass (due to gain loss at mid to high frequencies) 43 | (defun hp1 (x fc) 44 | (if (< fc 493) (hp x fc) 45 | (if (< fc 2375) 46 | (scale-db (- (log fc) 6.2) (hp x fc)) 47 | (scale-db (- (* (log fc) 2) 13.97) (hp x fc))))) 48 | 49 | ; sidechain filter function, 3rd order butterworth 50 | (defun sidechain (sig gain fc) 51 | (highpass2 52 | (hp1 53 | (scale-db gain 54 | (eq-highshelf sig (/ *sound-srate* 3.1) -4 1.0)) 55 | (* fc 1.07)) 56 | (* fc 1.0) 1.06)) 57 | 58 | ; the actual soft clipping limiter (similar to a diode limiter) 59 | (defun enhance (sig) 60 | (let* ((top (mult ratio1 (s-max sig 0))); scaled positive peaks 61 | (bottom (sum (mult ratio2 (s-min sig 0))))); scaled neg peaks 62 | (sim 63 | (scale lim1 (sum (s-exp top) -1)) 64 | (scale lim2 (sum (s-exp bottom) -1))))) 65 | 66 | ; enhancer noise gate, for stereo in apply in mono to preserve stereo image 67 | (defun noisegate (sig thres fsig_hp) 68 | (if (arrayp s) 69 | (gate (hp (scale-db drive (sum (aref sig 0) (aref sig 1))) fsig_hp) 70 | lookah trise tfall floor (* (db-to-linear thres) 2)) 71 | (gate (hp (scale-db drive s) fsig_hp) 72 | lookah trise tfall floor (db-to-linear thres)))) 73 | 74 | (case output 75 | (0 (eq-band 76 | (sim s 77 | (scale-db (+ effmix 0.13) 78 | (hp1 (mult (multichan-expand #'enhance (sidechain s drive freq)) 79 | (noisegate s th_ng fc_ng)) 80 | (/ freq 10)))) 81 | fcomp gcomp wcomp)) 82 | (1 (mult (multichan-expand #'enhance (sidechain s drive freq)) 83 | (noisegate s th_ng fc_ng))) 84 | (2 (scale (/ 0.501 limit) ; 8dB gain at lim=0.2 85 | (mult (sidechain s drive freq) 86 | (noisegate s th_ng fc_ng))))) 87 | -------------------------------------------------------------------------------- /Equasplit.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Regular interval audio splitter..." 5 | ;action "splitting audio by inserting regular interval silences..." 6 | ;info "by David R. Sky www.shellworld.net/~davidsky/ \nReleased under terms of the GNU General Public License version 2 \nSplits audio into desired number of segments by inserting silences of\nspecified duration. You can also specify fade-in and fade-out lengths\nfor each segment. By setting number of segments to ' 1 ' you can use\naudio splitter to apply a specified fade-in and fade-out to a single\nlength of audio in one action." 7 | 8 | ;control chunks "Number of audio segments" int "" 10 1 120 9 | ;control shift-t "Silence duration between segments [seconds]" real "" 1 0.01 10 10 | ;control fade "Fade-in/fade-out length [milliseconds; 0 = no fade]" int "" 20 0 500 11 | 12 | ; Audio chunker by David R. Sky, September 2, 2006. 13 | ; updated october 2007, converting shift-t in percentage value to seconds 14 | ; Released under terms of the GNU General Public License version 2 15 | ; http://www.gnu.org/copyleft/gpl.html 16 | 17 | ; divides selection into equal duration chunks, 18 | ; with user-set duration of silence between chunks 19 | 20 | ; initialize variables: 21 | 22 | ; selection duration 23 | (setf dur (/ len *sound-srate*)) 24 | ; set number of chunks from 1-120 inclusive 25 | ; prevents possible stack overflow issues above 120 events 26 | ; for 1 chunk, simply applies fade-in and fade-outs 27 | ; at start and end of chunk 28 | (setf chunks (max 1 (min 120 chunks))) 29 | ; setting chunk duration 30 | (setf chunk-t (/ dur chunks)) 31 | ; fade in/out times 32 | ; so no sharp clicks at start/end of chunks 33 | ; unless fade time is very fast 34 | (setf fade (* 0.001 fade)) 35 | ; if fade time is more than half of chunk duration, 36 | ; set fade to half of chunk duration 37 | (setf fade (if (> fade (* 0.5 chunk-t)) 38 | (* 0.5 chunk-t) fade)) 39 | 40 | 41 | (let (old x start end open close result) 42 | 43 | ; extract function for this plug-in 44 | ; chunker-extract 45 | (defun c-extract (open close sound) 46 | (if (arrayp sound) 47 | (vector 48 | (extract-abs open close (aref sound 0)) 49 | (extract-abs open close (aref sound 1))) 50 | (extract-abs open close sound))) 51 | 52 | ; copy s to local var old and discard s 53 | (setq old s) 54 | (setq s nil) 55 | 56 | ; making individual audio chunks 57 | (defun make-chunk (chunk-t i) 58 | ; define start and end times, 59 | ; which are used to extract chunk from old 60 | (setf start (* i chunk-t)) 61 | (setf end (+ start chunk-t)) 62 | ; extracting chunk from old 63 | (c-extract start end 64 | ; applying fade-in and fade-out 65 | (mult 66 | (pwl 0 0 (/ start dur) 0 (/ (+ start fade) dur) 1.0 67 | (/ (- end fade) dur) 1.0 (/ end dur) 0 1) 68 | (cue old) 69 | ) ; end mult 70 | ) ; end c-extract 71 | ) ; end defun make-chunk 72 | 73 | ; moving individual audio chunks into proper time positions 74 | (defun move-chunks (chunk-t shift-t chunks) 75 | (simrep (i chunks) 76 | (at-abs (* i (+ chunk-t shift-t)) 77 | (cue 78 | ; ( 79 | ; above left paren: opening of a possible added effect function 80 | ; to process each chunk differently, 81 | ; use i for changing variable of added function 82 | (make-chunk chunk-t i) 83 | ; ) 84 | ; above right paren: close of possible added effect function 85 | ) ; end cue 86 | ) ; end at-abs 87 | ) ; end simrep 88 | ) ; end defun move-chunks 89 | 90 | 91 | ; chunking audio 92 | (move-chunks chunk-t shift-t chunks) 93 | ) ; close let 94 | 95 | -------------------------------------------------------------------------------- /Firex.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Fire and Explosion sounds..." 5 | ;action "Generating fire or explosion sound..." 6 | ;info "firex.ny by David R. Sky www.shellworld.net/~davidsky/nyquist.htm \nEmulates a Korg MS-10 synthesizer patch. \nReleased under terms of the GNU Public License" 7 | 8 | ;control choice "Audio type [0=fire 1=explosion]" int "" 1 0 1 9 | ;control dur "Sound duration [seconds]" real "" 3 0.1 60 10 | ;control attack "Attack time [milliseconds]" int "" 50 0 500 11 | ;control decay "Explosion decay time [milliseconds]" int "" 500 0 500 12 | ;control sustain "Decay down to this level [percent]" int "" 30 1 100 13 | ;control cutoff "Cutoff frequency [hz]" int "" 3800 100 10000 14 | ;control q "Filter quality [q]" real "" 10 1 20 15 | ;control freq "Bass boost frequency [hz]" int "" 300 10 1000 16 | ;control boost "Bass boost [db]" int "" 30 0 60 17 | ;control clip-level "clipping amount [percent]" int "" 55 0 99 18 | 19 | ; Fire and Explosion sound Generator firex.ny by David R. Sky, July 6, 2007 20 | ; Based on a Korg MS-10 modular synthesizer patch: 21 | ; pink noise modulated the cutoff frequency 22 | ; of a VCF filtering white noise. 23 | ; http://www.shellworld.net/~davidsky/nyquist.htm 24 | ; This version available from http://wiki.audacityteam.org/wiki/Nyquist_Generate_Plug-ins 25 | ; Released under terms of the GNU Public License 26 | ; http://www.opensource.org/licenses/gpl-license.php 27 | 28 | #| 29 | firex.ny: Fire and explosion sounds 30 | 31 | Creation of this plug-in started as an attempt to duplicate the 32 | patch of a Korg MS-10 synthesizer I owned in the late 1980's. More 33 | detailed explanation of this patch is in the notes following 34 | variables explanation below. 35 | 36 | 1. 0=fire 1=explosion 37 | Choose between generating a fire sound [constant volume for your 38 | set duration] or explosion [fading out over the same duration]. 39 | 40 | 2. Sound duration [seconds] 41 | Duration of the fire or explosion sound. 42 | 43 | 3. Attack time [milliseconds] 44 | Time [in milliseconds] for the sound to go from zero to maximum 45 | volume. When fire is chosen, this is also time for the sound to 46 | drop from maximum to zero at the end of the sound. 47 | 48 | 4. Explosion decay time [milliseconds] 49 | After the initial attack time for an explosion sound, how fast to 50 | drop from maximum to the next level: 51 | 52 | 5. Decay down to this level [percent] 53 | AFter the attack and decay times, the level at which the sound 54 | begins to fade out for the remaining duration of the explosion 55 | sound. 56 | 57 | 6. Cutoff frequency [hz] 58 | Audio frequencies below this setting are heard, frequencies above 59 | this value are attenuated [reduced in volume]. A lower setting 60 | generates a deeper-sounding result. 61 | 62 | 7. Filter quality [q] 63 | The result of lowering this parameter value is to "smoothen" the 64 | generated sound and decrease the number of high frequencies. 65 | 66 | 8. Bass boost frequency [hz] 67 | The low frequency portion of the fire or explosion sound below 68 | which is boosted, how much depending on the next setting: 69 | 70 | 9. Bass boost [db] 71 | How much to increase the volume of the above bass frequency. 0db 72 | means no boost, 6db means double the volume, and so on. 73 | 74 | 10. clipping amount [percent] 75 | Deliberately clipping the fire or explosion sound creates a 76 | 'meatier' or more 'severe' sound. 77 | 78 | Notes 79 | 80 | 1. The basic patch in the MS-10 which created a great explosion 81 | sound was pink noise modulating the cutoff frequency of the VCF 82 | [voltage-controlled filter] filtering white noise. 83 | 84 | 85 | Written by David R. Sky July 6, 2007. 86 | Minor bug fix, new defaults and license text update, SD Sept 2011 87 | http://www.shellworld.net/~davidsky/nyquist.htm 88 | Released under terms of the GNU Public License 89 | http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 90 | |# 91 | 92 | 93 | ; convert milliseconds to seconds 94 | (setf attack (* attack 0.001)) 95 | (setf decay (* decay 0.001)) 96 | 97 | ; convert sustain and clip-level percent values to linear values 98 | ; internally, normalize function normalizes to default 0.98 rather than 1.0, 99 | ; so clip-level is adjusted to 0.98 rather than 1.0 100 | (setf sustain (* sustain 0.01)) 101 | (setf clip-level (- 0.98 (* clip-level 0.0098))) 102 | 103 | 104 | ; function to normalize sound result 105 | ; returns sound normalized to level 106 | (defun normalize (sound &optional (level 0.98)) 107 | ; maximum 1 million samples to check peak level 108 | (setf max-level (peak sound 1000000)) 109 | (scale (/ level max-level) sound)) 110 | 111 | 112 | ; function to generate envelope 113 | ; returns envelope control signal 114 | (defun get-env (choice attack decay sustain dur) 115 | (cond 116 | ((= choice 0) ; fire envelope 117 | (pwl 0 0 attack 1.0 (- dur attack) 1.0 dur 0 dur) 118 | ) ; end fire envelope choice 119 | 120 | (t ; explosion envelope 121 | (mult ; multiplying two linear envelopes gives exponential envelope 122 | (pwl 0 0 attack 1 (+ attack decay) (sqrt sustain) dur 0 dur) 123 | (pwl 0 0 attack 1 (+ attack decay) (sqrt sustain) dur 0 dur) 124 | ) ; end mult 125 | ) ; end explosion envelope 126 | ) ; end cond 127 | ) ; end defun get-env 128 | 129 | 130 | ; generate fire or explosion sound 131 | (normalize 132 | (mult (get-env choice attack decay sustain dur) 133 | (clip ; clipping makes a 'meatier' sound 134 | (normalize 135 | (eq-lowshelf 136 | (lp (noise dur) 137 | (lowpass2 (mult (get-env choice attack decay sustain dur) cutoff (noise dur)) 138 | cutoff q)) 139 | freq boost) ; end eq-lowshelf 140 | ) ; end inner normalize 141 | clip-level) ; end clip 142 | ) ; end mult 143 | 0.95) ; end outer normalize 144 | -------------------------------------------------------------------------------- /Flangerl.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Flanger (linear)..." 5 | ;action "Applying linear flanger..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control pos "High frequency flange position" int "percent" 0 -100 200 9 | ;control decrease "Time decrease" real "ms" 5.0 0.1 200.0 10 | ;control wet "Wet level" int "percent" 50 1 99 11 | ;control sign "Wet: inverted or positive" int "0=inverted 1=positive" 1 0 1 12 | 13 | ; Linear flanger by David R. Sky, December 7, 2005 14 | ; Released under terms of the GNU Public License 15 | ; http://www.opensource.org/licenses/gpl-license.php 16 | 17 | ; pos is position in signal (percent)where high frequency portion 18 | ; of flange is heard - 50% means half-way through selection, 19 | ; flange reaches its peak. 20 | ; this value can be negative or above 100, 21 | ; in which case no peak flange effect is heard, 22 | ; the peak seems to be before or after the selection. 23 | 24 | ; decrease is time (ms) to reduce original selection 25 | ; to be mixed with dry signal, which creates the flange effect 26 | 27 | ; selection duration 28 | (setf dur (/ len *sound-srate*)) 29 | (setf wet (* 0.01 wet)) 30 | (setf dry (- 1.0 wet)) 31 | ; sign - whether wet signal is normal or inverted 32 | (setf sign (if (= sign 0) -1.0 1.0)) 33 | (setf pos (* 0.01 pos)) 34 | (setf decrease (* 0.001 decrease)) 35 | ; shrink is the new stretch-abs value of signal 36 | ; which is mixed back with original signal 37 | (setf shrink (/ (- dur decrease) dur)) 38 | 39 | ; normalize function 40 | (defun normalize (signal) 41 | (setf x (if (arrayp signal) 42 | ; stereo 43 | (s-max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)) 44 | ; mono 45 | (peak signal ny:all))) 46 | ; normalize signal 47 | (scale (/ 0.95 x) signal)) 48 | 49 | ; squish function to shrink dry sound 50 | (defun squish (sound shrink) 51 | (if (arrayp sound) 52 | (vector 53 | (force-srate 44100 (stretch-abs shrink (sound (aref sound 0)))) 54 | (force-srate 44100 (stretch-abs shrink (sound (aref sound 1))))) 55 | (force-srate 44100 (stretch-abs shrink (sound sound))))) 56 | 57 | (let (s1 s2 dry-offset wet-offset) 58 | (setq s1 (normalize s)) ; assign (normalize s) to a local variable s1 59 | (setq s nil) ; we don't need s any more so get rid of it 60 | (setq s2 (squish s1 shrink)) ; s2 - the shrunk signal 61 | 62 | ; linear flange function 63 | (defun l-flange (s1 s2 decrease pos dry wet) 64 | ; time offset of dry signal when pos<0 65 | (setf dry-offset (if (< pos 0) 66 | (* -1.0 pos decrease) 0)) 67 | ; time offset of wet when pos>=0 68 | (setf wet-offset (if (>= pos 0) 69 | (* pos decrease) 0)) 70 | 71 | (sum 72 | ; mixing dry signal... 73 | (sim(s-rest dry-offset) 74 | (at-abs dry-offset 75 | (cue (scale (* dry) s1)))) 76 | 77 | ; ...with wet 'squished' signal 78 | (sim(s-rest wet-offset) 79 | (at-abs wet-offset 80 | (cue (scale (* sign wet) s2)))))) 81 | 82 | 83 | ; performing linear flange if decrease is non-zero 84 | (if (= decrease 0) 85 | (format nil "Decrease value needs to be non-zero - ~% 86 | flange effect not produced. ~%") 87 | (normalize (l-flange s1 s2 decrease pos dry wet))) 88 | ) ; close let 89 | 90 | -------------------------------------------------------------------------------- /Isomod.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#ModulatorPlugin" 5 | ;name "IsoMod..." 6 | ;action "Modulating..." 7 | ;info "Isochronic Modulator by Steve Daulton. GPL v.2\nhttp://easyspacepro.com\n\n'Pulse Width' controls the length of each pulse.\n'Fade Time' adjusts the fade in/out speed of the pulses.\nThe modulation frequency (speed) and depth transform\ngradually from the initial settings to the final settings.\n\nPlug-in provided as an audio processing effect.\nThe author does not endorse or claim any relevance\nto the theory or practice of brainwave entrainment." 8 | 9 | ;control pw "Pulse Width [50%=Square]" real "%" 40 0 100 10 | ;control ft "Fade Time" real "%" 15 0 100 11 | ;control startf "Initial Modulation Frequency" real "Hz" 7 1 20 12 | ;control endf "Final Modulation Frequency" real "Hz" 2 1 20 13 | ;control starta "Initial Modulation Depth" int "%" 100 0 100 14 | ;control enda "Final Modulation Depth" int "%" 100 0 100 15 | 16 | (setq pw (/ pw 100.0)) 17 | (setq ft (/ ft 400.0)) 18 | (setq ft (* ft (min pw (- 1 pw)) 2)) 19 | 20 | ; set tremolo *waveform* 21 | (setq *waveform* 22 | (abs-env (list (pwl ft 1 (- pw ft) 1 (+ pw ft) -1 (- 1 ft) -1 1 0)(hz-to-step 1.0) t))) 23 | 24 | ;; Function to generate sweep tone 25 | (defun sweep (sf ef) 26 | (mult 0.5 (sum 1.0 (fmlfo (pwlv sf 1.0 ef) *waveform*)))) 27 | 28 | (let* ((starta (/ starta 100.0)) 29 | (enda (/ enda 100.0)) 30 | (wet (pwlv starta 1 enda)) 31 | (dry (sum 1 (mult wet -1)))) 32 | (mult s (sum dry (mult wet (sweep startf endf))))) 33 | -------------------------------------------------------------------------------- /Limiter.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#DynamicsPlugin" 5 | ;name "Limiter..." 6 | ;action "Limiting..." 7 | ;info "by Steve Daulton. (www.easyspacepro.com).\nReleased under GPL v2.\n" 8 | 9 | ;; limiter.ny by Steve Daulton November 2011 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 | 13 | ;control thresh "Limit to (dB)" real "" -3 -10 0 14 | ;control hold "Hold (ms)" real "" 10 1 50 15 | ;control makeup "Make-up Gain (0=No, 1=Yes)" int "" 1 0 1 16 | 17 | (setq hold (max 1.0 hold)) 18 | (setq thresh (min 0 thresh)) 19 | 20 | (defun limit (s-in thr m-up hld) 21 | (let* ((thr (db-to-linear thr)) 22 | (step (truncate (* (/ hld 3000.0) *sound-srate*))) 23 | (waveshape (snd-avg s-in (* 4 step) step op-peak)) 24 | (env (sum thr (mult thr (diff 1 waveshape)))) 25 | (env (clip env 1)) 26 | (offset (/ (* 3 step) *sound-srate*)) 27 | (initial (peak s-in (* 2 step))) 28 | (pause-lev (sum thr (mult thr (diff 1 initial)))) 29 | (pause-lev (clip pause-lev 0.9)) 30 | (pause (snd-const pause-lev 0 *sound-srate* offset))) 31 | (setq env 32 | (sim 33 | pause 34 | (at-abs offset (cue env)))) 35 | (if (= m-up 1) 36 | (mult (/ thr) s-in env) 37 | (mult s-in env)))) 38 | 39 | (multichan-expand #'limit (clip s 1) thresh makeup hold) 40 | -------------------------------------------------------------------------------- /MmbQV.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nyancat18/audacity-plugin/3931af4e9426203d1092093a2252cc0d228daa84/MmbQV.zip -------------------------------------------------------------------------------- /Mutron.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Mutron" 5 | ;action "Mutron..." 6 | ;info "Author: Steven Jones pluto@swbell.net\n\nGPL Sep 2004\n" 7 | ;control center "Center/Cutoff" real "Hz" 100 0 10000 8 | ;control depth "Depth" real "Hz" 5000 -10000 10000 9 | ;control bw "Band Width" int "Hz" 100 50 400 10 | ;control mode "Mode" int "0=Low 1=High 2=Notch 3=Band" 3 0 3 11 | 12 | ;; An envelope follower controlled filter loosely based on the mutron stomp 13 | ;; box. September 18 2004, Steven Jones, This software is released under the 14 | ;; terms of the GNU public license. 15 | 16 | 17 | 18 | ;; Round is required by rms function but apparently isn't included in the 19 | ;; Audacity version of Nyquist ? 20 | 21 | (defun round (x) (truncate (+ 0.5 x))) 22 | 23 | 24 | ;; Low pass filter with a bit of resonance. 25 | ;; 26 | (defun rslp (signal ctrl bw) 27 | (sum (lp signal ctrl) 28 | (reson signal ctrl bw 1))) 29 | 30 | 31 | 32 | ;; High pass filter with resonance 33 | ;; 34 | (defun rshp (signal ctrl bw) 35 | (sum (hp signal ctrl) 36 | (reson signal ctrl bw 1))) 37 | 38 | 39 | ;; The basic effect. 40 | ;; 41 | (defun mutron:core (signal center depth bw mode) 42 | (let ((ctrlsig (sum center (scale depth (rms signal))))) 43 | (cond ((= mode 0)(rslp signal ctrlsig bw)) 44 | ((= mode 1)(rshp signal ctrlsig bw)) 45 | ((= mode 2)(areson signal ctrlsig bw)) 46 | (t (reson signal ctrlsig bw 1))))) 47 | 48 | 49 | ;; Calls mutron:core twice, the first time so we can find peak amplitudes to 50 | ;; normalize. 51 | ;; 52 | (defun mutron (signal center depth bw mode) 53 | (let ((peakval (peak (mutron:core signal center depth bw mode) NY:ALL))) 54 | (scale (/ 1.0 peakval)(mutron:core signal center depth bw mode)))) 55 | 56 | 57 | 58 | ;; Call mutron on global signal s, mono and two channel sounds supported. 59 | ;; 60 | (if (arrayp s) 61 | (vector (mutron (aref s 0) center depth bw mode) 62 | (mutron (aref s 1) center depth bw mode)) 63 | (mutron s center depth bw mode )) 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | -------------------------------------------------------------------------------- /Noiseband.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type generate 4 | ;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin" 5 | ;name "Narrowband Noise" 6 | ;action "Generating Noise..." 7 | ;info "by Steve Daulton. (www.easyspacepro.com).\nReleased under GPL v2.\n" 8 | 9 | ;; By Steve Daulton (www.easyspacepro.com) Sept 2012 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 | ;; After nseband.ny by Steven Jones (pluto@swbell.net) 2004. 13 | ;; 14 | ;; For information about writing and modifying Nyquist plug-ins: 15 | ;; http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference 16 | 17 | ;control center "Center Frequency (Hz)" int "" 440 10 10000 18 | ;control bandwidth "Bandwidth (Hz)" int "" 50 1 1000 19 | ;control amplitude "Amplitude (0 - 1)" real "" 0.8 0 1 20 | ;control dur-m "Duration (minutes)" int "" 0 0 20 21 | ;control dur-s "Duration (seconds)" real "" 30 0 60 22 | ;control stereo "Stereo Output" choice "No,Yes" 0 23 | 24 | (setq err "") 25 | (setq duration (+ (* dur-m 60) dur-s)) 26 | (setq len (* duration *sound-srate*)) 27 | 28 | (defun errorcheck (x xmin xmax) 29 | (unless (or (> x xmax)(< x xmin)) t)) 30 | 31 | ;; Sanity check user input 32 | (unless (errorcheck center 10 10000) 33 | (setq err "Center Frequency out of range.\n")) 34 | (unless (errorcheck bandwidth 1 1000) 35 | (setq err (strcat err "Bandwidth out of range.\n"))) 36 | (when (< amplitude 0) 37 | (setq err (strcat err "Amplitude cannot be negative.\n"))) 38 | (unless (errorcheck duration 0 1260) 39 | (setq err (strcat err "Duration out of range.\n"))) 40 | 41 | ;; Generate noise band 42 | (defun noiseband (hz bw dur) 43 | (mult (sine (hz-to-step hz) dur) 44 | (lowpass4 (noise dur) bw))) 45 | 46 | (defun generate (hz bw dur gain) 47 | (let* ((noise (noiseband hz bw dur)) 48 | (peakval (peak noise ny:all))) 49 | (scale (/ gain peakval) noise))) 50 | 51 | ;; output debug information. 52 | (format t "Center Frequency: ~a Hz~%~ 53 | Bandwidth: ~a Hz~%~ 54 | Amplitude: ~a~%~ 55 | Duration: ~a:~a~%~ 56 | Number of audio channels: ~a" 57 | center 58 | bandwidth 59 | amplitude 60 | dur-m 61 | dur-s 62 | (1+ stereo)) 63 | 64 | (cond 65 | ((> (length err) 0) 66 | (format nil "Error.~%~a" err)) 67 | ((= stereo 1) 68 | (vector 69 | (generate center bandwidth duration amplitude) 70 | (generate center bandwidth duration amplitude))) 71 | (T (generate center bandwidth duration amplitude))) 72 | 73 | -------------------------------------------------------------------------------- /Noisegate.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#GatePlugin" 5 | ;name "Noise Gate" 6 | ;action "Gating audio..." 7 | ;info "by Steve Daulton (http://easyspacepro.com). Released under GPL v2.\n\n'VIEW HELP' is available in the 'Select Function' menu.\n" 8 | 9 | ;; Mono/Stereo Noise Gate - version 3 plug-in (requires Audacity 1.3 or later) 10 | ;; by Steve Daulton June 2011 11 | ;; Released under terms of the GNU General Public License version 2: 12 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 13 | 14 | 15 | ;control funct "Select Function" choice "Gate,Analyse Noise Level,View Help 1,View Help 2,View Help 3,View Tips" 0 16 | ;control stlink "Stereo Linking" choice "Link Stereo Tracks,Don't Link Stereo" 0 17 | ;control hpf "Apply Low-Cut filter" choice "No,10Hz 6dB/octave,20Hz 6dB/octave" 0 18 | ;control freq "Gate frequencies above" real "kHz" 0 0 10 19 | ;control level-red "Level reduction" real "dB" -12 -100 0 20 | ;control thresh "Gate threshold" real "dB" -48 -96 -6 21 | ;control attack "Attack/Decay" real "milliseconds" 250 10 1000 22 | 23 | 24 | ;; Error checking 25 | (setq err "") ; initialise error message 26 | (if (< funct 2)(progn ; don't bother for help screens 27 | (if (>= freq (/ *sound-srate* 2.0)) ; filter frequency greater than Nyquist 28 | (setq err (strcat err (format NIL 29 | "~%Gate filter (Gate frequencies above) must be less 30 | than half of the sample rate. 31 | Current setting of ~a Hz is too high. 32 | The selected audio has a sample rate of ~a Hz~%" 33 | freq *sound-srate*)))) 34 | (if (< LEN 100) ; 100 samples required 35 | (setq err (strcat err (format NIL 36 | "~%Insufficient audio selected. 37 | Please make the selection longer.~%")))))) 38 | 39 | 40 | (if (> (length err) 0) ; there are errors 41 | (strcat "ERROR!\n" err) ;show error messages 42 | (progn 43 | 44 | (setq help1 45 | (format NIL 46 | "OVERVIEW. \n 47 | Noise Gates may be used to cut the level of residual 48 | noise between sections of a recording. While this 49 | is essentially a very simple effect, this Noise Gate 50 | has a number of features and settings that allow it 51 | to be both effective and unobtrusive and well suited 52 | to most types of audio.\n 53 | FUNCTIONS: Select whether you want to Apply the Noise 54 | Gate, Test the noise level, or Read this help file.\n 55 | LINK STEREO will process both channels of a stereo 56 | track together and will only gate audio when both 57 | channels fall below the gate threshold.\n 58 | LOW CUT FILTER: Removes sub-sonic frequencies including 59 | DC off-set. DC corrected tracking is used whether 60 | or not the Low Cut Filter has been selected.\n 61 | View Help screen with the 'Debug' button for an 62 | output that can be copy/pasted.")) 63 | 64 | (setq help2 65 | (format NIL 66 | "GATE FREQUENCIES ABOVE: 67 | applies the gate only to frequencies above the set 68 | level. It may be useful for reducing tape hiss, but 69 | may also introduce a small amount of 'phase distortion'. 70 | Set below 0.1 kHz to switch this feature off.\n 71 | LEVEL REDUCTION: 72 | How much the gated sections are reduced in volume. 73 | Gating to absolute silence may sound unnatural and 74 | 'clinical'. The default -12dB will provide significant 75 | reduction in the audio level of gated sections while 76 | avoiding the 'gate slam' that is a common criticism 77 | of noise gates. If the Level Reduction is set 78 | below -96 dB the gate will 'shut' to absolute silence.\n 79 | GATE THRESHOLD: 80 | When the audio level drops below this threshold the 81 | gate will 'close' and the output level will be reduced. 82 | When the audio level rises above this threshold the 83 | gate will 'open' and the output will return to the 84 | same level as the input.")) 85 | 86 | (setq help3 87 | (format NIL 88 | "ATTACK/DECAY: How quickly the gate opens and closes. 89 | At the minimum (10 ms) the gate will fully open and 90 | close almost instantly as the audio level crosses 91 | the threshold. This could cause the gate to 'flutter' 92 | or 'snap'. At the maximum (1000 ms), the gate will 93 | begin to slowly open (fade-in) 1 second before the 94 | sound level exceeds the Threshold, and will gradually 95 | close (fade-out) after the sound level drops below 96 | the Threshold over a period of 1 second. Longer gate 97 | times (up to 10 seconds) may be achieved using text 98 | input rather than the slider.\n 99 | Suggested work-flow: 100 | 1) Analyse the noise level 101 | 2) Test the gate on a short selection with the Level 102 | Reduction set to -100 dB 103 | 3) Adjust the Gate Threshold if necessary and retest. 104 | 4) Adjust the Level Reduction slider and test. For 105 | the most 'transparent' results avoid setting the Level 106 | Reduction any lower than absolutely necessary. 107 | 5) When the settings are correct, apply to the entire song.")) 108 | 109 | (setq help4 110 | (format NIL 111 | "USAGE TIPS: 112 | The Gate level should be just above the level of the 113 | noise to be removed. If the gate threshold is too high, 114 | sound that should be retained will be cut. If the 115 | threshold is set too low, noise will be above the 116 | threshold and allowed through the gate. 117 | -6 dB (maximum) will cut even moderately loud sounds. 118 | -96 dB (minimum) will allow virtually all sound to 119 | pass un-gated.\n 120 | To find a suitable Gate Threshold setting, select a 121 | portion of the track that contains only background 122 | noise, then use the 'Analyse Noise Level' function.\n 123 | If the noise cut-off sounds too abrupt, increase the 124 | Attack/Decay setting. Longer settings are often better 125 | when a high degree of noise reduction is being performed.\n 126 | If the noise remaining after applying the effect is 127 | too geat, either set the Level Reduction lower or 128 | raise the Threshold.")) 129 | ;; End of Help screens 130 | 131 | (defun sanitise (var min max) 132 | (if (> var max) max 133 | (if (< var min) min var))) 134 | 135 | ; check and initialise variables 136 | (setq silence (if (> level-red -96) 0 1)) ; flag for silence 137 | (setq freq (* 1000.0 (sanitise freq 0 10))) ; convert from kHz to Hz 138 | (if (< freq 100)(setq freq 0)) ; low frequency settings do not work well 139 | (setq level-red (db-to-linear (sanitise level-red -96 0))) 140 | (setq thresh (db-to-linear (sanitise thresh -96 0))) 141 | (setq attack (sanitise (/ attack 1000.0) 0.001 10.0)) 142 | (setq look attack) 143 | (setq decay attack) ; this could be replaced with a slider if required 144 | 145 | ;; Apply low frequency HP filter. 146 | ;; Only first order filters are used as steeper filters introduce ringing. 147 | ;; To use higher order filters add the required options to the hpf control. 148 | (setq s 149 | (case hpf 150 | (1 (hp s 10)) 151 | (2 (hp s 20)) 152 | (3 (highpass2 s 10 0.7)) 153 | (4 (highpass2 s 20 0.7)) 154 | (5 (highpass4 s 10)) 155 | (6 (highpass4 s 20)) 156 | (7 (highpass6 s 10)) 157 | (8 (highpass6 s 20)) 158 | (9 (highpass8 s 10)) 159 | (10 (highpass8 s 20)) 160 | (T s))) 161 | 162 | (defun gate-follow (s-in mode) 163 | (setq s-in (hp s-in 20)) ; hp filter to remove DC off-set 164 | (if (and(= mode 0)(arrayp s-in)) ; stereo track set to mono/link 165 | (s-max (s-abs(aref s-in 0))(s-abs(aref s-in 1))) 166 | (s-abs s-in))) 167 | 168 | ; function to round number to specified decimal places and return as a string. 169 | (defun roundn (num places) 170 | (let* ((x (format NIL "~a" places)) 171 | (ff (strcat "%#1." x "f"))) 172 | (setq *float-format* ff) 173 | (format NIL "~a" num))) 174 | 175 | (defun show (s-in) 176 | ; find peak amplitude ignoring DC off-set 177 | (defun lev (s-test test-len) 178 | (let* 179 | ((pos (sum 1 (clip (sum s-test -1) 1))) 180 | (neg (sum -1 (clip (sum s-test 1) 1))) 181 | (lev (peak pos test-len)) 182 | (inv-lev (peak neg test-len))) 183 | (/ (+ lev inv-lev)2.0))) 184 | ; output text message 185 | (setq test-length (truncate (min LEN (/ *sound-srate* 2.0)))) 186 | (if (arrayp s-in) 187 | (Let* 188 | ((levL (linear-to-db (lev (aref s-in 0) test-length))) 189 | (levR (linear-to-db (lev (aref s-in 1) test-length))) 190 | (target (* 0.925 (max levL levR)))) ; suggest 7.5% above noise level 191 | (format NIL "Peak based on first ~a seconds:~% 192 | Left Channel ~a dB 193 | Right Channel ~a dB~% 194 | Suggested Threshold Setting ~a dB." 195 | (roundn (/ test-length *sound-srate*) 2) 196 | (roundn levL 2) 197 | (roundn levR 2) 198 | (roundn target 0))) 199 | (Let* 200 | ((levm (linear-to-db (lev s-in test-length))) 201 | (target (* 0.925 levm))) ; suggest 7.5% above noise level 202 | (format NIL "Peak based on first ~a seconds ~a dB 203 | ~%Suggested Threshold Setting ~a dB." 204 | (roundn (/ test-length *sound-srate*) 2) 205 | (roundn levm 2) 206 | (roundn target 0))))) 207 | 208 | 209 | (defun noisegate (s-in gatefollow lookahead risetime falltime floor threshold Hz) 210 | (defun gate-s (x) 211 | (mult x 212 | (/ (- 1 (* silence floor))) 213 | (diff (clip (gate gatefollow lookahead risetime falltime floor threshold) 1.0)(* silence floor)))) 214 | (if (> Hz 20) 215 | (sim 216 | (gate-s (highpass8 s-in Hz)) 217 | (lowpass8 s-in (* 0.91 Hz))) 218 | (gate-s s-in))) 219 | 220 | ;; Run program 221 | (case funct 222 | (1 (show s)) 223 | (2 (format T "~a" help1)(format nil "~a" help1)); print help file to display and debug 224 | (3 (format T "~a" help2)(format nil "~a" help2)) 225 | (4 (format T "~a" help3)(format nil "~a" help3)) 226 | (5 (format T "~a" help4)(format nil "~a" help4)) 227 | (T 228 | (setq gatefollow (gate-follow s stlink)) 229 | (multichan-expand #' noisegate s gatefollow look attack decay level-red thresh freq))))) 230 | -------------------------------------------------------------------------------- /Panrand.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Panning (random)..." 5 | ;action "Randomly panning..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control maxspeed "Maximum random panning speed" real "Hz" 0.2 0.01 10 9 | ;control maxwidth "Maximum stereo width" int "percent" 100 0 100 10 | 11 | ; Random Panning by David R. Sky September 2004 12 | ; updated December 30, 2005 13 | ; Released under terms of the GNU Public License 14 | ; http://www.opensource.org/licenses/gpl-license.php 15 | 16 | ; selection duration 17 | (setf dur (/ len *sound-srate*)) 18 | ; convert maxwidth integer to true percent 19 | (setf maxwidth (* 0.01 maxwidth)) 20 | 21 | (defun pan2 (sound where) 22 | (vector (mult (aref sound 0) (sum 1 (mult -1 where))) 23 | (mult (aref sound 1) where))) 24 | 25 | (let (signal x) 26 | (defun normalize (maxwidth signal) 27 | (setf x (peak signal ny:all)) 28 | (scale (/ maxwidth x) signal)) 29 | 30 | (setq signal (sum 0.5 (mult 0.5 31 | (normalize maxwidth (lowpass2 (noise) maxspeed))))) 32 | 33 | (pan2 34 | (vector (sum (aref s 0) (aref s 1)) (sum (aref s 1) (aref s 0))) 35 | signal) 36 | ) ; close let 37 | 38 | -------------------------------------------------------------------------------- /Parametric.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;name "Parametric EQ..." 5 | ;categories "http://lv2plug.in/ns/lv2core/#FilterPlugin" 6 | ;action "Applying parametric EQ..." 7 | ;info "by Steve Daulton and Bill Wharrie.\nReleased under GPL v2." 8 | 9 | ;; Parametric.ny by Steve Daulton and Bill Wharrie. Sept 2012 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 | ;; 13 | ;; For information about writing and modifying Nyquist plug-ins: 14 | ;; http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference 15 | 16 | ;control freq "Frequency (Hz)" real "" 1000 10 10000 17 | ;control width "Width" real "" 5 0 10 18 | ;control gain "Gain (dB)" real "" 0 -15 15 19 | 20 | ; width in approx 1/2 octaves 21 | (setq width (* width 0.5)) 22 | 23 | ;; print warning to debug window if freq too high 24 | (when (> freq (/ *sound-srate* 4.0)) 25 | (format t "Warning.\nMaximum filter frequency~%at ~a Hz sample rate is ~a Hz" 26 | *sound-srate* (/ *sound-srate* 4.0))) 27 | 28 | ;; Sanitize user input 29 | (defun sanitize (var minval maxval) 30 | (max (min var maxval) minval)) 31 | 32 | (setq freq (sanitize freq 10 (min 10000 (/ *sound-srate* 4.0)))) 33 | (setq width (sanitize width 0.1 10)) 34 | (setq gain (sanitize gain -15 15)) 35 | 36 | (if (= gain 0) 37 | (format nil "Nothing to do.~%Gain set to zero") 38 | (eq-band s freq gain width)) -------------------------------------------------------------------------------- /Peakfinder-rft.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type analyze 4 | ;name "Peak Finder rft..." 5 | ;action "Analysing the audio ..." 6 | ;control equal-levels "Place labels at" choice "first peak only,all equally loud peaks" 1 7 | ;control minimum-distance "Minimum Distance:[samples]" int "" 100 1 1000 8 | 9 | ;info "Peak Finder by edgar-rft@web.de" 10 | 11 | ; no garbage collector messages please 12 | (setf *gc-flag* nil) 13 | 14 | (if (< minimum-distance 1) 15 | (setf minimum-distance 1) 16 | (setf minimum-distance (truncate minimum-distance))) 17 | 18 | (defun make-peak-waveform (sound) 19 | (if (arrayp sound) 20 | (snd-maxv (snd-abs (aref s 0)) (snd-abs (aref s 1))) 21 | (snd-abs sound))) 22 | 23 | (defun add-label (time text) 24 | (setq label-list (cons (list time text) label-list))) 25 | 26 | (setf label-list nil) 27 | 28 | ;; The main working part of the program. 29 | (let* ((peak-waveform (make-peak-waveform s)) 30 | (maximum-peak 0.0) (last-peak 0.0)) 31 | (do ((n 0 (1+ n)) ; sample counter 32 | (current-sample (snd-fetch peak-waveform) ; init-form 33 | (setq vowel-sample ; loop-form 34 | (snd-fetch peak-waveform)))) 35 | ; Exit when we run out of samples, return the number of samples (n) 36 | ((not current-sample) n) 37 | (cond ((and (= equal-levels 1) 38 | (= current-sample maximum-peak) 39 | (> (- n last-peak) minimum-distance)) 40 | (format t "n: ~A, lp: ~A, n-lp: ~A m: ~A~%" n last-peak (- n last-peak) minimum-distance) 41 | (setf last-peak n) 42 | (add-label (/ n *sound-srate*) (format nil "~AdB" (linear-to-db current-sample)))) 43 | ((> current-sample maximum-peak) 44 | (setf maximum-peak current-sample) 45 | (setf last-peak n) 46 | (setf label-list `((,(/ n *sound-srate*) ,(format nil "~AdB" (linear-to-db current-sample))))))))) 47 | 48 | (format t "resulting list: ~S~%" label-list) 49 | 50 | ; If no peaks were found, return a message 51 | (if (null label-list) 52 | "No Peaks found." 53 | label-list) 54 | -------------------------------------------------------------------------------- /Pitch-detect.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type analyze 4 | ;categories "http://lv2plug.in/ns/lv2core#AnalyserPlugin" 5 | ;name "Pitch Detect..." 6 | ;action "Detecting Pitch..." 7 | ;info "by Steve Daulton (www.easyspacepro.com).\nReleased under GPL v2.\n" 8 | 9 | ;; pitch-detect.ny by Steve Daulton April 2013 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 12 | ;; 13 | ;; For information about writing and modifying Nyquist plug-ins: 14 | ;; http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference 15 | 16 | ;control range "Frequency range" choice "20 - 1000 Hz,100 - 2000 Hz,1 kHz - 10 kHz" 1 17 | ;control dur "Analyse first (seconds)" real "" 0.2 0.1 1 18 | 19 | ;; Set frequency ranges 20 | (case range 21 | (0 (psetq min-hz 20 max-hz 1000)) 22 | (1 (psetq min-hz 100 max-hz 2000)) 23 | (2 (psetq min-hz 1000 max-hz 10000)) 24 | ; Over 10 kHz is not accurate unless using a high sample rate 25 | (T (psetq min-hz 10000 max-hz (/ *sound-srate* 2)))) 26 | 27 | ;; Set range in steps (MIDI note numbers) 28 | (psetq minstep (hz-to-step min-hz) 29 | maxstep (hz-to-step max-hz)) 30 | 31 | ;; Initializations 32 | (setq dur (max 0.1 (min 1 dur))) ; sanitize duration 33 | (setq err "") ; initialise error message 34 | (setq f0 nil) ; initialise detected frequency 35 | (setq confidence 1) ; initialise confidence 36 | 37 | ;;; Error check 38 | (when (< (get-duration 1) 0.1) 39 | (setf err "Selection too short.")) 40 | 41 | ;;; MIDI note number to note name 42 | (defun notename (step) 43 | (let ((notenames (list "C" "C sharp" "D" "D sharp" "E" "F" 44 | "F sharp" "G" "G sharp" "A" "B flat" "B")) 45 | (step (round step))) 46 | (format nil "~a ~a" 47 | (nth (rem step 12) notenames) 48 | (truncate (/ (- step 12) 12))))) 49 | 50 | ;;; format output 51 | (defun prettyfrequency (val) 52 | (setq units 53 | (case range 54 | ((0 1) "Hz") 55 | (2 "kHz") 56 | (T (if (> val 1000) "kHz" "Hz")))) 57 | (setq val 58 | (cond 59 | ((<= range 1) (round val)) 60 | ((< val 10000) (setq *float-format* "%1.2f")(/ val 1000.0)) 61 | (T (setq *float-format* "%1.1f") (/ val 1000.0)))) 62 | (format nil "~a ~a" val units)) 63 | 64 | ;;; Apply YIN to first DUR seconds 65 | (defun getyin (sig dur) 66 | (let ((srate (min *sound-srate* (* 8 max-hz)))) 67 | (if (< srate *sound-srate*) 68 | (progn 69 | (setf sig 70 | (if (arrayp sig) 71 | (sum 72 | (extract-abs 0 dur (force-srate srate (aref sig 0))) 73 | (extract-abs 0 dur (force-srate srate (aref sig 1)))) 74 | (extract-abs 0 dur (force-srate srate sig)))) 75 | (setq srate (snd-srate sig))) 76 | (setf sig 77 | (if (arrayp sig) 78 | (sum 79 | (extract-abs 0 dur (aref sig 0)) 80 | (extract-abs 0 dur (aref sig 1))) 81 | (extract-abs 0 dur sig)))) 82 | (let ((stepsize (truncate (/ (* 4 srate) min-hz)))) 83 | (yin sig minstep maxstep stepsize)))) 84 | 85 | ;;; Find most confident frequency 86 | (defun bestguess (yin-out) 87 | (do ((step (snd-fetch (aref yin-out 0))(snd-fetch (aref yin-out 0))) 88 | (conf (snd-fetch (aref yin-out 1))(snd-fetch (aref yin-out 1)))) 89 | ((not step)) 90 | ;(format t "~a Hz \t ~a %~%" (step-to-hz step) (* 100 (- 1 conf))) 91 | (when (and (= conf conf) ; protect against nan 92 | (< conf confidence)) 93 | (setq confidence conf) 94 | (setq f0 step))) 95 | f0) 96 | 97 | 98 | (if (> (length err) 0) 99 | (format nil "Error.~%~a" err) 100 | (let ((f0 (bestguess (getyin s dur)))) 101 | (if f0 102 | (format nil 103 | "Pitch detection range: ~a~%~%~ 104 | Detected Note: ~a~%~ 105 | Detected Frequency: ~a.~%" 106 | (case range 107 | (0 "20 - 1000 Hz.") 108 | (1 "100 - 2000 Hz.") 109 | (T "1 kHz - 10 kHz.")) 110 | (notename f0) 111 | (prettyfrequency (round (step-to-hz f0)))) 112 | "Frequency cannot be detected.\nFrequency may be out of range."))) 113 | -------------------------------------------------------------------------------- /Pluck-hz.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 4 3 | ;type generate 4 | ;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin" 5 | ;name "Pluck (Hz)..." 6 | ;preview linear 7 | ;action "Generating pluck sound..." 8 | ;author "David R.Sky" 9 | ;copyright "Released under terms of the GNU General Public License version 2" 10 | 11 | ;; Released under terms of the GNU General Public License version 2: 12 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 13 | 14 | ;control freq "Pluck frequency (Hz)" float-text "" 261.626 10 10000 15 | ;control fade "Fade-out type" choice "abrupt,gradual" 0 16 | ;control dur "Duration [seconds]" float-text "" 1 0.1 30 17 | 18 | ; original pluck.ny modified by David R.Sky October 2007 19 | ; Modified by Steve Daulton 2016 20 | 21 | 22 | ; set final-amp for abrupt or gradual fade 23 | (setf final-amp (if (= fade 1) 0.001 0.000001)) 24 | 25 | ;; Get length of preview 26 | (setq pdur 27 | (if (get '*track* 'view) ;NIL if preview 28 | dur 29 | (get '*project* 'preview-duration))) 30 | 31 | (let* ((pluck-sound (snd-pluck *sound-srate* freq 0 dur final-amp)) 32 | (pluck-sound (extract-abs 0 pdur pluck-sound)) ; shorten if necessary for preview. 33 | (max-peak (peak pluck-sound ny:all))) 34 | ;; snd-pluck has a random element and will occasionally produce 35 | ;; zero amplitude at very high pitch settings. Avoid division by zero. 36 | (if (> max-peak 0) 37 | (scale (/ 0.8 max-peak) pluck-sound) 38 | pluck-sound)) 39 | -------------------------------------------------------------------------------- /Popmute.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#GatePlugin" 5 | ;name "Pop Mute" 6 | ;action "Muting pops..." 7 | ;info "by Steve Daulton (www.easyspacepro.com). GPL v2.\n\n" 8 | ;; popmute.ny by Steve Daulton. Sept 2011 9 | ;; Released under terms of the GNU General Public License version 2: 10 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 11 | ;; For Audacity 1.3.4 or later. 12 | 13 | ;control help "View Help" choice "No,Yes" 0 14 | ;control thresh "Threshold" real "dB" -6 -24 0 15 | ;control floor "Mute Level" real "dB" -24 -100 0 16 | ;control look "Look ahead" real "milliseconds" 10 1 100 17 | ;control rel "Release time" real "milliseconds" 10 1 1000 18 | 19 | 20 | ;;; Help screen 21 | (defun help () 22 | (setq help 23 | "Sounds (such as 'pops') that have a peak level above 24 | the 'Threshold' level will be lowered to a 'residual' 25 | level set by the 'Mute Level'. Be aware that ALL 26 | sounds above the threshold will be affected. 27 | Take care to avoid selecting loud sounds that should 28 | not be muted.\n 29 | The effect 'looks ahead' for peaks so that it can 30 | begin to lower the level of the sound smoothly a 31 | short time before the peak occurs. This is set by 32 | the 'Look ahead' time value.\n 33 | After the peak has passed, the level will smoothly 34 | return to normal over a period set by the 'Release 35 | time' setting.\n 36 | To attenuate brief clicks, time values of around 37 | 5 ms are likely to work well. For larger pops, 38 | values of 10 ms or more may sound better.\n 39 | For reverberant sounds such as hand claps, the 40 | 'Release time' may be increased so as to catch 41 | some of the reverberation.") 42 | (format t "~a" help) ; output to debug window 43 | (format nil "~a" help)) ; output to popup 44 | 45 | ;;; PopMute function 46 | (defun popmute (s-in) 47 | (let* ((s-abs (s-abs s-in)) 48 | (env (gate s-abs look atk rel floor thresh)) 49 | (env (diff env (1+ floor))) 50 | (env (s-min (mult -1 floor) env)) 51 | (env (clip env 1)) 52 | (env (mult -1 env))) 53 | (mult s-in env))) 54 | 55 | (if (= help 1) 56 | (help) ; show help 57 | (progn ; else run program 58 | (setq err "") ; initialise error message 59 | 60 | ;;; Error Checking 61 | (if (> thresh 0)(setq err (strcat err (format nil 62 | "Threshold (~a dB) must be below 0 dB.~%~%" thresh)))) 63 | (if (> floor 0)(setq err (strcat err (format nil 64 | "Mute Level (~a dB) must be below 0 dB.~%~%" floor)))) 65 | (if (< look 0)(setq err (strcat err (format nil 66 | "Look ahead (~a ms) must be positive.~%~%" look)))) 67 | (if (< rel 0)(setq err (strcat err (format nil 68 | "Release time (~a ms) must be positive.~%~%" rel)))) 69 | 70 | ;; If errors, print them 71 | (if (>(length err)0) 72 | (format nil "ERROR:~%~%~a" err) 73 | ;; else process 74 | (progn 75 | ;; scale input values 76 | (setq floor (db-to-linear floor)) 77 | (setq thresh (db-to-linear thresh)) 78 | (setq look (/ look 1000.0)) 79 | (setq rel (/ rel 1000.0)) 80 | (setq atk look) 81 | ;; pop mute all channels 82 | (multichan-expand #'popmute s))))) 83 | -------------------------------------------------------------------------------- /Pseudostereo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#SpatialPlugin" 5 | ;name "Pseudo-Stereo..." 6 | ;action "Creating pseudo-stereo..." 7 | ;info "By Steve Daulton (http://easyspacepro.com). Released under GPL v2.\n\nIf the result is too echoey, reduce the 'Delay factor' or 'Effect mix'.\n*** Requires a 2 channel track ***\n" 8 | 9 | ;; pseudostereo.ny by Steve Daulton June 2011. 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 12 | ;; version 0.1 June 2011 13 | ;; Requires Audacity 1.3 or later. 14 | 15 | ;control source "Select source channel" choice "Left (upper),Right (lower)" 0 16 | ;control df "Delay factor (%)" real "" 30 0 100 17 | ;control mix "Effect mix (%)" real "" 80 0 100 18 | 19 | 20 | (setq df (max 0 (min 1 (/ df 100.0)))) 21 | (setq mix (max 0 (min 1 (/ mix 100.0)))) 22 | 23 | ;; Spacialize Functions 24 | ;; create new Left channel 25 | (defun Lsplit (leftch) 26 | (let((f1 (lp leftch 300)) ;Common Sub below 300 27 | (f2 (feedback-delay(lp(hp leftch 300)600)(* df 0.2) 0)) ;Low on LEFT 300-600 28 | (f3 (lp(hp leftch 600)1200)) ;Common MID - 600-1200 29 | (f4 (feedback-delay(lp(hp leftch 1200)2400)(* df 0.08) 0)) ;High Mid on LEFT 1200-2400 30 | (f5 (hp leftch 2400))) ;Common Presence 31 | (sim f1 f2 f3 f4 f5))) ;mix sounds 32 | ;; create new Right channel 33 | (defun Rsplit (rightch) 34 | (let((f1 (lp rightch 300)) ;Common Sub below 300 35 | (f2 (feedback-delay(lp(hp rightch 300)600)(* df 0.14) 0)) ;Low Mid on RIGHT 300-600 Hz 36 | (f3 (lp(hp rightch 600)1200)) ;Common MID - 600-1200 37 | (f4 (feedback-delay(lp(hp rightch 1200)2400)(* df 0.06) 0)) ;Treble on RIGHT 1200-2400 38 | (f5 (hp rightch 2400))) ;Common Presence 39 | (sim f1 f2 f3 f4 f5))) ;mix sounds 40 | 41 | (if (arrayp s) ;test for stereo 42 | (progn 43 | (setf s (if (= source 0)(aref s 0)(aref s 1))) 44 | (if (< *sound-srate* 4800) 45 | (format nil "Error.\nTrack sample rate too low for Stereo Simulation.") 46 | (vector 47 | (sim (mult mix (Lsplit s))(mult (- 1 mix) s)) 48 | (sim (mult mix (Rsplit s))(mult (- 1 mix) s))))) 49 | (format nil "Error.\n2 channel (stereo) track required.")) 50 | -------------------------------------------------------------------------------- /RFT-Limiter-II.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Broadcast Limiter II" 5 | ;action "Broadcast Limiter II" 6 | ;info "" 7 | 8 | ;control vl "Threshold" real "" 1 0 1 9 | 10 | ; this plugin was written by edgar-rft@web.de and is released 11 | ; under terms of the GNU General Public License on February 17th 2006 12 | 13 | (if (< vl (db-to-linear -90)) 14 | (setq vl (db-to-linear -90))) 15 | 16 | (if (> vl 1.0) (setq vl 1.0)) 17 | 18 | (setf limit (linear-to-dB vl)) 19 | 20 | (scale (/ 1 (/ vl (db-to-linear 0.45))) (sim 21 | (scale 0.2 (clip s vl)) 22 | (scale 0.2 (clip s (db-to-linear (- limit 0.25)))) 23 | (scale 0.2 (clip s (db-to-linear (- limit 0.50)))) 24 | (scale 0.2 (clip s (db-to-linear (- limit 0.75)))) 25 | (scale 0.2 (clip s (db-to-linear (- limit 1.00)))) 26 | )) 27 | 28 | -------------------------------------------------------------------------------- /RFT-Limiter-III.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Broadcast Limiter III" 5 | ;action "Broadcast Limiter III" 6 | ;info "" 7 | 8 | ;control hd "Exciter" real "" 0 0 10 9 | ;control vl "Threshold" real "" 1 0 1 10 | 11 | ; this plugin was written by edgar-rft@web.de and is released 12 | ; under terms of the GNU General Public License on February 19th 2006 13 | 14 | (cond ((< vl (db-to-linear -90)) (setq vl (db-to-linear -90))) 15 | ((> vl 1.0) (setq vl 1.0))) 16 | 17 | (cond ((< hd 0.0) (setf hd 0.0)) 18 | ((> hd 10.0) (setf hd 10.0))) 19 | 20 | (setf limit (linear-to-dB vl)) 21 | 22 | (setf hd (db-to-linear (+ 1.0 (* 19.0 (/ hd 10.0))))) 23 | 24 | (clip (sim 25 | 26 | (scale hd (clip (hp s 10000) (/ 0.1 hd))) 27 | 28 | (lp (scale (/ 0.95 (/ vl (db-to-linear 0.45))) (sim 29 | (scale 0.2 (clip s vl)) 30 | (scale 0.2 (clip s (db-to-linear (- limit 0.25)))) 31 | (scale 0.2 (clip s (db-to-linear (- limit 0.50)))) 32 | (scale 0.2 (clip s (db-to-linear (- limit 0.75)))) 33 | (scale 0.2 (clip s (db-to-linear (- limit 1.00)))) 34 | )) 10000)) 0.99) 35 | 36 | -------------------------------------------------------------------------------- /Randomamp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Random Amplitude Modulation..." 5 | ;action "Playing around with your volume knob..." 6 | ;info "Random Amplitude Modulation by David R. Sky" 7 | 8 | ;control maxspeed "Max amp sweep speed" real "Hz" 0.50 0.01 20.00 9 | ;control factor "Amp sweep depth factor" int "factor" 80 1 300 10 | 11 | ;; Random amplitude Modulation by David R. Sky September 2004 12 | 13 | ;; Note the lower the frequency (maxspeed), 14 | ;; the higher factor must be to hear a result. 15 | ;; Factor can also be used to increase 16 | ;; or decrease the depth of the effect. 17 | ;; (Factor and maxspeed are inversely proportional.) 18 | 19 | (setf offset 0.5) 20 | 21 | (defun modulator (offset factor maxspeed) 22 | (sum offset (lp (mult factor (lp (noise) maxspeed)) (mult 0.5 maxspeed)))) 23 | 24 | (mult s (modulator offset factor maxspeed)) 25 | -------------------------------------------------------------------------------- /Repair_channel.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#UtilityPlugin" 5 | ;name "Repair Channel..." 6 | ;action "Patching audio..." 7 | ;info "By Steve Daulton (http://easyspacepro.com). Released under GPL v2.\n\nRepair damage to one channel of a stereo track\nby overwriting with audio from the other channel.\n\nSelect the damaged audio and allow additional space for cross-fading.\nStereo Simulation will often make repairs to stereo recordings less noticeable.\nThe upper channel is the Left channel." 8 | 9 | ;; repair-channel.ny by Steve Daulton. January 2010. 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 12 | 13 | ;; version 1.1 March 2011 14 | 15 | ;control chnselect "Which Channel to Repair" choice "Left Channel,Right Channel" 0 16 | ;control stereo "Stereo Simulation" choice "Enabled,Disabled" 0 17 | ;control fade "Cross-fade Time" real "[%]" 20.0 0.0 50.0 18 | 19 | (setq mode (+ chnselect (* 2(- 1 stereo)))) ;combine controls to give mode= 0,1,2 or 3. 20 | (setq fade (* (max(min fade 50)0) 0.01)) ;limit range and convert from % 21 | 22 | ;; Patch Functions 23 | ;; patch Left channel 24 | (defun patchleft (s-in time) 25 | (vector 26 | (sim 27 | (mult (pwl 0.0 1.0 time 0.0(diff 1.0 time) 0.0 1.0 1.0 1.0)(aref s-in 0)) ;fade out left channel 28 | (mult (pwl time 1.0(diff 1.0 time) 1.0 1.0)(aref s-in 1))) ;fade in right channel 29 | (aref s-in 1))) 30 | 31 | ;; patch Right channel 32 | (defun patchright (s-in time) 33 | (vector 34 | (aref s-in 0) 35 | (sim 36 | (mult(pwl 0.0 1.0 time 0.0(diff 1.0 time) 0.0 1.0 1.0 1.0)(aref s-in 1)) ;fade out right channel 37 | (mult(pwl time 1.0(diff 1.0 time) 1.0 1.0)(aref s-in 0))))) ;fade in left channel 38 | 39 | ;; patch Left channel - pseudo stereo 40 | (defun s-patchleft (s-in time) 41 | (if (< *sound-srate* 4800) 42 | (format nil "Error.\nTrack sample rate too low for Stereo Simulation.") 43 | (vector 44 | (sim 45 | (mult(pwl 0.0 1.0 time 0.0(diff 1.0 time) 0.0 1.0 1.0 1.0)(aref s-in 0)) ;fade out left channel 46 | (mult(pwl time 1.0(diff 1.0 time) 1.0 1.0)(Lsplit(aref s-in 1)))) ;fade in spacialized left channel from right channel 47 | (sim 48 | (mult(pwl 0.0 1.0 time 0.0(diff 1.0 time) 0.0 1.0 1.0 1.0)(aref s-in 1)) ;fade out original right channel 49 | (mult(pwl time 1.0(diff 1.0 time) 1.0 1.0)(Rsplit(aref s-in 1))))))) ;fade in spacialized right channel 50 | 51 | ;; patch Right channel - pseudo stereo 52 | (defun s-patchright (s-in time) 53 | (if (< *sound-srate* 4800) 54 | (format nil "Error.\nTrack sample rate too low for Stereo Simulation.") 55 | (vector 56 | (sim 57 | (mult(pwl 0.0 1.0 time 0.0(diff 1.0 time) 0.0 1.0 1.0 1.0)(aref s-in 0)) ;fade out original left channel 58 | (mult(pwl time 1.0(diff 1.0 time) 1.0 1.0)(Lsplit(aref s-in 0)))) ;fade in spacialized left channel 59 | (sim 60 | (mult(pwl 0.0 1.0 time 0.0(diff 1.0 time) 0.0 1.0 1.0 1.0)(aref s-in 1)) ;fade out right channel 61 | (mult(pwl time 1.0(diff 1.0 time) 1.0 1.0)(Rsplit(aref s-in 0))))))) ;fade in spacialized right channel from left channel 62 | 63 | ;; Spacialize Functions 64 | ;; create new Left channel 65 | (defun Lsplit (leftch) 66 | (let((f1 (lp leftch 300)) ;Common Sub below 300 67 | (f2 (feedback-delay(lp(hp leftch 300)600) 0.2 0)) ;Low on LEFT 300-600 68 | (f3 (lp(hp leftch 600)1200)) ;Common MID - 600-1200 69 | (f4 (feedback-delay(lp(hp leftch 1200)2400) 0.08 0)) ;High Mid on LEFT 1200-2400 70 | (f5 (hp leftch 2400))) ;Common Presence 71 | (sim f1 f2 f3 f4 f5))) ;mix sounds 72 | ;; create new Right channel 73 | (defun Rsplit (rightch) 74 | (let((f1 (lp rightch 300)) ;Common Sub below 300 75 | (f2 (feedback-delay(lp(hp rightch 300)600) 0.14 0)) ;Low Mid on RIGHT 300-600 Hz 76 | (f3 (lp(hp rightch 600)1200)) ;Common MID - 600-1200 77 | (f4 (feedback-delay(lp(hp rightch 1200)2400) 0.06 0)) ;Treble on RIGHT 1200-2400 78 | (f5 (hp rightch 2400))) ;Common Presence 79 | (sim f1 f2 f3 f4 f5))) ;mix sounds 80 | 81 | 82 | (control-srate-abs *sound-srate* ;calculate envelopes at audio sample rate to avoid click at end 83 | (if (arrayp s) ;test for stereo 84 | (case mode 85 | (0 (patchleft s fade)) ;patch left 86 | (1 (patchright s fade)) ;patch right 87 | (2 (s-patchleft s fade)) ;patch left with simulated stereo 88 | (3 (s-patchright s fade)) ;patch right with simulated stereo 89 | (T (format nil "Error.\nInvalid Selection."))) 90 | (format nil "Error.\n2 channel (stereo) track required."))) 91 | -------------------------------------------------------------------------------- /Resonant.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#HighpassPlugin" 5 | ;name "Resonant Filter..." 6 | ;action "Applying Filter..." 7 | ;info "by Steve Daulton (www.easyspacepro.com)\nReleased under GPL v2.\n" 8 | 9 | ;; resonant.ny by Steve Daulton June 2012 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 12 | 13 | ;control frequency "Filter frequency" real "Hz" 1000 1 20000 14 | ;control q "Resonance (Q)" real "" 10 0.1 100 15 | ;control type "Filter type" choice "Low Pass,High Pass,Band Pass" 0 16 | ;control amp "Output Gain" real "dB" -12 -60 0 17 | 18 | 19 | (setq amp (db-to-linear amp)) 20 | 21 | (cond 22 | ((> frequency (/ *sound-srate* 2)) 23 | (format nil "Filter frequency is set at ~a Hz but must not~%~ 24 | be greater than ~a Hz (half of the track sample rate)." 25 | frequency 26 | (truncate (/ *sound-srate* 2.0)))) 27 | ((<= frequency 1) 28 | (format nil "Filter frequency is set at ~a Hz~%but must be at least 1 Hz." 29 | frequency)) 30 | ((< q 0.1) 31 | (format nil "Q is set at ~a but must be at least 0.1." q)) 32 | ((= type 0)(mult amp (lowpass2 s frequency q))) 33 | ((= type 1)(mult amp (highpass2 s frequency q))) 34 | ((= type 2)(mult amp (highpass2 (lowpass2 s frequency q) frequency q)))) 35 | -------------------------------------------------------------------------------- /Ringmod.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Ring modulator..." 5 | ;action "Applying ring modulator..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ; Ring Modulator (multi-waveform) by David R. Sky September 18, 2004 9 | ; simplified January 2, 2006 10 | ; Audacity's tremolo effect, altered 11 | ; 12 | ; A ring modulator is just a tremolo effect, 13 | ; but instead of using an LFO to amplitude modulate audio, 14 | ; an audio signal is used. 15 | ; the result is a combination of the sum of and the difference 16 | ; between the two input signal frequencies 17 | ; e.g., two sine waves of 440 Hz and 660 hz produce a result of 18 | ; 220 Hz (difference) and 1100 Hz (sum). 19 | ; This plug-in also allows use of triangle, sawtooth and pulse waveforms, 20 | ; so the results are the sums and differences between the 21 | ; harmonics of the modulating signal 22 | ; and harmonics of the signal being modulated. 23 | 24 | ;control mod "Modulation frequency" real "Hz" 500.0 20.0 5000.0 25 | ;control amount "Amount" int "percent" 100 0 100 26 | ;control waveform "Waveform" int "0=sin 1=tri 2=saw 3=pulse" 0 0 3 27 | ;control bias "Pulse bias" int "percent" 0 -100 100 28 | 29 | ; If the pulse waveform is selected, bias is the pulse width. 30 | ; 0=square wave, higher numbers give wider positive signal, 31 | ; lower numbers give narrower positive signal 32 | 33 | (setf waveform (max 0 (min 3 (truncate waveform)))) 34 | 35 | (setf bias (if (= waveform 3) 36 | (mult 0.01 (max -100 (min bias 100))) bias)) 37 | 38 | (setf *table* (cond 39 | ((= waveform 0) *sine-table*) 40 | ((= waveform 1) *tri-table*) 41 | ((= waveform 2) *saw-table*))) 42 | 43 | (defun ring (s amount mod *table*) 44 | (mult (sum (const (- 1.0 (/ amount 200.0))) (scale (/ amount 200.0) 45 | (osc (hz-to-step mod) 1 *table*))) s)) 46 | 47 | ; pulse - pulse waveform modulator with variable pulse width (bias) 48 | (defun ring-pulse (s amount mod bias) 49 | (mult (sum (const (- 1.0 (/ amount 200.0))) (scale (/ amount 200.0) 50 | (osc-pulse mod bias))) s)) 51 | 52 | ; ring modulating 53 | (cond 54 | ; sine, tri or saw ring modulation 55 | ((< waveform 3) (ring s amount mod *table*)) 56 | ; pulse ring modulation 57 | ((= waveform 3) (ring-pulse s amount mod bias))) 58 | 59 | -------------------------------------------------------------------------------- /Shelf.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#FilterPlugin" 5 | ;name "Shelf Filter..." 6 | ;action "Filtering..." 7 | ;info "by Steve Daulton (www.easyspacepro.com).\nReleased under GPL v2.\n\nThe low-shelf filter uses the low frequency cut-off only.\nThe high-shelf filter uses the high frequency cut-off only.\nThe mid-band filter uses both.\n\n" 8 | 9 | ;; shelf.ny by Steve Daulton March 2008. Revised May 2012. 10 | ;; Released under terms of the GNU General Public License version 2: 11 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 12 | 13 | ;control filter-type "Filter type" choice "low-shelf,high-shelf,mid-band" 0 14 | ;control lf "Low frequency cut-off" real "Hz" 800 1 10000 15 | ;control hf "High frequency cut-off" real "kHz" 2 0.1 20.0 16 | ;control gain "Filter gain" real "dB" 0.0 -30 30 17 | 18 | ;;;;;;;;;;;;; Replacement Functions ;;;;;;;;; 19 | ;; Fix for Audacity 2.0 20 | 21 | (defun nyq:biquad (x b0 b1 b2 a0 a1 a2) 22 | (let ((a0r (/ 1.0 a0))) 23 | (snd-biquad x (* a0r b0) (* a0r b1) (* a0r b2) 24 | (* a0r a1) (* a0r a2) 0 0))) 25 | ;;;;;;;;;;; End of replacement functions ;;;;;;;;;;;;;;; 26 | 27 | (setq err "Error.\n") ; default error string 28 | 29 | (defun err1 (f-type fval) ; error string: Frequency too high. 30 | (setq units (if (equal f-type "Low") "Hz" "kHz")) 31 | (format nil "~a~%The track sample rate = ~a Hz.~%~a frequency cut-off = ~ 32 | ~a ~a.~%~a frequency cut-off frequency must be~%less than half the ~ 33 | track sample rate.~%" 34 | err *sound-srate* f-type fval units f-type)) 35 | 36 | (defun err2 (f-type) ; error string: Frequency too low. 37 | (format nil "~a~%~a frequency cut-off must be greater than 0 Hz.~%" 38 | err f-type)) 39 | 40 | (defun lf-err () ; test lf 41 | (cond 42 | ((> lf (/ *sound-srate* 2))(setq err (err1 "Low" lf))) 43 | ((<= lf 0) (setq err (err2 "Low"))))) 44 | 45 | (defun hf-err () ; test hf 46 | (cond 47 | ((> hf (/ *sound-srate* 2000))(setq err (err1 "High" hf))) 48 | ((<= hf 0) (setq err (err2 "High"))))) 49 | 50 | (defun mb-err () ; test lf and hf 51 | (let ((a (lf-err))(b (hf-err))) 52 | (if (or a b) t nil))) 53 | 54 | (defun err-check (type) ; error check 55 | (if (= gain 0) ; nothing to do 56 | (setq err (format nil "~a~%Filter gain set to zero.~%" err))) 57 | ;; check filter frequencies. True if error else nil 58 | (if (or (funcall type)(= gain 0)) t nil)) 59 | 60 | (defun mid-shelf (sig) 61 | "Combines high shelf and low shelf filters" 62 | (let ((hf (* hf 1000)) 63 | (invg (- gain)) 64 | (swap lf)) 65 | (when (> lf hf)(setq lf hf)(setq hf swap)) 66 | (scale (db-to-linear gain) 67 | (eq-highshelf 68 | (eq-lowshelf sig lf invg) 69 | hf invg)))) 70 | 71 | 72 | (case filter-type 73 | (0 (if (err-check #'lf-err) err (eq-lowshelf s lf gain))) 74 | (1 (if (err-check #'hf-err) err (eq-highshelf s (* hf 1000) gain))) 75 | (T (if (err-check #'mb-err) err (mid-shelf s)))) -------------------------------------------------------------------------------- /Tapesat.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;preview enabled 5 | ;categories "http://lv2plug.in/ns/lv2core/#DynamicsPlugin" 6 | ;name "Tape Saturation Limiter..." 7 | ;action "Processing peaks..." 8 | ;info "by Jvo Studer \nGPL v2.\n" 9 | 10 | ;; tapesat.ny by Jvo Studer, March 2011 11 | ;; based on 'Soft Clipper' by Steve Daulton. 12 | ;; Simulates Tape saturation using a soft clipping limiter. 13 | ;; Version 1.1 added 2Hz DC blocking highpass filter 14 | ;; Preview button and a few formatting and GUI tweaks 15 | ;; by Steve Daulton Oct 2015. 16 | ;; 17 | ;; Released under terms of the GNU General Public License version 2 18 | ;; http://www.gnu.org/licenses/gpl-2.0.html 19 | 20 | ;control thres "Saturation threshold" real "dB" -3 -6 -1 21 | ;control ratio "Limiting ratio [Soft]" real "[Hard]" 2 1 4 22 | ;control hfhz "High freq. saturation crossover" int "Hz" 4500 2000 9000 23 | ;control hfgain "High freq. saturation reduction" real "dB" -5 -8 -1 24 | ;control makeup "Auto make-up gain" choice "Off,On" 0 25 | 26 | (setq thresh (db-to-linear thres)) ; convert to linear threshold 27 | (setq hfhz (max (min hfhz (/ *sound-srate* 2.0)) 1000)) 28 | (setq ratio (max 1.01 ratio)) 29 | 30 | (if (> ratio 2.0) 31 | (setq ratio (* 3.09 ratio)) ; scale large ratio settings 32 | (setq ratio (* 6.18 (- ratio 1)))) ; scale small ratio settings 33 | (setq nratio (- ratio)) ; negative ratio 34 | (setq nthresh (- thresh)) ; negative threshold 35 | (setq iratio (/ ratio)) ; inverse ratio 36 | (setq inratio (/ nratio)) ; inverse negative ratio 37 | (setq clip (- thresh 1.0)) ; clipping region 38 | (setq clip (* ratio clip)) ; scaled by negative ratio 39 | (setq clip (* iratio (- 1.0 (exp clip)))) ; clipped amplitude of clipping region 40 | (setq amp (* 1.023 (+ thresh clip))) ; amplitude of clipped maximum + 0.2dB 41 | 42 | (defun sclimit (s-in mkup) 43 | (let* ((top (sum nthresh (s-max s-in thresh))) ; positive peak 44 | (top (mult nratio top)) ; scaled by negative ratio 45 | (bottom (sum thresh (s-min s-in nthresh))) ; negative peak 46 | (bottom (mult ratio bottom)) ; scaled by ratio 47 | (gain (if (= mkup 1) (/ amp) 1.0))) ; gain for make-up or 1.0 48 | (mult gain 49 | (sim 50 | (s-min thresh (s-max s-in nthresh)) ; middle bit 51 | (mult inratio (sum -1 (s-exp top))) 52 | (mult iratio (sum -1 (s-exp bottom))))))) 53 | 54 | (let* ((pregain (* -1 hfgain)) 55 | (sig (hp s 5.5)) 56 | (sig (eq-highshelf sig hfhz pregain 0.7)) 57 | (sig (multichan-expand #'sclimit sig makeup))) 58 | (hp (eq-highshelf sig hfhz hfgain 0.7) 59 | 2.0)) 60 | -------------------------------------------------------------------------------- /TrimExtend.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;type process 3 | ;version 3 4 | ;type process 5 | ;name "Trim Extend..." 6 | ;action "Editing track (please wait)..." 7 | ;info "By Steve Daulton (www.easyspacepro.com).\nReleased under GPL v2.\n" 8 | 9 | ;; TrimExtend.ny by Steve Daulton June 2012 10 | ;; based on trimtrack.ny by Steve Daulton May 2010. 11 | ;; Released under terms of the GNU General Public License version 2: 12 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 13 | ;; Requires Audacity 2.0.1 for Chains support. 14 | ;; Skip error messages may be useful if plug-in is used in chains. 15 | 16 | ;control t-units "Time units" choice "samples,milliseconds,seconds,minutes" 2 17 | ;control start-adjust "Trim / Extend start by" real "" 0 -100 100 18 | ;control end-adjust "Trim / Extend end by" real "" 0 -100 100 19 | ;control error-control "Error message control" choice "Show errors,Hide errors" 0 20 | 21 | ;; Save original control values. 22 | (setq start-adjust-control start-adjust) 23 | (setq end-adjust-control end-adjust) 24 | 25 | 26 | (defun convert (scale-factor) 27 | (setq start-adjust (* start-adjust scale-factor)) ; initial adjustment in seconds 28 | (setq end-adjust (* end-adjust scale-factor)) ; initial adjustment in seconds 29 | (setq dur-u (* (/ len *sound-srate*) (/ scale-factor))) ; duration in 'units' 30 | (case t-units 31 | (0 (setq units "samples") 32 | (setq unit-singular "sample")) 33 | (1 (setq units "milliseconds") 34 | (setq unit-singular "millisecond")) 35 | (2 (setq units "seconds") 36 | (setq unit-singular "second")) 37 | (3 (setq units "minutes") 38 | (setq unit-singular "minute")) 39 | (4 (setq units "hours") 40 | (setq unit-singular "hour")))) 41 | 42 | 43 | (defun trim (s-in start end) 44 | (let ((start (max 0 (- start))) 45 | (end (max 0 (- end)))) 46 | (extract-abs start (- (get-duration 1) end) (cue s-in)))) 47 | 48 | 49 | (defun adjust (sig) 50 | (when (or (< start-adjust 0)(< end-adjust 0)) 51 | (setf sig (trim sig start-adjust end-adjust))) 52 | (if (or (> start-adjust 0)(> end-adjust 0)) 53 | (let ((start-adjust (max start-adjust 0)) 54 | (end-adjust (max end-adjust 0)) 55 | (dur (/ (snd-length sig ny:all) *sound-srate*))) 56 | (setf *default-sound-srate* *sound-srate*) ; workaround bug 520 57 | (abs-env 58 | (sim (at 0 (cue (s-rest start-adjust))) 59 | (at start-adjust (cue sig)) 60 | (at (+ dur start-adjust)(cue (s-rest end-adjust)))))) 61 | sig)) 62 | 63 | 64 | ;; unit conversion 65 | (case t-units 66 | ;; provide scale factor. 67 | (0 (convert (/ *sound-srate*))) ; samples 68 | (1 (convert 0.001)) ; milliseconds 69 | (2 (convert 1.0)) ; seconds 70 | (3 (convert 60.0)) ; minutes 71 | (4 (convert 3600.0))) ; hours (not used in this version) 72 | 73 | 74 | ;; error check 75 | (cond 76 | ((and (= start-adjust 0)(= end-adjust 0)) 77 | (setq err (format nil "Warning~%Nothing to do."))) 78 | ((<= (+ start-adjust end-adjust (get-duration 1)) 0) 79 | (setq err (format nil "Error.~%You are attempting to delete a total of ~ 80 | ~a ~a~% from a ~a ~a selection." 81 | (abs (+ start-adjust-control end-adjust-control)) 82 | units dur-u unit-singular))) 83 | ((<= (+ start-adjust (get-duration 1)) 0) 84 | (setq err (format nil "Error.~%You are attempting to delete ~a ~a~%~ 85 | from the start of a ~a ~a selection." 86 | (abs start-adjust-control) 87 | units dur-u unit-singular))) 88 | ((<= (+ end-adjust (get-duration 1)) 0) 89 | (setq err (format nil "Error.~%You are attempting to delete ~a ~a~%~ 90 | from the end of a ~a ~a selection." 91 | (abs end-adjust-control) 92 | units dur-u unit-singular))) 93 | ((or (> start-adjust 43200)(> end-adjust 43200)) 94 | (setq err (format nil "Critical Warning.~%~ 95 | Unable to add more than 12 hours."))) 96 | ((> (+ (max start-adjust 0)(max end-adjust 0)(get-duration 1)) 43200) 97 | (setq err (format nil "Critical Warning.~%~ 98 | Total duration will be greater than 12 hours.")))) 99 | 100 | 101 | (if (boundp 'err) 102 | (if (= error-control 0) err (s-rest 0)) 103 | (multichan-expand #'adjust s)) 104 | -------------------------------------------------------------------------------- /Vari-tremolo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core#ModulatorPlugin" 5 | ;name "Variable Tremolo" 6 | ;action "Applying Tremolo..." 7 | ;info "by Steve Daulton. Released under terms of GPL Version 2\nhttp://audacity.easyspacepro.com\n\n'Starting phase' sets where to start tremolo in the waveform cycle.\nThe speed and depth of the tremolo oscilation can be set for the\nstart and the end of the selection.\nThe transition from initial settings to final settings is linear." 8 | 9 | ;control wave "Tremolo Shape" choice "sine,triangle,sawtooth,inverse sawtooth,square" 0 10 | ;control phase "Starting Phase" real "degrees" 90 0 360 11 | ;control startf "Initial Tremolo Frequency" real "Hz" 4 1 20 12 | ;control endf "Final Tremolo Frequency" real "Hz" 12 1 20 13 | ;control starta "Initial Tremolo Amount" int "%" 40 0 100 14 | ;control enda "Final Tremolo Amount" int "%" 40 0 100 15 | 16 | ; set tremolo *waveform* 17 | (setq *waveform* (cond 18 | ((= wave 0) ; sine 19 | *sine-table*) 20 | ((= wave 1) ; triangle 21 | *tri-table*) 22 | ((= wave 2) ; sawtooth 23 | (abs-env (list (pwl 0 -1 .995 1 1 -1 1) (hz-to-step 1.0) t))) 24 | ((= wave 3) ; inverse sawtooth 25 | (abs-env (list (pwl 0 1 .995 -1 1 1 1) (hz-to-step 1.0) t))) 26 | (t ; square 27 | (abs-env (list (pwl 0 1 .495 1 .5 -1 .995 -1 1 1 1) (hz-to-step 1.0) t))))) 28 | 29 | ;; Function to generate sweep tone 30 | (defun sweep (sf ef wf ph) 31 | (mult 0.5 (sum 1.0 (fmlfo (pwlv sf 1.0 ef) *waveform* phase)))) 32 | 33 | (let* ((starta (/ starta 100.0)) 34 | (enda (/ enda 100.0)) 35 | (wet (pwlv starta 1 enda)) 36 | (dry (sum 1 (mult wet -1)))) 37 | (mult s (sum dry (mult wet (sweep startf endf *waveform* phase))))) 38 | -------------------------------------------------------------------------------- /amplr.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Amplify left or right channel..." 5 | ;action "Amplifying one channel..." 6 | ;info "Amplify left or right channel by David R. Sky" 7 | 8 | ;control channel "Channel" int "0=left 1=right" 0 0 1 9 | ;control amp "Amplification" real "db" 0.0 -24.0 24.0 10 | 11 | ;; Amplify lef or right channel by David R. Sky, October 18, 2004 12 | ;; This plug-in was written specifically to help people who use 13 | ;; a screen reader, and people who prefer to use the keyboard 14 | ;; over a mouse. 15 | ;; 16 | ;; Select audio in Audacity, select left or right channel and 17 | ;; amout to amplify that track (in decibels). 18 | 19 | (if (= channel 0) 20 | 21 | (vector 22 | (mult (aref s 0) (db-to-linear amp)) 23 | (aref s 1)) 24 | 25 | (vector 26 | (aref s 0) 27 | (mult (aref s 1) (db-to-linear amp)))) 28 | 29 | -------------------------------------------------------------------------------- /anal: -------------------------------------------------------------------------------- 1 | http://old.audacityteam.org/nyquist/equalabl.ny 2 | http://old.audacityteam.org/nyquist/duration.ny 3 | -------------------------------------------------------------------------------- /bbdtone.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Bouncing ball delay with Tone Shift..." 5 | ;action "Applying bouncing ball Delay with Tone Shift..." 6 | ;info "Bouncing ball delay with Tone Shift by David R. Sky" 7 | 8 | ;control decay "Decay amount" real "dB" 0.00 0.00 5.00 9 | ;control delay "Delay time" real "seconds" 0.03 0.01 1.00 10 | ;control count "Number of bounces" int "times" 15 1 100 11 | ;control toneshift1 "Tone shift (whole)" int "semitones" 1 -24 24 12 | ;control toneshift2 "Tone shift (cents)" int "cents" 0 -100 100 13 | 14 | ;; The first delay will be 15 | ;; delay time * count, 16 | ;; speeding up to delay time... like a bouncing ball. 17 | ;; With each bounce, the audio is tone shifted. 18 | 19 | (setf toneshift (sum toneshift1 (mult toneshift2 0.01))) 20 | (setf toneshift (expt 2.0 (/ toneshift 12.0))) 21 | (setf toneshift (/ 1.0 toneshift)) 22 | 23 | (defun change (s toneshift) 24 | (force-srate 44100 (stretch-abs toneshift (sound s)))) 25 | 26 | (defun bounces (s decay delay count) 27 | (if (= count 0) 28 | (cue s) 29 | (sim (cue s) 30 | (loud decay (at (mult delay count) (bounces (change s toneshift) 31 | decay delay (- count 1))))))) 32 | 33 | (stretch-abs 1 (bounces s (- 0 decay) delay count)) 34 | 35 | -------------------------------------------------------------------------------- /bouncingball.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Bouncing Ball Delay..." 5 | ;action "Performing bouncing ball delay..." 6 | ;info "Bouncing ball delay by David Sky" 7 | 8 | ;control decay "Decay amount" real "dB" 0.50 0.00 5.00 9 | ;control delay "Delay time" real "seconds" 0.05 0.01 1.00 10 | ;control count "Number of bounces" int "times" 15 1 100 11 | 12 | ;; Note: this effect will use up memory proportional to 13 | ;; delay * count, since that many samples must be buffered 14 | ;; before the first block is freed. 15 | 16 | ;; The first delay will be 17 | ;; delay time * count, 18 | ;; speeding up to delay time... like a bouncing ball. 19 | 20 | (defun delays (s decay delay count) 21 | (if (= count 0) 22 | (cue s) 23 | (sim (cue s) 24 | (loud decay (at (mult delay count) (delays s decay delay (- count 1))))))) 25 | (stretch-abs 1 (delays s (- 0 decay) delay count)) 26 | -------------------------------------------------------------------------------- /buttrfly.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Stereo Butterfly..." 5 | ;action "Stereo Butterfly is choreographing your audio..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public license" 7 | 8 | ;control width "Stereo width" real "width" 1.0 -1.0 1.0 9 | 10 | ; Stereo Butterfly (static) 11 | ; by David R. Sky, September 10, 2004 12 | ; Released under terms of the GNU Public License 13 | ; http://www.opensource.org/licenses/gpl-license.php 14 | 15 | ; like a butterfly's wings at rest 16 | ; 1.0 is wings wide open (full stereo) 17 | ; 0.0 is wings fully closed (audio sounds mono) 18 | ; -1.0 butterfly has totally flipped, wings wide open 19 | ; (left channel is fully flipped with right and vice versa) 20 | 21 | ; make sure width is between -1 and 1 inclusive 22 | (setf width (min (max width -1.0) 1.0)) 23 | 24 | (defun butterfly (sound width) 25 | (vector 26 | ; left channel 27 | (sum (mult (aref sound 0) (sum width 1) 0.5) 28 | (mult (aref sound 1) (sum width -1) -0.5)) 29 | ; right channel 30 | (sum (mult (aref sound 1) (sum width 1) 0.5)(mult (aref sound 0) (sum width -1) -0.5)))) 31 | 32 | (butterfly s width) 33 | 34 | -------------------------------------------------------------------------------- /buttrlfo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Stereo Butterfly (LFO)..." 5 | ;action "Stereo Butterfly is choreographing your audio..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control f "LFO frequency" real "Hz" 0.20 0.01 20.00 9 | ;control width1 "Stereo width from..." real "width1" -1.00 -1.00 1.00 10 | ;control width2 "to..." real "width2" 1.00 -1.00 1.00 11 | 12 | ; Stereo Butterfly (LFO) 13 | ; by David R. Sky, September 13, 2004 14 | ; simplified December 27, 2005 15 | ; Released under terms of the GNU Public License 16 | ; http://www.opensource.org/licenses/gpl-license.php 17 | ; like a butterfly's fluttering wings 18 | ; 1.00 is wings wide open (full stereo) 19 | ; 0 is wings fully closed (audio sounds mono) 20 | ; -1.00 butterfly has totally flipped, wings wide open 21 | ; (left channel is fully flipped with right and vice versa) 22 | ; and the LFO keeps changing the stereo width 23 | 24 | ; make sure width1 & width2 are between -1 and 1 inclusive 25 | (setf width1 (min (max width1 -1) 1)) 26 | (setf width2 (min (max width2 -1) 1)) 27 | 28 | ; calculate min and max widths 29 | ; and assign to w1 and w2 30 | ; w1 becomes less then or equal to w2 31 | (setf w1 (min width1 width2)) 32 | (setf w2 (max width1 width2)) 33 | 34 | ; calculate spread factor: how much to multiply LFO signal 35 | ; (w1-w2)/2 36 | (setf spreadfactor (mult 0.5 (diff w1 w2))) 37 | 38 | ; Calculate offset: new center of LFO signal 39 | ; (w1+w2)/2 40 | (setf offset (mult 0.5 (sum w1 w2))) 41 | 42 | (defun butterfly (sound width) 43 | (vector 44 | ; left channel 45 | (sum (mult (aref sound 0) (sum width 1) 0.5) 46 | (mult (aref sound 1) (sum width -1) -0.5)) 47 | ; right channel 48 | (sum (mult (aref sound 1) (sum width 1) 0.5) 49 | (mult (aref sound 0) (sum width -1) -0.5)))) 50 | 51 | (butterfly s (sum offset (mult spreadfactor (lfo f)))) 52 | -------------------------------------------------------------------------------- /buttrramp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Stereo Butterfly (ramp)..." 5 | ;action "Stereo Butterfly is choreographing your audio..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control spread1 "Spread stereo from..." real "spread1" 0.00 -1.00 1.00 9 | ;control spread2 "to..." real "spread2" 1.00 -1.00 1.00 10 | 11 | ; Stereo Butterfly (ramp) 12 | ; by David R. Sky, September 25, 2004 13 | ; updated (greatly simplified) December 27, 2005 14 | ; Released under terms of the GNU Public License 15 | ; http://www.opensource.org/licenses/gpl-license.php 16 | ; Third in the Stereo Butterfly series 17 | ; like a butterfly's wings 18 | ; opening or closing from one position to another 19 | ; 1.0 is wings wide open (full stereo) 20 | ; 0.0 is wings closed (audio sounds mono) 21 | ; -1.0 butterfly has totally flipped, wings wide open 22 | ; (left channel is fully flipped with right and vice versa) 23 | ; and the ramp changes the stereo width 24 | ; over duration of the selection 25 | ; for instance, 0 to +1 means 26 | ; going from sounding mono to full stereo 27 | 28 | ; make sure spread 1 & 2 are both between -1 and 1 29 | (setf spread1 (min (max spread1 -1) 1)) 30 | (setf spread2 (min (max spread2 -1) 1)) 31 | 32 | (defun butterfly (sound width) 33 | (vector 34 | ; left channel 35 | (sum (mult (aref sound 0) (sum width 1) 0.5) 36 | (mult (aref sound 1) (sum width -1) -0.5)) 37 | ; right channel 38 | (sum (mult (aref sound 1) (sum width 1) 0.5) 39 | (mult (aref sound 0) (sum width -1) -0.5)))) 40 | 41 | (butterfly s (pwl 0 spread1 1 spread2 1)) 42 | -------------------------------------------------------------------------------- /buzz.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Buzz tone..." 5 | ;action "Generating Buzz tone..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control fm "Frequency or MIDI number" int "0=freq 1=MIDI" 1 0 1 9 | ;control freq "Frequency" real "hz" 110.0 20.0 5000.0 10 | ;control midi-note "MIDI note" int "MIDI number" 45 16 127 11 | ;control n "Number of harmonics" int "harmonics" 12 1 60 12 | ;control dur "buzz tone duration" real "seconds" 5.0 0.1 120.0 13 | ;control level "Volume" int "percent" 95 0 100 14 | 15 | ; Buzz Generator by David R. Sky September 17, 2004 16 | ; simplified January 6, 2006 17 | ; Released under terms of the GNU Public License 18 | ; http://www.opensource.org/licenses/gpl-license.php 19 | ; if note is 100 hz with 4 harmonics, 20 | ; the output will consist of 4 frequencies: 21 | ; 100, 200, 300 and 400 hz 22 | ; with equal amplitude. 23 | 24 | ; make sure note to send to the buzz function 25 | ; is a MIDI number 26 | (setf note (if (= fm 1) midi-note 27 | (hz-to-step freq))) 28 | 29 | ; from Audacity nyquist.lsp 30 | ; with broken 'avoid divide by zero' line 31 | ; fixed by Dominic Mazzoni 32 | (defun buzz (n pitch modulation) 33 | (let ((modulation-srate (snd-srate modulation)) 34 | (hz (step-to-hz (+ pitch (get-transpose))))) 35 | (cond ((< *SOUND-SRATE* modulation-srate) 36 | (format t "Warning: down-sampling modulation in buzz~%") 37 | (setf modulation (snd-down *SOUND-SRATE* modulation)))) 38 | (cond ((> hz (/ *SOUND-SRATE* 2)) 39 | (format t "Warning: buzz nominal frequency (~A hz) will alias at current sample rate (~A hz).\n" 40 | hz *SOUND-SRATE*))) 41 | (setf n (max n 1)) ; avoid divide by zero problem 42 | (scale-db (get-loud) 43 | (snd-buzz n ; number of harmonics 44 | *SOUND-SRATE* ; output sample rate 45 | hz ; output hz 46 | (local-to-global 0) ; starting time 47 | modulation)))) ; freq. modulation 48 | 49 | 50 | ; generating buzz tone 51 | (mult 0.01 level (pwl 0.002 1 (- dur 0.002) 1 dur) 52 | (buzz n note (s-rest dur))) 53 | -------------------------------------------------------------------------------- /centerpanremover.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Center Pan Remover..." 5 | ;action "Removing center-panned audio..." 6 | ;info "Center Pan Remover by David R. Sky\nReleased under terms of the GNU Public license" 7 | 8 | ;control bc "Invert band or channel" int "0=band 1=channel" 1 0 1 9 | ;control above "Remove frequencies above..." int "hz" 500 20 20000 10 | ;control below "Remove frequencies below..." int "hz" 2000 20 20000 11 | 12 | ; Center pan Remover by David R. Sky November 12, 2004 13 | ; Released under terms of the GNU Public License 14 | ; http://www.opensource.org/licenses/gpl-license.php 15 | ; Select either band of frequencies to remove 16 | ; (define frequency range), 17 | ; or invert one channel 18 | ; result is still stereo but sounds mono 19 | ; (both channels have been panned to center) 20 | 21 | (defun butterfly (sound width) 22 | (vector 23 | (sum (mult (aref sound 0) (sum width 1) 0.5) 24 | (mult (aref sound 1) (sum width -1) -0.5)) 25 | (sum (mult (aref sound 1) (sum width 1) 0.5) 26 | (mult (aref sound 0) (sum width -1) -0.5)))) 27 | 28 | (defun invertband (s above below) 29 | (vector 30 | (aref s 0) 31 | (sum (mult -1 (highpass2 (lowpass2 (aref s 1) below) above))) 32 | (highpass2 (lowpass2 (aref s 1) above) below))) 33 | 34 | (defun invertchan (s) 35 | (vector 36 | (aref s 0) 37 | (mult -1 (aref s 1)))) 38 | 39 | 40 | (cond 41 | ((= bc 0) ; invert band of frequencies 42 | (butterfly (invertband s above below) 0)) 43 | ((= bc 1) ; invert one channel 44 | (butterfly (invertchan s) 0))) 45 | 46 | -------------------------------------------------------------------------------- /chimesdelay.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Chimes delay (V2)..." 5 | ;action "Applying chimes delay..." 6 | ;info "Chimes delay by David R. Sky\nThanks to Steven Jones for Nyquist help\nIf chimes note list is blank, list is made from low to high notes\nReleased under terms of the GNU Public License" 7 | 8 | ;control chimeslist "Chimes note list" string "" "-24 -12 -5 0 4 7 12 14 19" 9 | ;control minnote "Minimum note" int "semitones" -12 -48 48 10 | ;control maxnote "Maximum note" int "semitones" 24 -48 48 11 | ;control maxdelay "Maximum delay time" real "seconds" 10.0 0.5 120.0 12 | ;control minvol "Minimum volume" int "%" 50.0 0.0 100.0 13 | ;control count "Number of chime delays" int "number" 20 1 100 14 | 15 | ; Chimes Delay by David R. Sky, January 30, 2005 16 | ; Version 2 plug-in, works in Audacity 1.2.3 and later 17 | ; Released under terms of the GNU Public License 18 | ; http://www.opensource.org/licenses/gpl-license.php 19 | ; 20 | ; Thanks very much to Steven Jones - 21 | ; his 'Harmonic Noise' generator plug-in 22 | ; is the source of Nyquist code 23 | ; to handle string input note lists. 24 | ; Thanks too for range function from math.lsp. 25 | ; 26 | ; For mono audio: 27 | ; generates random delay times, random volumes, random pitch changes 28 | ; (chooses randomly from user-defined or generated note list). 29 | ; For stereo audio: 30 | ; includes above plus random panning 31 | ; (best that audio is first panned to center for stereo). 32 | 33 | ; If input string is empty, 34 | ; generate list based on min and max notes. 35 | 36 | ; taking audio sample already loaded into Audacity 37 | (setq sample (if (arrayp s) 38 | (vector (aref s 0) (aref s 1)) s)) 39 | 40 | ; making sure min and max really are min and max 41 | (setf lownote (min minnote maxnote)) 42 | (setf highnote (max minnote maxnote)) 43 | 44 | ; code from Steven Jones 45 | ; verbatim from 'Harmonic Noise' generator plug-in 46 | ; convert input string to semitone-shift list 47 | (defun eval-string-to-list (symname str) 48 | (let ((form (strcat "(setq " symname " (list " str "))"))) 49 | (eval (read (make-string-input-stream form))))) 50 | 51 | ; evaluating chimes note list 52 | (eval-string-to-list "notelist" chimeslist) 53 | 54 | ; range function by Steven Jones: 55 | ; used only when string note list is empty 56 | (defun range (n start &optional (increment 1.0) (acc ())) 57 | (if (plusp n) 58 | (cons start (range (- n 1) (+ start increment) increment acc)) acc)) 59 | 60 | ; if no chimes list, make list using lownote and highnote values 61 | ; (if length of notelist is 0, 62 | ; generate list using range function) 63 | (setf n (+ 1 (- highnote lownote))) 64 | (setf notelist (if (= (length notelist) 0) 65 | (range n lownote) notelist)) 66 | 67 | ; random number generator 68 | (defun get-random (min max mult div) 69 | (setf min (* min mult)) 70 | (setf max (* max mult)) 71 | (setf rnd (/ (+ min (random (truncate max))) div))) 72 | 73 | ; panning function 74 | (defun pan4 (where s) 75 | (vector (mult (aref s 0) (sum 1 (mult -1 where))) 76 | (mult (aref s 1) where))) 77 | 78 | ; convert randomly-generated semitone step shift value 79 | ; to value for use by stretch-abs 80 | (defun convert (shift) 81 | (expt 2.0 (/ shift -12.0))) 82 | 83 | ; generating chime delays 84 | ; comments appear above the line they describe 85 | (if (arrayp s) 86 | ; generate stereo Chimes Delay 87 | (sim 88 | ; randomly change note of original audio 89 | ; but do not apply delay, volume or pan changes 90 | (force-srate 44100 (stretch-abs 91 | (convert (nth (random (length notelist)) notelist)) 92 | (vector (sound (aref sample 0)) (sound (aref sample 1))))) 93 | (simrep (i count) 94 | ; random pan 95 | (pan4 (get-random 0.0 1.0 51.0 50.0) 96 | ; random amplitude 97 | (mult (get-random minvol 101 1.0 100.0) 98 | ; random note shift 99 | (force-srate 44100 (stretch-abs 100 | (convert (nth (random (length notelist)) notelist)) 101 | (vector 102 | ; random delay 103 | (at-abs (get-random 0.0 maxdelay 1001.0 1000.0) 104 | (sound (aref sample 0))) 105 | (at-abs rnd 106 | (sound (aref sample 1)))))))))) 107 | ; end stereo Chimes Delay 108 | 109 | 110 | ; generate mono Chimes Delay 111 | (sim 112 | ; randomly change note of original audio 113 | ; but do not apply delay or volume changes 114 | (force-srate 44100 (stretch-abs 115 | (convert (nth (random (length notelist)) notelist)) 116 | (sound sample))) 117 | (simrep (i count) 118 | ; random delay 119 | (at-abs (get-random 0.0 maxdelay 1001.0 1000.0) 120 | ; random note shift 121 | (force-srate 44100 (stretch-abs 122 | (convert (nth (random (length notelist)) notelist)) 123 | (sound 124 | ; random amplitude 125 | (mult (get-random minvol 101 1.0 100.0) sample)))))))) 126 | ; end mono chimes delay 127 | -------------------------------------------------------------------------------- /comb.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Comb filter..." 5 | ;action "Applying Comb filter..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ; Comb filter by David R. Sky August 2004 9 | ; updated December 31 2005 with normalization function 10 | ; Released under terms of the GNU Public License 11 | ; http://www.opensource.org/licenses/gpl-license.php 12 | ; the higher 'decay' is, 13 | ; the more the comb filter resonates 14 | ; at frequencies that are integer multiples of f 15 | 16 | ;control f "Comb frequency" real "Hz" 440 20 5000 17 | ;control decay "Comb decay" real "decay" 0.025 0 0.1 18 | ;control norm-level "Normalization level" real "" 0.95 0.0 1.0 19 | 20 | ; normalize function 21 | (defun normalize (signal) 22 | (setf x (if (arrayp signal) 23 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)) 24 | (peak signal ny:all))) 25 | (scale (/ norm-level x) signal)) 26 | 27 | (normalize (comb s decay f)) 28 | 29 | -------------------------------------------------------------------------------- /cur: -------------------------------------------------------------------------------- 1 | http://old.audacityteam.org/nyquist/amplr.ny 2 | http://old.audacityteam.org/nyquist/centerpanremover.ny 3 | http://old.audacityteam.org/nyquist/fade-io.ny 4 | http://old.audacityteam.org/nyquist/pan.ny 5 | http://old.audacityteam.org/nyquist/panlfo2a.ny 6 | http://old.audacityteam.org/nyquist/panramp.ny 7 | http://old.audacityteam.org/nyquist/buttrfly.ny 8 | http://old.audacityteam.org/nyquist/buttrlfo.ny 9 | http://old.audacityteam.org/nyquist/buttrramp.ny 10 | http://old.audacityteam.org/nyquist/widener.ny 11 | http://old.audacityteam.org/nyquist/bouncingball.ny 12 | http://old.audacityteam.org/nyquist/bbdtone.ny 13 | http://old.audacityteam.org/nyquist/delayreb.ny 14 | http://old.audacityteam.org/nyquist/rbbdtone.ny 15 | http://old.audacityteam.org/nyquist/chimesdelay.ny 16 | http://old.audacityteam.org/nyquist/hpdelay.ny 17 | http://old.audacityteam.org/nyquist/lpdelay.ny 18 | http://old.audacityteam.org/nyquist/delaypit.ny 19 | http://old.audacityteam.org/nyquist/delayfli.ny 20 | http://old.audacityteam.org/nyquist/tonedelay.ny 21 | http://audacity.fuchsi.de/download/edgar/radio/limiter/RFT-Limiter-II.ny 22 | http://audacity.fuchsi.de/download/edgar/radio/limiter/RFT-Limiter-III.ny 23 | http://old.audacityteam.org/nyquist/hyperexp.ny 24 | http://old.audacityteam.org/nyquist/15bandEQ.ny 25 | http://old.audacityteam.org/nyquist/comb.ny 26 | http://old.audacityteam.org/nyquist/eqcustom.ny 27 | http://old.audacityteam.org/nyquist/highpass2.ny 28 | http://old.audacityteam.org/nyquist/hplfo.ny 29 | http://old.audacityteam.org/nyquist/lfohp.ny 30 | http://old.audacityteam.org/nyquist/lplfo.ny 31 | http://old.audacityteam.org/nyquist/lfolp.ny 32 | http://old.audacityteam.org/nyquist/lowpass2.ny 33 | http://old.audacityteam.org/nyquist/multibandeq.ny 34 | http://old.audacityteam.org/nyquist/notch.ny 35 | http://old.audacityteam.org/nyquist/randomlp.ny 36 | http://old.audacityteam.org/nyquist/10bandeq.ny 37 | http://old.audacityteam.org/nyquist/dualtapedecks.ny 38 | http://old.audacityteam.org/nyquist/randompitch.ny 39 | http://old.audacityteam.org/nyquist/seq2.ny 40 | http://old.audacityteam.org/nyquist/extract.ny 41 | http://old.audacityteam.org/nyquist/tempo.ny 42 | http://old.audacityteam.org/nyquist/timeshif.ny 43 | http://old.audacityteam.org/nyquist/turntablewarp-ms.ny 44 | -------------------------------------------------------------------------------- /delayfli.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Delay (Stereo Flip)..." 5 | ;action "Applying delay, flipping stereo..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control decay "Decay amount" real "dB" 3.0 0.0 24.0 9 | ;control delay "Delay time" real "seconds" 0.5 0.0 5.0 10 | ;control count "Number of delays" int "times" 10 1 100 11 | ;control norm-level "Normalization level" real "" 0.95 0.0 1.0 12 | 13 | ; Delay with Stereo Flip by David R. Sky 14 | ; December 2, 2004; updated January 3, 2006 15 | ; a delay effect which flips stereo channels with each delay 16 | ; Released under terms of the GNU Public License 17 | ; http://www.opensource.org/licenses/gpl-license.php 18 | ; Inspired by a sound effect in the opening track of 19 | ; Mike Oldfield's "Songs From Distant Earth" 20 | ; Thanks to Steven Jones for illustrating 21 | ; how to check for even/odd numbers 22 | 23 | ; set original and flipped audio samples 24 | (let (s:orig s:flip i x) 25 | (setq s:orig (vector (aref s 0) (aref s 1))) 26 | (setq s:flip (vector (aref s 1) (aref s 0))) 27 | (setq s (s-rest 0)) 28 | 29 | ; function to produce next delay 30 | (defun nextflip (i decay delay s s:orig s:flip) 31 | (setf pos (* i delay)) 32 | (setf vol (* -1 i decay)) 33 | (if (evenp i) ; if i is even, do not flip 34 | (sim (cue s) (at-abs pos (loud vol (cue s:orig)))) 35 | (sim (cue s) (at-abs pos (loud vol (cue s:flip)))))) 36 | 37 | ; normalize function 38 | (defun normalize (signal) 39 | (setf x 40 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all))) 41 | (scale (/ norm-level x) signal)) 42 | 43 | ; generating the delays 44 | (normalize (simrep (i (+ 1 count)) 45 | (nextflip i decay delay s s:orig s:flip))) 46 | ) ; close let 47 | -------------------------------------------------------------------------------- /delaypit.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Delay (Pitch change)..." 5 | ;action "Applying Delay with Pitch change..." 6 | ;info "by David R. sky\nReleased under terms of GNU Public License" 7 | 8 | ;control decay "Decay amount" real "dB" 0 0 24 9 | ;control delay "Delay time" real "seconds" 0.5 0.0 5.0 10 | ;control count "Number of echoes" int "times" 10 1 30 11 | ;control shift "Pitch change factor" real "shift" 1.1 1.001 3 12 | ;control md "Pitch: increase or decrease" int "0=increase 1=decrease" 0 0 1 13 | ;control norm-level "Normalization level" real "" 0.95 0.0 1.0 14 | 15 | ; delay with Pitch Change by David R. Sky 16 | ; updated January 4, 2006 to also work in stereo, 17 | ; also includes normalization 18 | ; note that pitch change is accompanied with change in duration 19 | 20 | ; setting stretch factor 21 | (setf shift (cond 22 | ((= md 0) (/ 1.0 shift)) 23 | ((= md 1) shift))) 24 | 25 | ; function to stretch audio 26 | (defun change (sound shift) 27 | (if (arrayp sound) 28 | (vector 29 | (force-srate 44100 (stretch-abs shift (sound (aref sound 0)))) 30 | (force-srate 44100 (stretch-abs shift (sound (aref sound 1))))) 31 | (force-srate 44100 (stretch-abs shift (sound sound))))) 32 | 33 | ; Roger Dannenberg's delay function, slightly altered 34 | (defun delays (s decay delay count shift) 35 | (if (= count 0) (cue s) 36 | (sim (cue s) 37 | (loud decay (at delay (delays (change s shift) decay delay (- count 1) shift)))))) 38 | 39 | ; normalize function 40 | (defun normalize (signal) 41 | (setf x (if (arrayp signal) 42 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)) 43 | (peak signal ny:all))) 44 | (scale (/ norm-level x) signal)) 45 | 46 | 47 | ; applying the effect 48 | (normalize (stretch-abs 1 (delays s (- 0 decay) delay count shift))) 49 | 50 | -------------------------------------------------------------------------------- /delayreb.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Delay (reverse bouncing ball)..." 5 | ;action "Applying reverse bouncing ball Delay..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public license" 7 | 8 | ;control decay "Decay amount" real "dB" 0.50 0.00 5.00 9 | ;control delay "Delay time" real "seconds" 0.05 0.01 1.00 10 | ;control count "Number of bounces" int "times" 15 1 100 11 | 12 | ; Reverse Bouncing Ball Delay by David R. Sky 13 | ; Based on delays by Roger B. Dannenberg. 14 | ; updated December 30, 2005 - includes normalization 15 | ; Released under terms of the GNU Public License 16 | ; http://www.opensource.org/licenses/gpl-license.php 17 | 18 | ; Note: this effect will use up memory proportional to 19 | ; delay * count, since that many samples must be buffered 20 | ; before the first block is freed. 21 | 22 | ; The first delay will be 23 | ; delay time, slowing down to delay time * count 24 | 25 | (setf revcount (sum count 1)) 26 | 27 | ; reverse bouncing ball delay function 28 | (defun revbounces (s decay delay count) 29 | (if (= count 0) 30 | (cue s) 31 | (sim (cue s) 32 | (loud decay (at (mult delay (- revcount count)) 33 | (revbounces s decay delay 34 | (- count 1 ))))))) 35 | 36 | ; normalize function 37 | (defun normalize (signal) 38 | (setf x (if (not (arrayp signal)) 39 | ; mono audio 40 | (peak signal ny:all) 41 | ; stereo audio 42 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)))) 43 | (scale (/ 0.95 x) signal)) 44 | 45 | (normalize (stretch-abs 1 (revbounces s (- 0 decay) delay count))) 46 | 47 | -------------------------------------------------------------------------------- /down.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | curl -s http://wiki.audacityteam.org/wiki/Nyquist_Effect_Plug-ins | grep -o 'http://[^"]*' | grep -F ".ny" >cur && wget -i cur 3 | 4 | curl -s http://wiki.audacityteam.org/wiki/Nyquist_Generate_Plug-ins | grep -o 'http://[^"]*' | grep -F ".ny" >gen && wget -i gen 5 | 6 | curl -s http://wiki.audacityteam.org/wiki/Nyquist_Analyze_Plug-ins | grep -o 'http://[^"]*' | grep -F ".ny" >anal && wget -i anal 7 | 8 | -------------------------------------------------------------------------------- /dtmfrand.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "DTMF (random)..." 5 | ;action "Generating random DTMF..." 6 | ;info "Random Dual Tone Multi-Frequency generator\nby David R. Sky, Dominic Mazzoni, Roger Dannenberg, W. Borgert\n\nEnter a string consisting of 0..9, A..D, *, #, a..z\n1209 1336 1477 1633\n697 1 2 3 A\n770 4 5 6 B\n852 7 8 9 C\n941 * 0 # D" 7 | 8 | ; make sure above info line is not word wrapped 9 | 10 | ;control tones "number of DTMF tones" int "" 20 1 120 11 | ;control mil "Include military DTMF tones A-D" int "0=no 1=yes" 0 0 1 12 | ;control sil "Include silent intervals" int "0=no 1=yes" 0 0 1 13 | ;control volume "Volume" real "linear" 0.3 0.001 1.000 14 | ;control tl "Tone length" real "seconds" 0.100 0.001 1.000 15 | ;control twist "High to low tone ratio" real "db" 0.0 0.0 4.0 16 | ;control sl "Post silence length" real "seconds" 0.100 0.000 1.000 17 | 18 | ; Random DTMF (Dual Tone Multi-Frequency) generator 19 | ; by David R. Sky, Dominic Mazzoni, Roger B. Dannenberg, W. Borgert 20 | ; 2004-09, 2005-04 21 | ; January 7, 2006 made randomized 22 | ; includes the 4 military 'numbers' 23 | ; A B C D, to the right of the numbers 24 | ; but since this plug-in generates random numbers 25 | ; to select which tones to generate, 26 | ; A-D are 12-15 27 | ; Released under terms of the GNU General Public License version 2 28 | ; http://www.gnu.org/copyleft/gpl.html 29 | 30 | ; Twist is the ratio of the high to low tone, in db 31 | ; used in real telephone applications. 32 | 33 | ; regular DTMF tones: 12 34 | ; including military DTMF: 16 35 | (setf limit (if (= mil 0) 12 16)) 36 | 37 | (defun random-dtmf (key volume tl twist sl) 38 | (setf low (if (member key 39 | '(1 2 3 12)) 697 40 | (if (member key 41 | '(4 5 6 13)) 770 42 | (if (member key 43 | '(7 8 9 14)) 852 44 | (if (member key 45 | '(0 10 11 15)) 941 0))))) 46 | (setf high (if (member key 47 | '(1 4 7 10)) 1209 48 | (if (member key 49 | '(2 5 8 0)) 1336 50 | (if (member key 51 | '(3 6 9 11)) 1477 52 | (if (member key 53 | '(12 13 14 15)) 1633 0))))) 54 | ; limit is 12 for regular DTMF, 16 including military 55 | ; so if random number>limit, generate silence 56 | (setf volume (if (< key limit) volume 0.0)) 57 | (seq 58 | (mult volume 59 | (pwl 0.002 1 (- tl 0.002) 1 tl) 60 | (sim 61 | (osc (hz-to-step high) tl) 62 | (loud (- 0 twist) (osc (hz-to-step low) tl)))) 63 | (s-rest sl))) 64 | 65 | (seqrep (i tones) 66 | (random-dtmf (random (+ limit sil)) volume tl twist sl)) 67 | 68 | -------------------------------------------------------------------------------- /dualtapedecks.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Dual Tape Decks..." 5 | ;action "Applying dual tape decks effect..." 6 | ;info "Dual Tape Decks by David R. Sky\nSimulating two out-of-synch tape decks" 7 | 8 | ;control modulation "LFO frequency" real "hz" 0.100 0.001 25.000 9 | ;control phase "Starting phase" real "degrees" 0 -180 180 10 | ;control phasediff "Phase difference" real "degrees" 180 0 360 11 | ;control depth "Depth" real "depth" 0.100 0.001 2.000 12 | 13 | ;; dual Tape Decks by David R. Sky September 26, 2004 14 | ;; Simulates two tape decks playing identical tapes, 15 | ;; but they are out-of-synch with each other. 16 | ;; Can produce some interesting stereo effects. 17 | ;; Speakers and headphones sound different. 18 | ;; Best suited to apply to stereo sounds. 19 | ;; 20 | 21 | ; maxdepth and offset do not seem to have 22 | ; any useful effect for this plug-in 23 | ; (that is, to need any control inputs) 24 | (setf maxdepth 0.5) 25 | (setf offset 0.25) 26 | 27 | (if (arrayp s) 28 | (vector 29 | (snd-tapv (aref s 0) offset (mult depth 30 | (lfo modulation 1.0 *sine-table* phase)) maxdepth) 31 | 32 | (snd-tapv (aref s 1) offset (mult depth 33 | (lfo modulation 1.0 *sine-table* (sum phase phasediff))) maxdepth) 34 | ) 35 | 36 | (snd-tapv s offset (mult depth 37 | (lfo modulation 1.0 *sine-table* phase)) maxdepth) 38 | ) 39 | 40 | -------------------------------------------------------------------------------- /duration.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type analyze 4 | ;name "Selection Duration..." 5 | ;action "Getting selection duration..." 6 | ;info "by David R. Sky, Steven Jones, Dominic Mazzoni\nReleased under terms of GNU Public License" 7 | 8 | ; Selection Duration by David R. Sky 9 | ; Code help from Steven jones, Dominic Mazzoni 10 | ; updated January 2, 2006 11 | ; useful for screen reader users 12 | ; Released under terms of the GNU Public license 13 | ; http://www.opensource.org/licenses/gpl-license.php 14 | 15 | ;control choice "Time or samples" int "0=time 1=samples" 0 0 1 16 | 17 | ; selection duration 18 | (setf dur (/ len *sound-srate*)) 19 | 20 | ; calculate minutes 21 | (setf minutes (truncate (/ dur 60))) 22 | (setf mins2secs (* minutes 60)) 23 | 24 | ; calculate seconds 25 | (setf seconds (- dur mins2secs)) 26 | 27 | (cond ((= choice 1) ; samples chosen 28 | 29 | (cond ((> len 999999999) ; >= 1 billion samples 30 | (setf len (/ len 1000000000.0)) 31 | (setf number 'billion)) 32 | 33 | ((> len 999999) ; >= 1 million samples 34 | (setf len (/ len 1000000.0)) 35 | (setf number 'million)) 36 | 37 | (t (setf number ""))) ; < 1 million samples 38 | 39 | (format nil "Selection duration is ~a ~a samples. ~%" len number)) 40 | 41 | ((= minutes 0) 42 | (format nil "Selection duration is ~a seconds ~%" seconds)) 43 | 44 | ((= minutes 1) 45 | (format nil "Selection duration is 1 minute ~a seconds ~%" 46 | seconds)) 47 | 48 | ((> minutes 1) 49 | (format nil "Selection duration is ~a minutes ~a seconds ~%" 50 | minutes seconds))) 51 | 52 | -------------------------------------------------------------------------------- /eqcustom.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Equalization (one band customizable)..." 5 | ;action "Applying EQ to the band..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control f "Center frequency" real "Hz" 440.0 20.0 20000.0 9 | ;control width "Band width in octaves" real "octaves" 1.0 0.1 5.0 10 | ;control gain "Gain" real "db" 0.0 -48.0 48.0 11 | ;control apply "Apply normalization" int "0=no 1=yes" 0 0 1 12 | ;control norm-level "Normalization level" real "linear" 0.95 0.0 1.0 13 | 14 | ; customizable One-band Equalization by David R. Sky 15 | ; updated January 6, 2006 16 | ; now includes normalization 17 | ; Released under terms of the GNU Public License 18 | ; http://www.opensource.org/licenses/gpl-license.php 19 | 20 | ; normalize function 21 | (defun normalize (signal norm-level) 22 | (setf x (if (not (arrayp signal)) 23 | ; mono audio 24 | (peak signal ny:all) 25 | ; stereo audio 26 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)))) 27 | (scale (/ norm-level x) signal)) 28 | 29 | 30 | ; applying EQ 31 | (if (= apply 0) 32 | (eq-band s f gain width) 33 | (normalize (eq-band s f gain width) norm-level)) 34 | 35 | -------------------------------------------------------------------------------- /equalabl.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type analyze 4 | ;name "Regular interval labels..." 5 | ;action "Generating equally-spaced labels to the label track..." 6 | ;info "equalabl.ny by David R. Sky www.shellworld.net/~davidsky/nyquist.htm \nNote: equalabl.ny does not over-write previous label track, it adds to it.\nChoosing to make final audio segment equal with others may slightly change your time setting.\nThanks to Alex S. Brown for example code from silencemarker.ny for setting labels in the label track.\nReleased under terms of the GNU Public License" 7 | 8 | ;control time "Label interval [seconds]" int "" 60 1 600 9 | ;control text "Label text" string "" "Label" 10 | ;control prepend "Prepend numbers to label text [0=no 1=yes]" int "" 1 0 1 11 | ;control include "Final label [0=exclude 1=include]" int "" 0 0 1 12 | ;control t-choice "Final audio segment duration equal with others [0=no 1=yes]" int "" 1 0 1 13 | 14 | ; Regular interval labels by David R. Sky, June 25, 2007. 15 | ; updated July 1 2007 to give an error message 16 | ; if the specified label interval time is greater than the selection duration. 17 | ; thanks Dominic Mazzoni for this suggestion 18 | ; http://www.shellworld.net/~davidsky/nyquist.htm 19 | ; Thanks to Sami Jumppanen from the Audacity users list for plug-in suggestion 20 | ; Thanks to Gale Andrews from Audacity devel list for improvement suggestion 21 | ; Thanks to Alex S. Brown's silencemarker.ny 22 | ; for example code of setting labels on the label track 23 | ; Released under terms of the GNU Public License 24 | ; http://www.opensource.org/licenses/gpl-license.php 25 | 26 | #| 27 | equalabl.ny: Regular interval labels 28 | 29 | thanks to Sami Jumppanen from the Audacity users group for 30 | suggesting this plug-in: adding labels to the label track at 31 | regular intervals. Thanks to leland Lucius from the Audacity development list 32 | for code feedback which 33 | helped wake me from late night programming! And thanks to Gale 34 | Andrews from the Audacity development list for suggesting 35 | improvements. 36 | 37 | Important note: equalabl.ny does not replace any previously-created 38 | label track, it adds to it. 39 | 40 | Start a new session of audacity. Load audio you want to add 41 | regularly-spaced labels to. Select audio [control+a]. Open analyze 42 | menu [alt+a]. Click on 'Regular interval labels'. use or change the 43 | following five default variablees: 44 | 45 | 1. Label interval [seconds] 46 | Default sixty seconds between labels, from one second to six 47 | hundred seconds [ten minutes]. 48 | 49 | 2. Label text 50 | The text that will appear in each label, default is "label". 51 | 52 | 3. Prepend numbers to label text [0=no 1=yes] 53 | Default is yes, so your labels would sequentially be "0label 54 | 1label..." and so on, using the default text. 55 | 56 | 4. Final label [0=exclude 1=include] 57 | For example, if your selection is sixty seconds long, and your 58 | label interval is ten seconds, the final label would be at the 59 | exact end of your selection. By default, the above variable is to 60 | exclude [not set] the final label. 61 | 62 | 5. Final audio segment duration equal with others [0=no 1=yes] 63 | Your label interval setting may result in the final segment of 64 | audio being unequal with the preceding ones. By default, the above 65 | variable is set to make all audio segments equal in duration with 66 | each other. This might make the label interval slightly different 67 | from your chosen one, depending on the size of the final audio 68 | segment. 69 | 70 | Note 71 | 72 | People using a screen reader can view the label track in Audacity 73 | 1.3.3 beta by opening the track menu [alt+t] and clicking on 'edit 74 | labels'. The labels and their time positions can be read by 75 | cursoring up and down and left-right. press alt+f4 to return to the 76 | main Audacity screen. 77 | 78 | Written by David R. Sky. 79 | http://www.shellworld.net/~davidsky/nyquist.htm 80 | released to the Audacity community June 25, 2007. 81 | Thanks to Alex S. Brown for example code from his silencemarker.ny 82 | plug-in for placing labels on the label track. 83 | Released under terms of the GNU Public License 84 | http://www.opensource.org/licenses/gpl-license.php 85 | |# 86 | 87 | ; get selection duration in seconds 88 | (setf dur (/ len *sound-srate*)) 89 | 90 | ; give an error message 91 | ; if label time interval is greater than selection duration 92 | (cond ; outermost cond 93 | ((> time dur) 94 | (format nil 95 | "Your requested label interval time of ~a seconds ~% 96 | is greater than the duration of your selected audio ~a seconds. ~% 97 | Please run this plug-in again using a smaller interval time. ~%" time dur)) 98 | 99 | (t ; label interval time is equal to or less than selection duration 100 | ; calculate number of labels in selection 101 | ; this includes label at start of selection 102 | ; which is label number 0 if numbers are prepended to label text 103 | ; if final label is unwanted, decrement number of labels by 1 104 | (setf labels (if (= include 0) 105 | (truncate (/ dur time)) 106 | (+ 1 (truncate (/ dur time))) 107 | ) ; end if 108 | ) ; end setf labels 109 | 110 | ; setf check-labels: number of labels if user includes last label 111 | ; this is for checking purposes in the [setf time ...] section of code 112 | (setf check-labels (+ 1 (truncate (/ dur time)))) 113 | 114 | 115 | ; function to calculate new time value 116 | ; if user value does not create equal duration final audio chunk 117 | ; returns new time value 118 | (defun new-time (time dur check-labels) 119 | ; calculate duration of last audio chunk 120 | (setf last-label (- dur (* time check-labels))) 121 | (if (< last-label (* time 0.5)) ; last chunk is less than 1/2 time 122 | (/ dur (- check-labels 1)) 123 | (/ dur check-labels) 124 | ) ; end if 125 | ) ; end defun new-time 126 | 127 | 128 | (setf time ; depending whether user wants specified time used 129 | ; or wants equal duration audio chunks including last chunk 130 | ; user time may create equal audio chunks even for last chunk 131 | (cond ; 1 132 | ((= t-choice 0) time) ; use user time value... 133 | 134 | (t ; ...otherwise calculate time for equal duration audio chunks 135 | (cond ; 2 136 | ; if user time value creates equal final audio segment duration anyway 137 | ; then use user interval 138 | ((= dur (* time (- check-labels 1))) time) 139 | 140 | ; user time value does not create equal duration audio chunks 141 | (t 142 | (new-time time dur check-labels) 143 | ) ; end t 144 | ) ; end cond 2 145 | ) ; end of calculation for equal duration audio chunks 146 | ) ; end cond1 147 | ) ; end setf time 148 | 149 | 150 | ; function to add labels to the label track 151 | ; from silencemarker.ny by Alex S. Brown 152 | (defun add-label (l-time l-text) 153 | (setq l (cons (list l-time l-text) l))) 154 | 155 | 156 | ; function to prepend label number before label text 157 | (defun prepend-number (i text) 158 | (format nil "~a~a" i text)) 159 | 160 | 161 | ; initialize blank label track 162 | (setq l nil) 163 | 164 | ; add the labels 165 | (dotimes (i labels) 166 | (if (= prepend 1) ; prepend numbers to label text? 167 | (add-label (* i time) (prepend-number i text)) ; yes 168 | (add-label (* i time) text) ; no 169 | ) ; end if 170 | ) ; end dotimes i 171 | 172 | ; return label track 173 | l 174 | 175 | ) ; close t of outermost cond 176 | ) ; end outermost cond 177 | -------------------------------------------------------------------------------- /extract.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Extract Audio..." 5 | ;action "Extracting audio..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control choice "Time or percent" int "0=time 1=%" 0 0 1 9 | ;control start "Start time" real "seconds" 0.0 0.0 600.0 10 | ;control end "End time" real "seconds" 1.0 0.0 600.0 11 | ;control start-% "Start percent" real "percent" 0.0 0.0 100.0 12 | ;control end-% "End percent" real "percent" 50.0 0.0 100.0 13 | 14 | ; Extract Audio by David R. Sky March 21, 2005 15 | ; updated January 2, 2006 16 | ; combines two plug-ins into one 17 | ; ensures start < end 18 | ; Released under terms of the GNU Public License 19 | ; http://www.opensource.org/licenses/gpl-license.php 20 | 21 | ; selection duration for calculating % 22 | (setf dur (/ len *sound-srate*)) 23 | 24 | ; set start and end times based on time or percent choice 25 | (setf start (if (= choice 0) 26 | start (* 0.01 start-% dur))) 27 | 28 | (setf end (if (= choice 0) 29 | end (* 0.01 end-% dur))) 30 | 31 | ; set open and close 32 | (setf open (min start end)) 33 | (setf close (max start end)) 34 | 35 | ; extracting audio 36 | (if (arrayp s) 37 | ; extract from stereo audio 38 | (vector (extract-abs open close (aref s 0)) 39 | (extract-abs open close (aref s 1))) 40 | ; extract from mono audio 41 | (extract-abs open close s)) 42 | 43 | -------------------------------------------------------------------------------- /fade-io.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Fade In and Out..." 5 | ;action "Fading in and out..." 6 | ;info "Fade In and Out by David R. Sky" 7 | 8 | ;control in "Fade in time" real "seconds" 1.00 0.00 30.00 9 | ;control out "Fade out time" real "seconds" 1.00 0.00 30.00 10 | 11 | ;; Fade In and Out by David R. Sky, October 22, 2004 12 | 13 | ; set duration of selection in seconds 14 | (setf dur (/ len *sound-srate*)) 15 | 16 | ; set in and out as percentages of duration 17 | (setf in (/ in dur)) 18 | (setf out (/ out dur)) 19 | 20 | ; set percentage of dur that has gone by for start of fade out 21 | (setf out (- 1.0 out)) 22 | 23 | ; PWL treats time as not seconds, but percentages of selection. 24 | 25 | (mult (pwl in 1 out 1 1 0) s) 26 | 27 | -------------------------------------------------------------------------------- /gen: -------------------------------------------------------------------------------- 1 | http://old.audacityteam.org/nyquist/buzz.ny 2 | http://old.audacityteam.org/nyquist/dtmfrand.ny 3 | http://old.audacityteam.org/nyquist/pwm.ny 4 | http://old.audacityteam.org/nyquist/harmonicnoise.ny 5 | http://old.audacityteam.org/nyquist/bitone2.ny 6 | http://old.audacityteam.org/nyquist/surf-lfo.ny 7 | http://old.audacityteam.org/nyquist/surf-oxy.ny 8 | http://old.audacityteam.org/nyquist/klstrbas.ny 9 | http://old.audacityteam.org/nyquist/rbell.ny 10 | http://old.audacityteam.org/nyquist/rndtone.ny 11 | http://old.audacityteam.org/nyquist/sq1.ny 12 | http://old.audacityteam.org/nyquist/generate.ny 13 | http://old.audacityteam.org/nyquist/tuning.ny 14 | http://old.audacityteam.org/nyquist/varsilence.ny 15 | -------------------------------------------------------------------------------- /generate.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type generate 4 | ;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin" 5 | ;name "Nyquist Generate Prompt..." 6 | ;action "Evaluating..." 7 | ;info "by Steve Daulton, Edgar Franke, Steven Jones and David R. Sky.\nReleased under GPL v2." 8 | 9 | ;; generate.ny, October 2010. 10 | ;; Idea by David R. Sky. 11 | ;; Original code by Steven Jones. 12 | ;; Multi-line update by Edgar Franke, November 2005. 13 | ;; Support for multiple expressions and display of 14 | ;; input in debug window by Steve Daulton, October 2010. 15 | ;; Released under terms of the GNU General Public License version 2: 16 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html . 17 | 18 | ;; These controls do not have default values so must have two spaces at the end of the line. 19 | ;control code1 "Line 1" string "" 20 | ;control code2 "Line 2" string "" 21 | ;control code3 "Line 3" string "" 22 | ;control code4 "Line 4" string "" 23 | ;control code5 "Line 5" string "" 24 | ;control code6 "Line 6" string "" 25 | ;control code7 "Line 7" string "" 26 | ;control code8 "Line 8" string "" 27 | ;control code9 "Line 9" string "" 28 | ;control code10 "Line 10" string "" 29 | 30 | (setf input-list (list code1 code2 code3 code4 code5 code6 code7 code8 code9 code10)) 31 | (setq input-string "") 32 | (dotimes (i 10) 33 | (if (> (length (nth i input-list)) 0) 34 | (setq input-string (strcat input-string "\n" (nth i input-list))))) 35 | 36 | ;; embed string in code block 37 | (setq nyquist-code (format NIL "(progn ~a )" input-string)) 38 | 39 | ;; output string to debug window 40 | (format T (strcat "Input Expression:~%" input-string "\n\nOutput:\n\n")) 41 | 42 | ;; evaluate string 43 | (eval (read (make-string-input-stream nyquist-code))) -------------------------------------------------------------------------------- /harmonicnoise.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type generate 4 | ;name "Harmonic Noise" 5 | ;action "Harmonic Noise..." 6 | ;info "Author: Steven Jones GPL Dec 2004\n\nHarmonic noise generates tones which are approximately harmonic. \nFor each note in MIDI note list an n-partial tone is produced. Each \npartial of each tone is actually a narrow band of noise centered at the \nideal harmonic frequency. MIDI notes may be specified either as integers \nor using the Nyquist constants 'g3' for third octave g, 'bf4' for fourth \noctave b flat, 'gs2' for second octave g sharp etc. Higher band width values \nresults in a more noisy tone. The final parameter selects between one of \ntwo harmonic distributions." 7 | ;control notes "MIDI Note List" string "" "c2 c3 ef4 g4 bf4 c5" 8 | ;control n "Number of Harmonics" int "" 8 1 32 9 | ;control dur "Duration" int "sec" 10 1 30 10 | ;control bw "Band Width" int "Hz" 2 1 1000 11 | ;control mode "Odd Harmonics Only" int "0=all 1=odd" 0 0 1 12 | 13 | 14 | 15 | 16 | ;; Format user's MIDI note list into a LISP expression and evaluate. The 17 | ;; result is assigned to symname. 18 | ;; 19 | (defun eval-string-to-list (symname str) 20 | (let ((form (strcat "(setq " symname " (list " str "))"))) 21 | (eval (read (make-string-input-stream form))))) 22 | 23 | 24 | ;; A noisy sine wave oscillator. Uses filtered noise to ring modulate sine 25 | ;; wave. 26 | ;; 27 | (defun nseosc (hz dur bw) 28 | (mult (osc (hz-to-step hz) dur) 29 | (lowpass4 (noise dur) bw))) 30 | 31 | 32 | ;; An n "harmonic" noisy oscillator. 33 | ;; 34 | (defun hnosc (pitch dur &key (bw 100)(n 8)(odd nil)) 35 | (let (hz ffn j) 36 | (setq hz (step-to-hz pitch)) 37 | (setq ffn (if odd 38 | #'(lambda (j)(* hz (+ (* j 2) 1))) 39 | #'(lambda (j)(* hz j)))) 40 | (simrep (i (truncate n)) 41 | (progn 42 | (setq j (+ i 1)) 43 | (scale (/ 1.0 j) 44 | (nseosc (funcall ffn j) dur bw)))))) 45 | 46 | 47 | 48 | 49 | ;; Evaluate user's note list and generate tone. 50 | ;; 51 | (eval-string-to-list "notelist" notes) 52 | (setq rawsig (simrep (i (length notelist)) 53 | (hnosc (nth i notelist) dur :bw bw :n n :odd (= mode 1)))) 54 | 55 | ;; Noramlize. 56 | ;; 57 | (setq peakamp (peak rawsig ny:all)) 58 | (scale (* 0.95 (/ 1.0 peakamp)) rawsig) 59 | 60 | -------------------------------------------------------------------------------- /highpass2.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "High Pass Filter with Q..." 5 | ;action "Applying High Pass Filter with Q..." 6 | ;info "High Pass Filter with Q by David R. Sky" 7 | 8 | ;control freq "Cutoff frequency" real "Hz" 1000 20 10000 9 | ;control q "Filter q (resonance)" real "q" 1.00 0.00 5.00 10 | 11 | ;; Highpass with Q, works on mono and stereo audio 12 | 13 | (if (arrayp s) 14 | (vector (highpass2 (aref s 0) freq q) 15 | (highpass2 (aref s 1) freq q)) 16 | 17 | (highpass2 s freq q)) 18 | -------------------------------------------------------------------------------- /hpdelay.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Delay with high pass filter..." 5 | ;action "Performing Delay with high pass filter..." 6 | ;info "Delay with high pass filter by David Sky" 7 | 8 | ;control decay "Decay amount" real "dB" 0.0 0.0 24.0 9 | ;control delay "Delay time" real "seconds" 0.5 0.0 5.0 10 | ;control count "Number of echos" int "times" 10 1 30 11 | ;control f "Start cutoff frequency" real "hz" 1000 100 5000 12 | ;control higher "Cutoff increase" real "octaves" 0.5 0.1 5.0 13 | 14 | ;; Using delays by Roger Dannenberg. 15 | ;; 16 | ;; Note: this effect will use up memory proportional to 17 | ;; delay * count, since that many samples must be buffered 18 | ;; before the first block is freed. 19 | ;; 20 | ;; With each delay, the cutoff frequency of the high pass 21 | ;; filter is increased. 22 | 23 | ; Make count an integer 24 | (truncate count) 25 | 26 | ; set upcount (which goes in direction 1 to count), 27 | ; reverse of count 28 | (setf upcount (sum count 1)) 29 | 30 | ; Set octave increase [oi] 31 | (setf oi (expt 2 higher)) 32 | 33 | (defun hpi (s f oi upcount count) 34 | (hp s (mult f (expt oi (- upcount count))))) 35 | 36 | (defun hpdelays (s decay delay count) 37 | (if (= count 0) (cue s) 38 | 39 | (sim (cue s) 40 | (loud decay (at delay (hpdelays (hpi s f oi upcount 41 | count) decay delay (- count 1))))))) 42 | 43 | (stretch-abs 1 (hpdelays s (- 0 decay) delay count)) 44 | -------------------------------------------------------------------------------- /hplfo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "High Pass Filter (LFO)..." 5 | ;action "Applying LFO high Pass Filter..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control f "LFO frequency" real "Hz" 0.20 0.00 20.00 9 | ;control lo-f "Lower cutoff frequency" int "hz" 160 20 20000 10 | ;control hi-f "Upper cutoff frequency" int "hz" 2560 20 20000 11 | ;control phase "LFO starting phase" int "degrees" 0 -180 180 12 | 13 | ; LFO High pass filter by David R. Sky 14 | ; October 14, 2004 15 | ; simplified December 30, 2005 16 | ; Released under terms of the GNU Public License 17 | ; http://www.opensource.org/licenses/gpl-license.php 18 | 19 | (setf factor (abs (- hi-f lo-f))) 20 | (setf center (/ factor 2.0)) 21 | 22 | (defun get-lfo (f phase factor center) 23 | (sum center (mult factor 24 | ; convert LFO sweep: -1 to +1 25 | ; to 0 to +1 26 | (sum 0.5 (mult 0.5 (lfo f 1.0 *sine-table* phase)))))) 27 | 28 | ; normalize function 29 | (defun normalize (signal) 30 | (setf x (if (arrayp signal) 31 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)) 32 | (peak signal ny:all))) 33 | (scale (/ 0.95 x) signal)) 34 | 35 | (normalize (hp s (get-lfo f phase factor center))) 36 | 37 | -------------------------------------------------------------------------------- /hyperexp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Hyperexp" 5 | ;action "Performing Effect: Hyperexp..." 6 | ;info "Author: Steven Jones pluto@swbell.net\n\nGPL Sep 2004\n 7 | ;control norm "Normalize" int "0=no 1=yes" 1 0 1 8 | 9 | 10 | (defun round (x) (truncate (+ 0.5 x))) 11 | 12 | (defun hyperexp:invert (signal) 13 | (let ((min 0.001)) 14 | (recip (sum min signal)))) 15 | 16 | (defun hyperexp:mono (signal) 17 | (let* ((env (hyperexp:invert (rms signal)))) 18 | (mult signal env))) 19 | 20 | (defun hyperexp (signal) 21 | (if (soundp signal) 22 | (hyperexp:mono signal) 23 | (vector (hyperexp:mono (aref signal 0)) 24 | (hyperexp:mono (aref signal 1)) 25 | ))) 26 | 27 | 28 | 29 | 30 | (defun peak2 (signal) 31 | (if (soundp signal) 32 | (peak signal NY:ALL) 33 | (max (peak (aref signal 0) NY:ALL) 34 | (peak (aref signal 1) NY:ALL) 35 | ))) 36 | 37 | 38 | (setq peakval 39 | (if norm 40 | (peak2 (hyperexp s)) 41 | 1)) 42 | 43 | (scale (/ 1.0 peakval) (hyperexp s)) 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /kU6Nf.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/nyancat18/audacity-plugin/3931af4e9426203d1092093a2252cc0d228daa84/kU6Nf.zip -------------------------------------------------------------------------------- /klstrbas.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "KLSTRBAS" 5 | ;action "Generating KLSTRBAS..." 6 | ;info "By Steven Jones pluto@swbell.net GNU 2004\nKLSTRBAS creates dense sounds by combining multiple waveforms.\nThe number of source components is 4 times the density value.\nThe frequency relationship between components is determined by\na combination of the detune and flange values. Specifically the\nnth component has a frequency p * ((1 + d/100 + 1/(10^f))^n)\nWhere p is the fundamental frequency, d is the detune parameter\nand f is the flange parameter.\n\nNote wave tables are not band limited so aliasing will occur at\nsufficiently high frequencies." 7 | ;control key "MIDI key" int "" 45 0 127 8 | ;control decay "Decay" float "sec" 2 0 30 9 | ;control fdecay "Fractional Decay" float "n/100 sec" 0 0 99 10 | ;control ni "Density" int "" 4 1 6 11 | ;control rf "Detune" int "" 0 0 99 12 | ;control flange "Flange" int "" 2 0 4 13 | ;control tab "Wave table" int "0=sine 1=tri 2=sqr 3=saw" 3 0 3 14 | 15 | 16 | 17 | 18 | 19 | (setq *sqr-table* (list (pwl 0 1 0.5 1 0.5 -1 1 -1 1) (hz-to-step 1) t)) 20 | 21 | (setq frq (hz-to-step key)) 22 | (setq decay (+ decay (* 0.01 fdecay))) 23 | (setq n (* ni 4)) 24 | (setq detune (- 4 flange)) 25 | (setq r (+ 1 (/ rf 100.0)(/ (expt 10.0 detune)))) 26 | (setq wavtab (cond ((= tab 0) *sine-table*) 27 | ((= tab 1) *tri-table*) 28 | ((= tab 2) *sqr-table*) 29 | (t *saw-table*))) 30 | 31 | 32 | 33 | (defun log2 (n) 34 | (/ (log (float n))(log 2.0))) 35 | 36 | (defun percussion (decay) 37 | (exp-dec 0 (expt 2.0 (- (log2 decay) 3)) decay)) 38 | 39 | 40 | (defun cluster-bass (frq decay n r tab ) 41 | (mult 42 | (simrep (i (truncate n)) 43 | (osc (hz-to-step (* frq (expt (float r) i))) decay tab)) 44 | (percussion decay))) 45 | 46 | 47 | 48 | 49 | (setq rawsig (cluster-bass frq decay n r wavtab)) 50 | (setq peakval (peak rawsig ny:all)) 51 | (scale (/ 1.0 peakval) rawsig) 52 | 53 | 54 | 55 | -------------------------------------------------------------------------------- /lfohp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "LFO High Pass Filter..." 5 | ;action "Applying LFO High Pass Filter..." 6 | ;info "LFO High pass filter by David R. Sky\nLFO depth/radius is how far (in octaves) from center f the filter sweeps" 7 | 8 | ;; LFO High pass filter by David R. Sky 9 | ;; october 14, 2004 10 | 11 | ;control center "Center cutoff frequency" real "Hz" 640 20 20000 12 | ;control depth "LFO depth (radius)" real "octaves" 1.0 0.0 10.0 13 | ;control f "LFO frequency" real "Hz" 0.20 0.00 20.00 14 | ;control phase "LFO starting phase" int "degrees" 0 -180 180 15 | 16 | ; basefreq: lowest cutoff frequency in the LFO sweep 17 | (setf basefreq (/ center (expt 2 depth))) 18 | 19 | ; addfreq: factor to add to basefreq as LFO sweeps 20 | (setf addfreq (mult basefreq (sum -1 (expt 2 depth)))) 21 | 22 | (hp s (sum basefreq (mult addfreq (sum (lfo f 1.0 *sine-table* 23 | phase) 1) 0.5))) 24 | 25 | -------------------------------------------------------------------------------- /lfolp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "LFO Low Pass Filter..." 5 | ;action "Applying LFO Low Pass Filter..." 6 | ;info "LFO low pass filter by David R. Sky.\nLFO depth/radius is how far (in octaves) from center f the filter sweeps" 7 | 8 | ;; LFO low pass filter by David R. Sky 9 | ;; October 14, 2004 10 | 11 | ;control center "Center cutoff frequency" real "Hz" 640 20 20000 12 | ;control depth "LFO depth (radius)" real "octaves" 1.0 0.0 10.0 13 | ;control f "LFO frequency" real "Hz" 0.20 0.00 20.00 14 | ;control phase "LFO starting phase" int "degrees" 0 -180 180 15 | 16 | ; basefreq: lowest cutoff frequency in the LFO sweep 17 | (setf basefreq (/ center (expt 2 depth))) 18 | 19 | ; addfreq: factor to add to basefreq as LFO sweeps 20 | (setf addfreq (mult basefreq (sum -1 (expt 2 depth)))) 21 | 22 | (lp s (sum basefreq (mult addfreq (sum (lfo f 1.0 *sine-table* 23 | phase) 1) 0.5))) 24 | 25 | -------------------------------------------------------------------------------- /lowpass2.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Low Pass Filter with Q..." 5 | ;action "Applying Low Pass Filter with Q..." 6 | ;info "Low Pass Filter with Q by David R. Sky" 7 | 8 | ;control freq "Cutoff frequency" real "Hz" 1000 20 10000 9 | ;control q "Filter q (resonance)" real "q" 1.00 0.00 5.00 10 | 11 | ;; Lowpass with q, works on mono and stereo audio 12 | 13 | (if (arrayp s) 14 | (vector (lowpass2 (aref s 0) freq q) 15 | (lowpass2 (aref s 1) freq q)) 16 | 17 | (lowpass2 s freq q)) 18 | -------------------------------------------------------------------------------- /lpdelay.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Delay (low pass filter)..." 5 | ;action "Performing Delay with low pass filter..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control decay "Decay amount" real "dB" 0.0 0.0 24.0 9 | ;control delay "Delay time" real "seconds" 0.5 0.0 5.0 10 | ;control count "Number of echos" int "times" 10 1 30 11 | ;control f "Start cutoff frequency" real "hz" 1000 100 20000 12 | ;control lower "Cutoff reduction" real "octaves" 0.5 0.1 5.0 13 | ;control norm-level "Normalization level" real "" 0.95 0.0 1.0 14 | 15 | ; Delay with low pass filter by David R. sky 16 | ; updated December 31, 2005 17 | ; Released under terms of the GNU Public License 18 | ; http://www.opensource.org/licenses/gpl-license.php 19 | ; This plug-in is result of a desire to create a delay effect 20 | ; heard in a popular Cher tune in the late 1990s or later. 21 | ; Uses delays by Roger Dannenberg. 22 | ; Note: this effect will use up memory proportional to 23 | ; delay * count, since that many samples must be buffered 24 | ; before the first block is freed. 25 | ; with each delay, the cutoff frequency of the lowpass 26 | ; filter is reduced for that delay. 27 | 28 | ; set upcount (which goes in direction 1 to count), 29 | ; reverse of count 30 | (setf upcount (+ count 1)) 31 | 32 | ; Set octave drop [od] 33 | (setf od (expt 2.0 lower)) 34 | 35 | ; calculate cutoff freq for each new delay 36 | (defun lpl (s f od upcount count) 37 | (lp s (/ f (expt od (- upcount count))))) 38 | 39 | ; normalize function 40 | (defun normalize (signal) 41 | (setf x (if (arrayp signal) 42 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)) 43 | (peak signal ny:all))) 44 | (scale (/ norm-level x) signal)) 45 | 46 | ; delay with lp filter function 47 | (defun lpdelays (s decay delay count) 48 | (if (= count 0) (cue s) 49 | (sim (cue s) 50 | (loud decay (at delay (lpdelays (lpl s f od upcount 51 | count) decay delay (- count 1))))))) 52 | 53 | (normalize (stretch-abs 1 (lpdelays s (- 0 decay) delay count))) 54 | 55 | -------------------------------------------------------------------------------- /lplfo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Low Pass Filter (LFO)..." 5 | ;action "Applying LFO Low Pass Filter..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | ;control f "LFO frequency" real "Hz" 0.20 0.00 20.00 9 | ;control lo-f "Lower cutoff frequency" int "hz" 160 20 20000 10 | ;control hi-f "Upper cutoff frequency" int "hz" 2560 20 20000 11 | ;control phase "LFO starting phase" int "degrees" 0 -180 180 12 | 13 | ; LFO low pass filter by David R. Sky 14 | ; October 14, 2004 15 | ; simplified December 30, 2005 16 | ; Released under terms of the GNU Public License 17 | ; http://www.opensource.org/licenses/gpl-license.php 18 | 19 | (setf factor (abs (- hi-f lo-f))) 20 | (setf center (/ factor 2.0)) 21 | 22 | (defun get-lfo (f phase factor center) 23 | (sum center (mult factor 24 | ; convert LFO sweep: -1 to +1 25 | ; to 0 to +1 26 | (sum 0.5 (mult 0.5 (lfo f 1.0 *sine-table* phase)))))) 27 | 28 | ; normalize function 29 | (defun normalize (signal) 30 | (setf x (if (arrayp signal) 31 | (max (peak (aref signal 0) ny:all) (peak (aref signal 1) ny:all)) 32 | (peak signal ny:all))) 33 | (scale (/ 0.95 x) signal)) 34 | 35 | (normalize (lp s (get-lfo f phase factor center))) 36 | 37 | -------------------------------------------------------------------------------- /multibandeq.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Multiband EQ..." 5 | ;action "Applying gain to one band..." 6 | ;info "Multiband EQ by David Sky" 7 | 8 | ;control band "Band number of (T)" int "band" 1 1 30 9 | ;control gain "Gain" real "db" 0.0 -24.0 24.0 10 | ;control bands "Total number of bands (T)" int "bands" 10 2 30 11 | 12 | ;; You can set the total number of bands (T) between 2 and 30. 13 | ;; Then you can choose the band number and apply gain to it 14 | ;; [between -24 and +24 db]. 15 | ;; If there are T bands (total number of bands), choose band from 1 to T. 16 | 17 | ; make sure bands and band are integers 18 | (truncate bands) 19 | (truncate band) 20 | 21 | ; This plug-in tests the following: 22 | 23 | ; if bands < 2, set bands to 2 24 | (setf bands (max 2 bands)) 25 | 26 | ; if bands > 30, set bands to 30 27 | (setf bands (min 30 bands)) 28 | 29 | ; if band < 1, set band to 1 30 | (setf band (max 1 band)) 31 | 32 | ; if band > bands, set band to bands 33 | (setf band (min band bands)) 34 | 35 | ; set the width of each channel in octaves 36 | ; [convert to linear scale using octaves] 37 | ; [almost ten octaves between 20 Hz and 20 kHz] 38 | (setf width (/ 9.96578428466 bands)) 39 | 40 | ; calculate center f of band [in octaves above 20 Hz] 41 | (setf center (mult width 0.5 (- (mult band 2) 1))) 42 | 43 | ; convert center of band [in octaves above 20 Hz] to frequency 44 | (setf f (mult 20 (expt 2 center))) 45 | 46 | ; apply E Q to the band 47 | (eq-band s f gain width) 48 | -------------------------------------------------------------------------------- /notch.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;categories "http://lv2plug.in/ns/lv2core/#FilterPlugin" 5 | ;name "Notch Filter..." 6 | ;action "Performing Notch Filter..." 7 | ;info "By Steve Daulton and Bill Wharrie. Released under GPL v2." 8 | 9 | ;control freq "Frequency" real "Hz" 60 0 10000 10 | ;control q "Q (higher value reduces width)" real "" 1 0.1 20 11 | 12 | ;; notch.ny by Steve Daulton and Bill Wharrie, September 2010 13 | ;; Released under terms of the GNU General Public License version 2 14 | ;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html 15 | 16 | ;; (multichan-expand) provides legacy support for old versions of Audacity 17 | ;; in which the (notch2) function only supports mono tracks. 18 | 19 | (cond 20 | ((> freq (/ *sound-srate* 2.0))(format nil "Error:\nFrequency too high for track sample rate.")) 21 | ((< freq 0)(format nil "Error:\nNegative frequency is invalid.")) 22 | ((< q 0.01)(format nil "Error:\nWidth must be at least 0.01.")) 23 | ((= freq 0) (format nil "Nothing to be done.")) 24 | (T (multichan-expand #'notch2 s freq q))) 25 | -------------------------------------------------------------------------------- /pan.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Panning..." 5 | ;action "Panning audio..." 6 | ;info "by David R. Sky, dominic Mazzoni\nReleased under terms of GNU Public License" 7 | 8 | ;control where "Pan position" int "0=left 1=right" 0.5 0 1.0 9 | 10 | ; Panning by David R. Sky, Dominic Mazzoni 11 | ; updated January 10, 2006 12 | ; to ensure input audio is mono-stereo 13 | ; Released under terms of the GNU Public License 14 | ; http://www.opensource.org/licenses/gpl-license.php 15 | ; pan anywhere between 0 (left) and 1 (right) 16 | 17 | (defun pan2 (sound where) 18 | (vector (mult (aref sound 0) (sum 1 (mult -1 where))) 19 | (mult (aref sound 1) where))) 20 | 21 | (pan2 22 | ; making the input stereo audio sound mono for proper panning 23 | (vector 24 | ; left channel 25 | (sum (aref s 0) (aref s 1)) 26 | ; right channel 27 | (sum (aref s 1) (aref s 0))) 28 | where) 29 | -------------------------------------------------------------------------------- /panlfo2a.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 3 3 | ;type process 4 | ;name "Panning [LFO] 2a..." 5 | ;action "Panning your audio using a low-frequency oscillator..." 6 | ;info "panlfo2a.ny Version 3 Nyquist plug-in by David R. Sky www.shellworld.net/~davidsky/ \nFor panning, your selected audio needs to be stereo. \nPans your stereo audio using an LFO [low-frequency oscillator]. \nFor left-most and right-most pan positions: 0%=left channel, 50%=center, 100%=right channel \nReleased under terms of the GNU General Public License version 2" 7 | 8 | ;control rate "LFO frequency [hz]" real "" 0.1 0.02 20 9 | ;control waveform "LFO waveform" choice "sine,triangle,saw,inverted saw,pulse" 0 10 | ;control duty "pulse waveform duty cycle [percent]" int "" 50 1 99 11 | ;control phase "LFO starting phase [degrees]" int "" 0 -180 180 12 | ;control left "Leftmost pan position [percent]" int "" 5 0 100 13 | ;control right "Rightmost pan position [percent]" int "" 95 0 100 14 | 15 | 16 | ; LFO Panning by David R. Sky 17 | ; simplified December 29, 2005 18 | ; improved [with multiple LFO waveform choice] panlfo2.ny September 7, 2007 19 | ; panlfo2a.ny is a version 3 Nyquist plug-in 20 | ; for Audacity 1.3.3 and later 21 | 22 | (cond 23 | 24 | 25 | ; check if selected audio is stereo 26 | ((not (arrayp s)) 27 | (format nil 28 | "Error - your selected audio is mono, 29 | it needs to be stereo to be panned. 30 | LFO Panning effect has not been applied. ~%")) 31 | 32 | 33 | ; check if left and right pan values are equal 34 | ((= left right) 35 | (format nil 36 | "Error - you have set identical leftmost and rightmost pan positions: ~a ~a 37 | these values need to be different. 38 | LFO panning effect has not been applied. ~%" left right)) 39 | 40 | 41 | ; has passed error-checking, apply LFO panning 42 | (t 43 | ; function to pan stereo audio 44 | ; by Dominic Mazzoni 45 | ; 'where' can be a number or signal, from 0 to +1, inclusive 46 | ; 0 left channel, 0.5 center pan position, 1.0 right channel 47 | (defun pan2 (sound where) 48 | (vector (mult (aref sound 0) (sum 1 (mult -1 where))) 49 | (mult (aref sound 1) where))) 50 | 51 | 52 | ; duty is for pulse waveform only - 53 | ; 50% first half of waveform is higher [right-most pan position], 54 | ; and last half of waveform is lower value [left-most pan position] 55 | ; 1% duty means first 1% is higher, last 99% is lower 56 | ; 57 | ; first convert duty percent to a linear value 58 | ; duty is anywhere between 1 and 99 inclusive 59 | (setf duty (* duty 0.01)) 60 | 61 | ; calculate duration of selected audio 62 | (setf dur (/ len *sound-srate*)) 63 | 64 | ; create pulse waveform using pwl function 65 | (setq *pulse-table* (list 66 | (pwl 0 1 (/ duty dur) 1 (/ duty dur) -1 (/ dur) -1 (/ dur)) 67 | (hz-to-step 1) t)) 68 | 69 | ; setting chosen Nyquist waveform 70 | (setq *waveform* 71 | (cond 72 | ((= waveform 0) *sine-table*) 73 | ((= waveform 1) *tri-table*) 74 | ((or (= waveform 2) (= waveform 3)) *saw-table*) 75 | (t *pulse-table*))) 76 | 77 | ; if inverted saw is chosen, set sign value to -1 78 | (setf sign (if (= waveform 3) -1.0 1.0)) 79 | 80 | ; calculate range - how far LFO sweeps 81 | (setf range (* 0.01 (abs (- left right)))) 82 | 83 | ; offset - how far right of the left channel 84 | ; the LFO sweep takes place 85 | ; for default values of 20% and 80%, range is 60% 86 | ; and offset becomes 20% 87 | (setf offset (* 0.01 (min left right))) 88 | 89 | ; determine scaling factor to use after audio has been panned 90 | ; this is because left and right channels may have had maximum amplitude 91 | ; before panning, so closer to middle pan position after panning, 92 | ; volume will sound reduced 93 | (setf scale-factor (* 2 (- 1.0 94 | (* 0.01 (max (abs (- 50 left)) 95 | (abs (- 50 right)))) ))) 96 | 97 | 98 | ; function to return LFO waveform for panning 99 | (defun get-lfo 100 | (offset sign range rate *waveform* phase) 101 | (sum offset (mult range (sum 0.5 (mult sign 0.5 102 | (lfo rate 1.0 *waveform* phase)))))) 103 | 104 | 105 | ; applying LFO panning 106 | (pan2 107 | ; following lines convert stereo audio into mono-sounding audio 108 | ; for proper panning effect 109 | (mult 0.5 scale-factor 110 | (vector (sum (aref s 0) (aref s 1)) (sum (aref s 1) (aref s 0)))) 111 | (get-lfo offset sign range rate *waveform* phase)) 112 | )) ; end cond 113 | 114 | -------------------------------------------------------------------------------- /panramp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Panning (ramp)..." 5 | ;action "Applying ramp panning..." 6 | ;info "by David R. Sky\n-10 is left, 0 is center, 10 is right\nReleased under terms of GNU Public License" 7 | 8 | ;control start "Start position" int "where" -10 -10 10 9 | ;control end "End position" int "where" 10 -10 10 10 | 11 | ; Ramp Panning by David R. Sky 12 | ; simplified to match Audacity 1.3.1 static pan positions 13 | ; from -10 left to 10 right pan positions 14 | ; Released under terms of the GNU Public License 15 | ; http://www.opensource.org/licenses/gpl-license.php 16 | 17 | (defun pan-position (position) 18 | (+ 0.5 (* 0.05 (float position)))) 19 | 20 | (defun pan2 (sound where) 21 | (vector (mult (aref sound 0) (sum 1 (mult -1 where))) 22 | (mult (aref sound 1) where))) 23 | 24 | (pan2 25 | ; making any stereo signal sound mono 26 | (vector 27 | (sum (aref s 0) (aref s 1)) 28 | (sum (aref s 1) (aref s 0))) 29 | (pwl 0 (pan-position start) 1 (pan-position end) 1)) 30 | 31 | 32 | -------------------------------------------------------------------------------- /pwm.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "PWM" 5 | ;action "Generating Modulated Pulse ... 6 | ;info "By Steven Jones GNU October 2004\nPulse Width Modulation" 7 | ;control key "MIDI key" int "" 60 0 127 8 | ;control cents "Cents" int "" 0 0 99 9 | ;control durms "Duration" int "msec" 10000 1 30000 10 | ;control modcyc "Mod Rate" int "cycles" 1 1 100 11 | ;control modpercent "Mod Depth" int "%" 90 -100 100 12 | ;control modshape "Mod Wave" int "0-tri 1-up saw 2-down saw" 0 0 2 13 | ;control bias "Width" int "%" 0 0 100 14 | ;control amp "Amp" int "%" 100 0 100 15 | 16 | 17 | 18 | 19 | (setq *tri* (list (pwl 0.5 1 1)(hz-to-step 1) t) 20 | *usaw* (list (pwl 1 1 1)(hz-to-step 1) t) 21 | *dsaw* (list (pwl 0 1 1)(hz-to-step 1) t)) 22 | 23 | 24 | 25 | 26 | (setq 27 | frq (step-to-hz (+ key (* 0.01 cents))) 28 | dur (* 0.001 durms) 29 | modfrq (/ modcyc (float dur)) 30 | modamp (* 0.01 modpercent) 31 | modtab (cond ((= modshape 0) *tri*) 32 | ((= modshape 1) *usaw*) 33 | (t *dsaw*)) 34 | width (* 0.01 bias)) 35 | 36 | (defun pwlosc (frq dur bias modamp modfrq modtab) 37 | (stretch dur 38 | (osc-pulse frq (sum bias 39 | (scale modamp (lfo modfrq 1 modtab)))))) 40 | 41 | 42 | (scale (* 0.01 amp) 43 | (pwlosc frq dur width modamp modfrq modtab)) 44 | -------------------------------------------------------------------------------- /randomlp.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Random low pass filter..." 5 | ;action "Playing around with your low pass cutoff knob..." 6 | ;info "Random low pass filter by David R. Sky" 7 | 8 | ;control maxspeed "Max filter sweep speed" real "hz" 0.20 0.01 10.00 9 | ;control factor "Filter depth factor" int "factor" 20 1 300 10 | ;control freq "Maximum cutoff frequency" real "Hz" 2000 20 5000 11 | 12 | ;; Random low pass filter by David R. Sky September 2004 13 | ;; 14 | ;; Note the lower the maxspeed frequency, 15 | ;; the higher factor must be to hear a result. 16 | ;; Factor can also be used to increase 17 | ;; or decrease the depth of the effect. 18 | ;; (Factor and maxspeed are inversely proportional.) 19 | ;; Freq in this plug-in is the maximum cutoff frequency 20 | ;; of the randomly-modulated low pass filter. 21 | 22 | (defun ransiglog (freq factor maxspeed) 23 | 24 | (mult freq (lp (mult factor (lp (noise) maxspeed)) 25 | (mult 0.5 maxspeed)))) 26 | 27 | (lp s (ransiglog freq factor maxspeed)) 28 | 29 | -------------------------------------------------------------------------------- /randompitch.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Random Pitch Modulation..." 5 | ;action "Randomly warping your audio..." 6 | ;info "Random Pitch Modulation by David R. Sky" 7 | 8 | ;control depth "Warping depth" real "depth" 0.100 0.001 2.000 9 | ;control maxspeed "Max sweep speed" real "Hz" 0.50 0.01 20.00 10 | ;control factor "Sweep depth factor" int "factor" 80 1 300 11 | ;control maxdepth "Max pitch mod depth" real "depth" 0.50 0.01 3.00 12 | 13 | ;; Random pitch Modulation by David R. Sky October 1, 2004 14 | ;; As in previous random plug-ins, 15 | ;; maxspeed and factor are inversely proportional 16 | ;; 17 | ;; works on mono and stereo audio 18 | ;; if stereo, each channel will have different random modulation 19 | 20 | (defun ransiglin (offset factor maxspeed) 21 | 22 | (sum offset (lp (mult factor (lp (noise) maxspeed)) (mult 0.5 23 | maxspeed)))) 24 | 25 | (setf offset (mult 0.50 maxdepth)) 26 | 27 | (if (arrayp s) 28 | (vector 29 | (snd-tapv (aref s 0) offset (mult depth 30 | (ransiglin offset factor maxspeed)) maxdepth) 31 | 32 | (snd-tapv (aref s 1) offset (mult depth 33 | (ransiglin offset factor maxspeed)) maxdepth)) 34 | 35 | (snd-tapv s offset (mult depth 36 | (ransiglin offset factor maxspeed)) maxdepth)) 37 | 38 | -------------------------------------------------------------------------------- /rbbdtone.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Reverse bouncing ball delay with Tone Shift..." 5 | ;action "Applying reverse bouncing ball Delay with tone shift..." 6 | ;info "Reverse bouncing ball delay with Tone Shift by David R. Sky" 7 | 8 | ;control decay "Decay amount" real "dB" 0.05 0.00 5.00 9 | ;control delay "Delay time" real "seconds" 0.02 0.01 1.00 10 | ;control count "Number of bounces" int "times" 15 1 100 11 | ;control toneshift1 "Tone shift (whole)" int "semitones" -1 -24 24 12 | ;control toneshift2 "Tone shift (cents)" int "cents" 0 -100 100 13 | 14 | (setf toneshift (sum toneshift1 (mult toneshift2 0.01))) 15 | (setf toneshift (expt 2.0 (/ toneshift 12.0))) 16 | (setf toneshift (/ 1.0 toneshift)) 17 | 18 | (defun change (s toneshift) 19 | (force-srate 44100 (stretch-abs toneshift (sound s)))) 20 | 21 | ;; Like reverse bouncing ball, but each bounce is tone shifted. 22 | 23 | (truncate count) 24 | (setf revcount (sum count 1)) 25 | 26 | (defun revbounces (s decay delay count) 27 | (if (= count 0) 28 | (cue s) 29 | (sim (cue s) 30 | (loud decay (at (mult delay (- revcount count)) 31 | (revbounces (change s toneshift) decay delay 32 | (- count 1 ))))))) 33 | (stretch-abs 1 (revbounces s (- 0 decay) delay count)) 34 | 35 | -------------------------------------------------------------------------------- /rbell.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Risset Bell" 5 | ;action "Generating Risset Bell..." 6 | ;info "Adapted by Steven Jones pluto@swbell.net\nA bell instrument based on the work Jean Claude Risset\nThis plugin is an adaptation of a demo file by Pedro Jose Morales\ncontained in the standard Nyquist distribution. 7 | ;control key "MIDI key" int "" 72 0 127 8 | ;control wdecay "Decay" float "sec" 10 0 30 9 | ;control fdecay "Fractional Decay" float "n/100 sec" 0 0 99 10 | 11 | (setq frq (step-to-hz key)) 12 | (setq decay (+ wdecay (* 0.01 fdecay))) 13 | 14 | 15 | (defun log2 (n) 16 | (/ (log (float n))(log 2.0))) 17 | 18 | (defun percussion (decay) 19 | (exp-dec 0 (expt 2.0 (- (log2 decay) 3)) decay)) 20 | 21 | 22 | (defun rbell:partial (frq amp decay) 23 | (mult (sine (hz-to-step frq) decay) 24 | (scale amp (percussion decay)))) 25 | 26 | 27 | 28 | 29 | 30 | (defun rbell (frq decay) 31 | (sim 32 | (rbell:partial (* frq .56) 1.00 (* decay 1.000)) 33 | (rbell:partial (+ (* frq .56) 1) 0.67 (* decay 0.900)) 34 | (rbell:partial (* frq .92) 1.35 (* decay 0.650)) 35 | (rbell:partial (+ (* frq .92) 1.7) 1.80 (* decay 0.550)) 36 | (rbell:partial (* frq 1.19) 2.67 (* decay 0.325)) 37 | (rbell:partial (* frq 1.7) 1.67 (* decay 0.350)) 38 | (rbell:partial (* frq 2.0) 1.46 (* decay 0.250)) 39 | (rbell:partial (* frq 2.74) 1.33 (* decay 0.200)) 40 | (rbell:partial (* frq 3.0) 1.33 (* decay 0.150)) 41 | (rbell:partial (* frq 3.76) 1.00 (* decay 0.100)) 42 | (rbell:partial (* frq 4.07) 1.33 (* decay 0.075)))) 43 | 44 | 45 | (setq rawsig (rbell frq decay)) 46 | (setq peakval (peak rawsig ny:all)) 47 | (scale (/ 1.0 peakval) rawsig) 48 | 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /rndtone.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "RNDTONE" 5 | ;action "Generating RNDTONE..." 6 | ;info "Random tone generator by Steven Jones pluto@swbell.net GNU 2004" 7 | ;control *dur* "Duration" real "Sec" 20 1 30 8 | ;control *n* "Density" int "Tone count" 60 1 100 9 | ;control *floor* "Low frq limit" real "Hz" 300 20 1000 10 | ;control *ceiling* "High frq limit" real "Hz" 600 20 1000 11 | 12 | 13 | ;; Return random number in interval [low,high) 14 | ;; 15 | (defun rndr (low high) 16 | (let ((range (abs (- high low))) 17 | (floor (min low high))) 18 | (+ floor (random (truncate range))))) 19 | 20 | 21 | 22 | (defun make-cue-list (n) 23 | (if (plusp n) 24 | (let* ((start (* 0.75 (rndr 0 *dur*))) ;start time 25 | (dur (rndr 1 (+ 1 (- *dur* start)))) ;tones duration 26 | (att (* 0.5 (rndr 0 dur))) ;attack time 27 | (dec (rndr 0 (- dur att))) ;decay time 28 | (sus (max 0 (- dur att dec))) ;sustain time 29 | (frq (rndr *floor* *ceiling*)) ;tone frequency in Hz 30 | (amp (rndr -9 0)) ;amplitude in db 31 | ) 32 | (cons (list start dur att sus dec frq amp)(make-cue-list (- n 1)))) 33 | nil)) 34 | 35 | 36 | 37 | (defun asd (a s d) 38 | (pwl a 1 (+ a s) 1 (+ a s d))) 39 | 40 | 41 | 42 | (defun rndtone (cuelist) 43 | (simrep (n (length cuelist)) 44 | (let* ((args (nth n cuelist)) 45 | (start (car args)) 46 | (attack (third args)) 47 | (decay (fourth args)) 48 | (sustain (nth 4 args)) 49 | (frq (nth 5 args)) 50 | (amp (nth 6 args))) 51 | (at start (cue (scale-db amp (mult (osc (hz-to-step frq)(second args)) 52 | (asd attack sustain decay)))))))) 53 | 54 | 55 | 56 | (setq cue1 (make-cue-list *n*)) 57 | (setq peak1 (peak (rndtone cue1) ny:all)) 58 | (scale (* 0.9 (/ 1.0 peak1))(rndtone cue1)) 59 | -------------------------------------------------------------------------------- /sq1.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "SQ1" 5 | ;action "Executing SQ1 sequence..." 6 | ;info "SQ1 Sequence by Steven Jones pluto@swbell.net GNU 2004" 7 | ;control center "center" real "Hz" 440 0 10000 8 | ;control detune "detune" real "" 1.01 0.25 4.00 9 | ;control wave "wave" int "0-sine 1-tri 2-square 3-saw" 1 0 3 10 | ;control attack "attack" float "sec" 1.0 0.0 10.0 11 | ;control sustain "sustain" float "sec" 1.0 0.0 10.0 12 | ;control decay "decay" float "sec" 1.0 0.0 10.0 13 | ;control f1 "lfo 1 frq" float "hz" 1.0 0.01 10 14 | ;control a1 "lfo 1 amp" float "hz" 220 0 1760 15 | ;control f2 "lfo 2 frq" float "hz" 2.0 0.01 10 16 | ;control a2 "lfo 2 amp" float "hz" 330 0 1760 17 | ;control f3 "lfo 3 frq" float "hz" 4.0 0.01 10 18 | ;control a3 "lfo 3 amp" float "hz" 55 0 1760 19 | 20 | ;; SQ1 is an algorithmic "sequencer". Complex pitch sequences are generated by 21 | ;; using three square wave LFOs to modulate two FM oscillators. The 22 | ;; oscillators may be detuned relative to each other and output one of 4 23 | ;; wave-shapes. There is also an overall amplitude envelope. Note the wave 24 | ;; tables are exact, IE not band limited, so aliasing will occur at sufficiently 25 | ;; high frequencies. 26 | 27 | 28 | (setq *square-table* (list (pwl 0 1 0.5 1 0.5 -1 1 -1 1)(hz-to-step 1) t)) 29 | 30 | (defun sq1:lfo (frq amp dur) 31 | (scale amp (lfo frq dur *square-table*))) 32 | 33 | (defun sq1:modulator (f1 a1 f2 a2 f3 a3 dur) 34 | (sum (sq1:lfo f1 a1 dur) 35 | (sq1:lfo f2 a2 dur) 36 | (sq1:lfo f3 a3 dur))) 37 | 38 | (defun sq1:env (a s d) 39 | (pwl a 1 (+ a s) 1 (+ a s d))) 40 | 41 | (defun sq1:synth (center wave am fm detune) 42 | (let ((center2 (* center detune)) 43 | (wtab (cond ((= wave 0) *sine-table*) 44 | ((= wave 1) *tri-table*) 45 | ((= wave 2) *square-table*) 46 | (t *saw-table*)))) 47 | (mult (sim (fmosc (hz-to-step center) fm wtab) 48 | (fmosc (hz-to-step center2) fm wtab)) 49 | am))) 50 | 51 | 52 | 53 | (setq dur (+ attack sustain decay)) 54 | (setq modsig (sq1:modulator f1 a1 f2 a2 f3 a3 dur)) 55 | (setq envsig (sq1:env attack sustain decay)) 56 | (setq peakval (peak (sq1:synth center wave envsig modsig detune) ny:all)) 57 | (scale (/ 1.0 peakval)(sq1:synth center wave envsig modsig detune)) 58 | 59 | 60 | -------------------------------------------------------------------------------- /surf-lfo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Surf [LFO]..." 5 | ;action "Generating LFO surf..." 6 | ;info "surf-lfo.ny by David R. Sky www.shellworld.net/~davidsky/nyquist.htm \nTo generate stereo surf, first open a new stereo track in Audacity.\nReleased under terms of the GNU Public License" 7 | 8 | ;control channels "Mono or stereo surf [1=mono 2=stereo]" int "" 2 1 2 9 | ;control spread "Stereo spread [stereo only: percent]" int "" 80 -100 100 10 | ;control fade "Fade-in and fade-out times [seconds]" real "" 15 0 30 11 | ;control dur "Surf duration [minutes]" real "" 1 0 60 12 | ;control surf-type "Surf type [0=white noise 1=pink noise]" int "" 1 0 1 13 | ;control surf-f "Surf sweep frequency [hz]" real "" 0.1 0.01 1 14 | ;control lower "Lower filter frequency [hz]" int "" 100 40 5000 15 | ;control upper "Upper filter frequency [hz]" int "" 1000 100 20000 16 | ;control bass-f "Bass frequency to boost [hz]" int "" 100 10 2000 17 | ;control boost "Bass boost [db]" int "" 18 0 60 18 | 19 | ; LFO Surf by David R. Sky, June 16, 2007. 20 | ; http://www.shellworld.net/~davidsky/nyquist.htm 21 | ; Released under terms of the GNU Public License 22 | ; http://www.opensource.org/licenses/gpl-license.php 23 | 24 | #| 25 | LFO: low frequency oscillator. A signal whose frequency is 26 | generally below the human ear's ability to hear as a tone, usually 27 | 20 cycles per second [Hertz or hz]. 28 | 29 | Generates mono or stereo surf which sweeps between a lower and 30 | upper filter frequency. Stereo surf also sweeps back-and-forth 31 | somewhere between the left and right audio channels. 32 | 33 | Copy surf-lfo.ny into your Audacity plug-ins folder, typically 34 | 35 | c:\program files\audacity\plug-ins 36 | 37 | in Windows. 38 | 39 | Start a new session of Audacity. To generate stereo surf, first 40 | open a blank stereo track [alt+p, s in Audacity pre-1.3, alt+t, n, 41 | s in 1.3 and later]. Open the generate menu. Click on 'Surf [LFO]'. 42 | 43 | Variables with instructions: 44 | 45 | 1. Mono or stereo surf [1=mono 2=stereo] 46 | Mono surf is heard only in the center between the two speakers, or 47 | in the middle of your head when wearing headphones. Stereo surf 48 | sweeps back-and-forth somewhere between the two audio channels, 49 | depending on the next setting, Stereo Spread. 50 | 51 | 2. Stereo spread [stereo only: percent] 52 | The larger this value, the more widely the stereo surf will move 53 | back-and-forth between the left and right audio channels. 54 | When this value is above zero, the deeper section of the surf sweep 55 | will be heard more in the left channel; below zero, the deeper 56 | section of the surf sweep will be heard mor in the right channel. 57 | 58 | 3. Fade-in and fade-out times [seconds] 59 | To smoothly fade in and fade out the volume at the start and end of 60 | the surf. 61 | 62 | 4. Surf duration [minutes] 63 | Up to sixty minutes of LFO surf. 64 | 65 | 5. Surf type [0=white noise 1=pink noise] 66 | White noise is more of a 'hissing' sound, whereas pink noise is a 67 | lower 'rushing' sound. 68 | Technically, white noise is 'equal energy per frequency', whereas 69 | pink noise is 'equal energy per octave'. 70 | 71 | 6. Surf sweep frequency [hz] 72 | Sets how slow or fast the surf sweeps between the lower and upper 73 | filter frequencies, and the left and right channels [for stereo 74 | surf]. 75 | 76 | 77 | The next two variables 78 | 7. Lower filter frequency [hz] 79 | 8. Upper filter frequency [hz] 80 | determine how low and how high the lowpass filter sweeps the surf 81 | noise. 82 | 83 | 9. Bass frequency to boost [hz] 84 | You can boost [increase the volume of] frequencies of the surf 85 | sound below this setting, to get a deeper-sounding surf. Somewhat 86 | equivalent to the bass knob on your stereo. 87 | 88 | 10. Bass boost [db] 89 | Sets how much to boost the above bass frequency. 0db means no 90 | boost, 6db means double the amplitude of the bass frequency, and so 91 | on. 92 | 93 | Note 94 | 95 | If you get an error message 'Nyquist returned too many audio 96 | channels', this means you tried to generate stereo surf without 97 | first having opened a blank stereo track in audacity. See 98 | instructions at the start of this help file for instructions on how 99 | to do this. 100 | 101 | Written by David R. Sky, June 17, 2007. 102 | http://www.shellworld.net/~davidsky/nyquist.htm 103 | Thanks to Steven Jones for pink noise generator code. 104 | Released under terms of the GNU Public License 105 | http://www.opensource.org/licenses/gpl-license.php 106 | |# 107 | 108 | 109 | ; first make sure lower and upper frequency values really are lower and upper: 110 | (setf range (list lower upper)) 111 | (setf range (sort range '<)) 112 | (setf lower (nth 0 range)) 113 | (setf upper (nth 1 range)) 114 | ; range - range of frequencies for lp filter sweep 115 | (setf range (- upper lower)) 116 | ; convert minutes to seconds 117 | (setf dur (* dur 60)) 118 | ; if fade-in plus fade-out times > dur, 119 | ; set fade to 1/2 dur 120 | (setf fade (if (< dur (* 2.0 fade)) 121 | (* dur 0.5) fade)) 122 | 123 | 124 | ; function to generate white noise 125 | ; with bass boost 126 | (defun white (dur bass-f boost) 127 | (eq-lowshelf (noise dur) bass-f boost)) 128 | 129 | 130 | ; function to generate pink noise 131 | ; by Steven Jones 132 | ; altered to boost bass frequency using eq-lowshelf 133 | (defun pink (dur bass-f boost &optional (cutoff (/ *sound-srate* 16.0))) 134 | (eq-lowshelf 135 | (lowpass6 (noise dur) cutoff) 136 | bass-f boost)) 137 | 138 | 139 | ; function to multiply LFO signal by itself: 140 | ; Used on the LFO control signal 141 | ; after it has been converted to sweep from between -1 and +1 142 | ; to between 0 and +1. 143 | ; without this conversion, the result of using a straight sinewave 144 | ; to modulate the lowpass filter 145 | ; sounds like there is more high-frequency hissing 146 | ; than low-frequency rushing. 147 | (defun sqr-signal (signal) 148 | (mult signal signal)) 149 | 150 | 151 | ; function to expand lfo to sweep between lower and upper filtering frequencies 152 | (defun expand-signal (range lower signal) 153 | (sum lower (mult range signal))) 154 | 155 | 156 | ; function to normalize signal to 0.9 level, 157 | ; as output becomes clipped somewhere above this level 158 | (defun normalize (signal) 159 | ; check peak amplitude for max 1 million samples 160 | (setf max-level (peak signal 1000000)) 161 | (scale (/ 0.9 max-level) signal)) 162 | 163 | 164 | ; function to generate white- or pink-noise-based signal 165 | (defun get-noise (dur bass-f boost) 166 | (if (= surf-type 0) 167 | (white dur bass-f boost) (pink dur bass-f boost))) 168 | 169 | 170 | ; function to generate LFO surf 171 | (defun surf-lfo (dur fade bass-f boost range lower surf-f ) 172 | ; apply fade-in and fade-out envelope 173 | (mult (pwl 0 0 fade 1.0 (- dur fade) 1.0 dur 0 dur) 174 | (normalize 175 | (lp 176 | ; unmodified noise 177 | (get-noise dur bass-f boost) 178 | ; expand control signal to sweep between lower and upper frequencies 179 | (expand-signal range lower 180 | ; square control signal [multiply it with itself] 181 | (sqr-signal 182 | ; convert LFO signal to sweep between -1 and +1, 183 | ; to sweep between 0 and +1 184 | (sum 0.5 (mult 0.5 (lfo surf-f (* dur 60) *sine-table* -90))) 185 | ) ; end sqr-signal 186 | ) ; end expand-signal 187 | ) ; end lp 188 | ) ; end normalize 189 | ) ; end mult pwl 190 | ) ; end defun surf-lfo 191 | 192 | 193 | ; Stereo Butterfly function: 'swishes' left and right channels back and forth 194 | ; with each other 195 | ; +1.0 full stereo spread 196 | ; 0.0 both channels sound like they're in the middle 197 | ; -1.0 l/r channels flipped with each other 198 | ; can use flonum or control signal for width argument 199 | (defun butterfly (width sound) 200 | (vector 201 | ; left channel 202 | (sum (mult (aref sound 0) (sum width 1) 0.5) 203 | (mult (aref sound 1) (sum width -1) -0.5)) 204 | ; right channel 205 | (sum (mult (aref sound 1) (sum width 1) 0.5)(mult (aref sound 0) 206 | (sum width -1) -0.5)))) 207 | 208 | 209 | 210 | ; generate mono or stereo LFO surf 211 | (cond 212 | ((= channels 1) ; generate mono surf 213 | (surf-lfo dur fade bass-f boost range lower surf-f) 214 | ) ; end generate mono surf 215 | 216 | (t ; generate stereo surf 217 | (butterfly 218 | (mult spread 0.01 219 | (lfo surf-f dur *sine-table* 90) 220 | ) ; end mult spread 0.01 221 | (vector 222 | ; left channel: surf sound 223 | (surf-lfo dur fade bass-f boost range lower surf-f) 224 | ; right channel: silence 225 | (s-rest dur) 226 | ) ; end vector 227 | ) ; end butterfly 228 | ) ; end generate stereo surf 229 | ) ; end cond 230 | -------------------------------------------------------------------------------- /surf-oxy.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Surf [Oxygene]..." 5 | ;action "Generating Oxygene surf..." 6 | ;info "surf-oxy.ny by David R. Sky www.shellworld.net/~davidsky/nyquist.htm \nBased on surf sound in Jean-Michel jarre's 1976 album _Oxygene_.\nOne cycle of Oxygene surf: sweep + post-sweep silence + crash + post-crash silence\nTo generate stereo Oxygene surf, first open a blank stereo track in Audacity.\nReleased under terms of the GNU Public License" 7 | 8 | ;control channels "Surf output [1=mono 2=stereo]" int "" 2 1 2 9 | ;control spread "Stereo spread [stereo only - percent]" int "" 80 -100 100 10 | ;control fade "Fade-in and fade-out times [seconds]" real "" 0 0 120 11 | ;control count "Number of Oxygene surf cycles" int "" 10 1 120 12 | ;control surf-type "Surf type [0=white noise 1=pink noise]" int "" 1 0 1 13 | ;control start-f "Sweep starting filter frequency [hz]" real "" 100 40 1000 14 | ;control end-f "Sweep ending filter frequency [hz]" real "" 1000 100 10000 15 | ;control sweep-t "Sweep duration [seconds]" real "" 1.5 0.2 10 16 | ;control pause-t "Post-sweep silence duration [seconds]" real "" 2 0.2 10 17 | ;control crash-f "Crash filter frequency [hz]" int "" 300 40 2000 18 | ;control boost "Crash bass frequency boost [db]" real "" 24 0 60 19 | ;control crash-t "Crash duration [seconds]" real "" 5 0.2 10 20 | ;control post-t "Post-crash silence duration [seconds]" real "" 2 0.2 10 21 | 22 | ; Surf [Oxygene] by David R. Sky, June 20, 2007. 23 | ; http://www.shellworld.net/~davidsky/nyquist.htm 24 | ; based on surf sound in Jean-Michel Jarre's 1976 electronic album _Oxygene_. 25 | ; Thanks to Steven Jones for pink noise Nyquist code from pink.lsp. 26 | ; Released under terms of the GNU Public License 27 | ; http://www.opensource.org/licenses/gpl-license.php 28 | 29 | #| 30 | surf-oxy.ny: Jean-Michel Jarre's _Oxygene_ surf 31 | 32 | Jean-Michel Jarre put out a hauntingly beautiful electronic album 33 | in 1976, _Oxygene_. One section of this album had a repeating surf 34 | sound: a sweep from the right to the left audio channel, a pause, 35 | and then a deep crash in the right channel. After another pause, 36 | this cycle repeated many times. Very relaxing to listen to. 37 | 38 | This sound generator plug-in emulates that surf cycle, in either 39 | mono or stereo. 40 | 41 | Copy surf-oxy.ny into your Audacity plug-ins folder, typically 42 | 43 | c:\program files\audacity\plug-ins 44 | 45 | in Windows. 46 | 47 | Start a new session of Audacity. To generate stereo surf, first 48 | open a blank stereo track [alt+p, s in Audacity pre-1.3, alt+t, n, 49 | s in 1.3 and later]. Open the generate menu. Click on 50 | 'Surf [Oxygene]'. 51 | 52 | Variables: 53 | 54 | 1. Surf output [1=mono 2=stereo] 55 | To generate mono or stereo Oxygene surf. 56 | 57 | 2. Stereo spread [stereo only - percent] 58 | If you've chosen to generate stereo Oxygene surf, this setting will 59 | determine how widely the surf sweeps away from the center pan 60 | position. From +100 percent to -100 percent. Positive values make 61 | the sweep section go from the right to the left, with the crash in 62 | the right. Negative values reverse this pattern. 63 | 64 | 3. Fade-in and fade-out times [seconds] 65 | Time to fade in and fade out the volume at the start and end of the 66 | surf, if you wish. 67 | 68 | 4. Number of Oxygene surf cycles 69 | How many Oxygene surf cycles to generate. 70 | 71 | 5. Surf type [0=white noise 1=pink noise] 72 | White noise is a higher-frequency 'hissing', whereas pink noise is 73 | a lower-frequency 'rushing' sound. 74 | 75 | The following two settings 76 | 6. Sweep starting filter frequency [hz] 77 | 7. Sweep ending filter frequency [hz] 78 | set the starting and ending frequencies for the lowpass filter to 79 | sweep the sweep portion of Oxygene surf. [A lowpass filter allows 80 | frequencies below a certain value to pass, while frequencies above 81 | that value are attenuated, or reduced in volume.] 82 | 83 | 8. Sweep duration [seconds] 84 | This sets how slow or fast the sweep portion of Oxygene surf takes. 85 | 86 | 87 | 9. Post-sweep silence duration [seconds] 88 | Duration of the silence after the sweep. 89 | 90 | 10. Crash filter frequency [hz] 91 | The lowpass filter frequency of the crash. 92 | 93 | 11. Crash bass frequency boost [db] 94 | How much to increase the volume of the above filter frequency and 95 | below. 0db means no boost, 6db means double the amplitude of this 96 | bass frequency, and so on. 97 | 98 | 12. Crash duration [seconds] 99 | Duration of the crash. 100 | 101 | 12. Post-crash silence duration [seconds] 102 | how much silence before the Oxygene surf cycle repeats. 103 | 104 | Notes 105 | 106 | 1. If you get an error message 'Nyquist returned too many audio 107 | channels', this means you tried to generate stereo surf without 108 | having first opened a blank stereo track in Audacity. See 109 | instructions at the top of this help file on how to do this. 110 | 111 | 2. In the original _Oxygene_, reverb was applied to the surf, 112 | giving it a more expansive sound and feeling. If you want to have 113 | reverb added to Oxygene surf, you need to apply it yourself after 114 | the surf sound has been generated. There's 'Gverb' already in the 115 | Audacity effects menu, and many people use Anwida's free VST reverb 116 | plug-in. 117 | 118 | 3. Seagulls not included. 119 | 120 | Written by David R. Sky, June 20, 2007. 121 | http://www.shellworld.net/~davidsky/nyquist.htm 122 | Thanks to Steven Jones for pink noise Nyquist code. 123 | Released under terms of the GNU Public License 124 | http://www.opensource.org/licenses/gpl-license.php 125 | |# 126 | 127 | ; calculate duration of one surf cycle 128 | (setf surf-t (+ sweep-t pause-t crash-t post-t)) 129 | ; calculate duration of 'count' number of surf cycles 130 | ; for fade-in and fade-out envelope 131 | (setf count-t (* count surf-t)) 132 | 133 | 134 | ; function to generate pink noise 135 | ; thanks to Steven Jones - from his pink.lsp file 136 | (defun pink (dur &optional (cutoff (/ *sound-srate* 16.0))) 137 | (lowpass6 (noise dur) cutoff)) 138 | 139 | 140 | ; function to determine maximum amplitude of signal, 141 | ; which is then converted to scale value 142 | ; for optimum amplitude without clipping surf 143 | ; returns flonum 144 | (defun get-maximum (signal) 145 | (setf max-level (peak signal 1000000)) 146 | (/ 0.8 max-level)) 147 | 148 | 149 | ; function to generate white noise or pink noise 150 | (defun get-noise (surf-type dur) 151 | (if (= surf-type 0) 152 | (noise dur) (pink dur))) 153 | 154 | 155 | ; function to generate non-normalized sweep 156 | (defun generate-sweep (sweep-t surf-type start-f end-f ) 157 | ; we multiply two pwl signals to get logarhythmic fade-in 158 | (mult (pwl 0 0 (- sweep-t 0.01) 1 sweep-t 0 sweep-t) 159 | (pwl 0 0 (- sweep-t 0.01) 1 sweep-t 0 sweep-t) 160 | (lp (get-noise surf-type sweep-t) 161 | ; multiply two frequency sweep pwl's 162 | ; to get logarhythmic frequency sweep 163 | (mult (pwl 0 (sqrt start-f) sweep-t (sqrt end-f) sweep-t) 164 | (pwl 0 (sqrt start-f) sweep-t (sqrt end-f) sweep-t) 165 | ) ; end mult frequency pwl's 166 | ) ; end lp 167 | ) ; end mult envelope pwl's 168 | ) ; end defun 169 | 170 | 171 | ; function to generate non-normalized crash 172 | (defun generate-crash (crash-t surf-type crash-f boost) 173 | ; again multiply two envelope pwl's 174 | ; to give logarhythmic fade-out 175 | (mult (pwl 0 0 0.01 1 crash-t 0 crash-t) 176 | (pwl 0 0 0.01 1 crash-t 0 crash-t) 177 | ; eq-lowshelf: function to boost bass frequency of crash 178 | (eq-lowshelf 179 | (lp (get-noise surf-type crash-t) crash-f) 180 | crash-f boost) ; end eq-lowshelf 181 | ) ; end mult 182 | ) ; end defun generate-crash 183 | 184 | 185 | ; function to generate one cycle of Oxygene surf 186 | (defun surf-oxygene 187 | (scale-sweep sweep-t surf-type start-f end-f pause-t 188 | scale-crash crash-t surf-type crash-f boost post-t) 189 | ; sequence four audio portions 190 | (seq 191 | ; 1. sweep 192 | (scale scale-sweep (generate-sweep sweep-t surf-type start-f end-f)) 193 | ; 2. post-sweep silence 194 | (s-rest pause-t) 195 | ; 3. crash 196 | (scale scale-crash (generate-crash crash-t surf-type crash-f boost)) 197 | ; 4. post-crash silence 198 | (s-rest post-t) 199 | ) ; end seq 200 | ) ; end defun surf-oxygene 201 | 202 | 203 | ; Stereo Butterfly function: 'swishes' stereo left and right channels 204 | ; back and forth with each other 205 | ; 1.0 full stereo spread 206 | ; 0 both channels in the middle [sounds mono] 207 | ; -1.0 left and right channels flipped with each other 208 | ; can use flonum or control signal for width argument 209 | (defun butterfly (width sound) 210 | (vector 211 | ; left channel 212 | (sum (mult (aref sound 0) (sum width 1) 0.5) 213 | (mult (aref sound 1) (sum width -1) -0.5)) 214 | ; right channel 215 | (sum (mult (aref sound 1) (sum width 1) 0.5)(mult (aref sound 0) 216 | (sum width -1) -0.5)))) 217 | 218 | 219 | ; get scale [normalization] values for one sweep and one crash 220 | ; we do this only once so that we don't need 221 | ; to normalize every generated sweep and crash 222 | (setf scale-sweep (get-maximum (generate-sweep sweep-t surf-type start-f end-f))) 223 | (setf scale-crash (get-maximum (generate-crash crash-t surf-type crash-f boost))) 224 | 225 | 226 | ; generate repeated Oxygene surf 227 | (mult 228 | (pwl 0 0 fade 1.0 (- count-t fade) 1.0 count-t 0 count-t) 229 | (seqrep (i count) 230 | (cond 231 | ((= channels 1) ; generate mono Oxygene surf 232 | (surf-oxygene 233 | scale-sweep sweep-t surf-type start-f end-f pause-t 234 | scale-crash crash-t surf-type crash-f boost post-t) 235 | ) ; close generate mono surf 236 | 237 | (t ; generate stereo Oxygene surf 238 | (butterfly (mult spread 0.01 239 | (pwl 0 -1.0 sweep-t 1 sweep-t 1 (+ sweep-t pause-t) -1 surf-t -1 surf-t) 240 | ) ; end mult spread 241 | (vector 242 | (surf-oxygene ; Oxygene surf in left channel 243 | scale-sweep sweep-t surf-type start-f end-f pause-t 244 | scale-crash crash-t surf-type crash-f boost post-t) 245 | (s-rest surf-t) ; silence in right channel 246 | ) ; end vector 247 | ) ; end butterfly 248 | ) ; close stereo surf 249 | ) ; end cond 250 | ) ; end seqrep 251 | ) ; end mult pwl 252 | -------------------------------------------------------------------------------- /tempo.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Tempo Change..." 5 | ;action "Changing tempo..." 6 | ;info "Tempo Change by David R. Sky" 7 | 8 | ;control change "Tempo change" real "factor" 0.50 0.10 8.00 9 | ;control md "Multiply or divide" int "0=multiply 1=divide" 0 0 1 10 | 11 | (cond ((= md 0) (setf change (/ 1.0 change)) 12 | (= md 1) (setf change change))) 13 | 14 | (force-srate 44100 (stretch-abs change (sound s))) 15 | 16 | -------------------------------------------------------------------------------- /timeshif.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Time shifter..." 5 | ;action "Time shifting one or two tracks..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License" 7 | 8 | #| Time shifter by David R. Sky, March 23, 2006 9 | Released under terms of the GNU Public License 10 | http://www.opensource.org/licenses/gpl-license.php 11 | 12 | How to use - Select audio. If mono track, adjust the mono/left 13 | channel time, if stereo adjust left and/or right channel time. 14 | 15 | How it works - if time shift<0ms, chop out specified amount of 16 | audio from start of track; otherwise insert specified amount of 17 | silence before track and shift track forward specified amount of 18 | time. 19 | |# 20 | 21 | ;control l "Mono/left channel shift" int "" 0 -1000 1000 22 | ;control r "Right channel shift" int "" 0 -1000 1000 23 | ;control choice "0=milliseconds 1=seconds" int "" 0 0 1 24 | 25 | ; time shift function 26 | (defun shift (sound dur time) 27 | (if (< time 0) 28 | ; if time<0 29 | (extract-abs (- time) dur sound) 30 | ; otherwise... 31 | (sim (s-rest time) 32 | (at-abs time (cue sound)) 33 | ) ; end sim 34 | ) ; end if 35 | ) ; end defun 36 | 37 | ; determine selection duration in seconds 38 | (setf dur (/ len *sound-srate*)) 39 | 40 | ; divisor - either 1000 for ms or 1 for s 41 | (setf divisor (if (= choice 0) 1000 1)) 42 | 43 | ; convert integer time to float time 44 | ; using float of integers rather than decimal numbers 45 | ; so plug-in can work for European Nyquist as well 46 | ; which uses , for decimal point 47 | (setf l (/ (float l) (float divisor))) 48 | (setf r (/ (float r) (float divisor))) 49 | 50 | 51 | ; applying time shift 52 | (if (arrayp s) 53 | ; apply to stereo track 54 | (vector (shift (aref s 0) dur l) 55 | (shift (aref s 1) dur r) 56 | ) ; end vector 57 | ; apply to mono track 58 | (shift s dur l) 59 | ) ; end if 60 | 61 | -------------------------------------------------------------------------------- /tonedelay.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Delay with tone Shift..." 5 | ;action "Applying Delay with tone shift..." 6 | ;info "Delay with Tone Shift by David R. sky" 7 | 8 | ;control decay "Decay amount" real "dB" 0 0 24 9 | ;control delay "Delay time" real "seconds" 0.5 0.0 5.0 10 | ;control count "Number of echos" int "times" 5 1 30 11 | ;control toneshift1 "Tone shift (whole)" int "semitones" 1 -24 24 12 | ;control toneshift2 "Tone shift (cents)" int "cents" 0 -100 100 13 | 14 | (setf toneshift (sum toneshift1 (mult toneshift2 0.01))) 15 | (setf toneshift (expt 2.0 (/ toneshift 12.0))) 16 | (setf toneshift (/ 1.0 toneshift)) 17 | 18 | (defun change (s toneshift) 19 | (force-srate 44100 (stretch-abs toneshift (sound s)))) 20 | 21 | (defun delays (s decay delay count) 22 | (if (= count 0) (cue s) 23 | (sim (cue s) 24 | (loud decay (at delay (delays (change s toneshift) decay delay (- 25 | count 1))))))) 26 | 27 | (stretch-abs 1 (delays s (- 0 decay) delay count)) 28 | 29 | -------------------------------------------------------------------------------- /tuning.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Tuning Fork..." 5 | ;action "Generating tone..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License\nmiddle C=MIDI note 60 A440=69" 7 | 8 | ;control dur "Tone duration" real "seconds" 5.0 0.0 300.0 9 | ;control cf "Constant volume or fade out" int "0=constant 1=fade" 0 0 1 10 | ;control mf "MIDI or frequency" int "0=MIDI 1=frequency" 0 0 1 11 | ;control midin "MIDI note" real "MIDI note" 69.0 16.0 127.0 12 | ;control f "frequency" real "Hz" 440.0 20.0 20000.0 13 | 14 | ; Tuning Fork by David R. Sky 15 | ; updated january 4, 2006 16 | ; Released under terms of the GNU Public License 17 | ; http://www.opensource.org/licenses/gpl-license.php 18 | 19 | ; set correct frequency 20 | (setf midin (if (= mf 0) midin (hz-to-step f))) 21 | 22 | ; envelope function 23 | (defun envelope (cf dur) 24 | (if (= cf 0) 25 | (pwl 0.002 1 (- dur 0.002) 1 dur) 26 | (pwl 0.002 1 dur))) 27 | 28 | ; generate tone 29 | (mult (envelope cf dur) (osc midin dur)) 30 | 31 | -------------------------------------------------------------------------------- /turntablewarp-ms.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 2 3 | ;type process 4 | ;name "Turntable Warping (mono/stereo) (V2)..." 5 | ;action "Warping audio..." 6 | ;info "Turntable Warping by David R. Sky\nbased on warp tutorial by Roger B. Dannenberg\nSteps are number of semitones above or below non-warped audio\nreleased under terms of the GNU Public License" 7 | 8 | ;control step0 "Initial step" int "semitones" 0 -36 36 9 | ;control amp0 "Initial amplitude" int "percent" 100 0 100 10 | ;control midtime "Change time" real "percent" 50.0 0.0 100.0 11 | ;control step1 "End step" int "semitones" -12 -36 36 12 | ;control amp1 "End amplitude" int "percent" 40 0 100 13 | 14 | ; Turntable Warping (mono/stereo) by David R. Sky, December 26, 2004 15 | ; warps mono or stereo audio loaded into Audacity 1.2.3 and later 16 | ; step values are semitones above or below pitch of unwarped audio 17 | ; Based on warp tutorial by Roger B. Dannenberg 18 | ; Released under terms of the GNU Public License 19 | ; http://www.opensource.org/licenses/gpl-license.php 20 | 21 | ; determine duration of selection in seconds 22 | (setf dur (/ len *sound-srate*)) 23 | 24 | ; set percentages for amp values 25 | (setf amp0 (* amp0 0.01)) 26 | (setf amp1 (* amp1 0.01)) 27 | 28 | ; function to stretch audio to inverse of duration 29 | (defun newstretch (dur s) 30 | (if (arrayp s) 31 | (vector (force-srate 44100 (stretch-abs (/ 1.0 dur) (sound (aref s 0)))) 32 | (force-srate 44100 (stretch-abs (/ 1.0 dur) (sound (aref s 1))))) 33 | (force-srate 44100 (stretch-abs (/ 1.0 dur) (sound s))))) 34 | 35 | ; Variable Resample function by Roger B. Dannenberg 36 | (defun variable-resample (steps snd) 37 | ; p1 helps convert steps to a ratio 38 | (let ((p1 (/ (log 2.0) 12)) ratio map) 39 | ; pitch ratio 40 | (setf ratio (s-exp (mult steps p1))) 41 | ; map from real-time to sound time 42 | (setf map (integrate ratio)) 43 | (snd-compose snd (force-srate *sound-srate* map)))) 44 | 45 | ; some of the math below may be incorrect 46 | ; 47 | ; calculate duration after warp 48 | ; this math is an assumption of 49 | ; how to calculate duration after warp 50 | ; otherwise there's an obvious click at end of audio 51 | ; when negative step values are used 52 | (defun warptime (step midtime) 53 | (* midtime (expt 2.0 (/ step -24.0)))) 54 | 55 | ; convert midtime percentage to real time 56 | (setf midtime0 (* midtime 0.01 dur)) 57 | (setf midtime1 (* (- 1.0 (* midtime 0.01)) dur)) 58 | 59 | ; approximate finish time for warp pwl 60 | ; which is then multiplied by 10 61 | ; to alleviate ending click 62 | (setf finish (* 10.0 (+ (warptime step0 midtime0) 63 | (warptime step1 midtime1)))) 64 | 65 | ; doing the warp 66 | (if (arrayp s) 67 | (vector 68 | ; left channel 69 | (newstretch dur 70 | (variable-resample 71 | (pwl 0.0 step0 midtime0 0 dur step1 finish step1) 72 | (mult (pwl 0.0 amp0 midtime 1.0 dur amp1 dur) 73 | (sound (aref s 0))))) 74 | 75 | ; right channel 76 | (newstretch dur 77 | (variable-resample 78 | (pwl 0.0 step0 midtime0 0 dur step1 finish step1) 79 | (mult (pwl 0.0 amp0 midtime 1.0 dur amp1 dur) 80 | (sound (aref s 1)))))) 81 | 82 | ; mono 83 | (newstretch dur 84 | (variable-resample 85 | (pwl 0.0 step0 midtime0 0 dur step1 finish step1) 86 | (mult (pwl 0.0 amp0 midtime 1.0 dur amp1 dur) 87 | (sound s))))) 88 | -------------------------------------------------------------------------------- /varsilence.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type generate 4 | ;name "Variable Duration Silence generator..." 5 | ;action "Generating selected length of silence..." 6 | ;info "Variable Duration silence generator by David R. Sky" 7 | 8 | ;control s1 "Silence duration 1" int "seconds" 0 0 60 9 | ;control s2 "Silence duration 2" real "seconds" 0.000 0.000 0.999 10 | 11 | ;; Variable Duration Silence Generator by David R. Sky 12 | ;; September 13, 2004 13 | ;; 14 | ;; Silence duration 1 is thousandths of a second (1/1000 s) 15 | ;; silence duration 2 is whole seconds 16 | ;; length of silence can be from 0.000 s to 60.999 s 17 | 18 | ; I wanted a specific length of silence appended to a sound 19 | ; such as Steven Jones' Risset Drum, 20 | ; in order to repeat the sound as many times as I wanted 21 | ; for a rhythmic effect 22 | 23 | (setf s1 (max 0 (min (truncate s1) 60))) 24 | (setf s2 (max 0.000 (min s2 0.999))) 25 | 26 | (s-rest (sum s1 s2)) 27 | -------------------------------------------------------------------------------- /widener.ny: -------------------------------------------------------------------------------- 1 | ;nyquist plug-in 2 | ;version 1 3 | ;type process 4 | ;name "Stereo Widener..." 5 | ;action "Widening stereo audio..." 6 | ;info "by David R. Sky\nReleased under terms of GNU Public License\n-Pan: -100=opposite channel, 0=center" 7 | 8 | ;control vol "Inverted signal volume - db" int "" -18 -48 -6 9 | ;control p "Pan position" int "" 0 -100 0 10 | ;control offset "Time offset - ms" int "" 0 0 20 11 | 12 | #| Stereo Widener by David R. Sky, October 18, 2004 13 | Updated March 19, 2006 14 | Thanks to David Walsh and Monty of the Audacity-users list 15 | for discussion and explanation of how to widen stereo. 16 | 17 | Should work properly for both North American and European 18 | audacity-Nyquist - 19 | N American uses . for decimal 20 | European uses , for decimal 21 | so calculations are done using floating whole numbers 22 | (see two setf statements) 23 | 24 | A stereo widener creates the illusion that your speakers are 25 | further apart than they really are. Stereo widening results depend 26 | on distance of your speakers from each other, the plug-in settings, 27 | and your location in relation to the speakers. 28 | 29 | This stereo widener works by inverting both left and right channels 30 | of stereo audio to some degree, then panning those inverted signals 31 | somewhere between the center pan position and the opposite channel. 32 | A time offset of up to 20ms can be applied to enhance the illusion. 33 | 34 | Variables: 35 | 36 | 1. Inverted signal volume 37 | From -48db (minimum volume) to -6db (maximum volume), default 38 | -18db. 39 | 40 | 2. Pan position 41 | From 0 (center) to -100 (opposite channel), default 0. 42 | 43 | 3. Time offset 44 | From 0 to 20ms, default 0ms. 45 | |# 46 | 47 | ; Stereo Butterfly function - used to 48 | ; change the width of the stereo field. 49 | (defun butterfly (sound width) 50 | (vector 51 | (sum (mult (aref sound 0) (sum width 1) 0.5) 52 | (mult (aref sound 1) (sum width -1) -0.5)) 53 | (sum (mult (aref sound 1) (sum width 1) 0.5) 54 | (mult (aref sound 0) (sum width -1) -0.5)))) 55 | 56 | ; convert arguments to floating values 57 | (setf offset (/ (float offset) (float 1000))) 58 | (setf p (/ (float p) (float 100))) 59 | 60 | 61 | ; applying stereo widener 62 | (if (arrayp s) 63 | (sim (cue s) 64 | (at-abs offset 65 | (cue (butterfly (mult -1 (db-to-linear vol) s) p)))) 66 | 67 | (format nil "You must apply the stereo widener to stereo audio.") 68 | ) 69 | 70 | --------------------------------------------------------------------------------