/usr/share/audacity/plug-ins/vocalremover.ny is in audacity-data 2.1.2-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 | ;nyquist plug-in
;version 3
;type process
;preview linear
;categories "http://lv2plug.in/ns/lv2core#UtilityPlugin"
;name "Vocal Remover..."
;action "Removing center-panned audio..."
;info "For reducing center-panned vocals"
;author "Steve Daulton"
;copyright "Released under terms of the GNU General Public License version 2"
;; This version of vocalremover.ny by Steve Daulton June 2013.
;;
;; based on Center pan Remover by David R. Sky November 12, 2004
;; Modified by Gale Andrews January 2008 to make full spectrum removal
;; the default, restore a single Help screen and restore error checking.
;; Thanks to David Hostetler for notes in his own vocal remover plug-in,
;; http://www.freelists.org/archives/audacity4blind/06-2006/msg00049.html
;;
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
;control action "Remove vocals or view Help" choice "Remove vocals,View Help" 0
;control band-choice "Removal choice" choice "Simple (entire spectrum),Remove frequency band,Retain frequency band" 0
;control low-range "Lower frequency band limit (Hz)" string " " "500"
;control high-range "Upper frequency band limit (Hz)" string " " "2000"
; Initialize globals
(setf message "") ; empty output message
(defun help ()
(format nil
"Vocal Remover requires a stereo track. It works best with
lossless files like WAV or AIFF, rather than MP3 or
other compressed formats. It only removes vocals or other
audio that is panned to center (sounds equally loud in left
and right). Vocals may be mixed this way. Inverting one
channel then panning both to center cancels out any audio
which was originally center-panned, making it inaudible.
This can remove some parts of the audio you may want to
keep, such as drums, which are also often mixed to center.
If the vocals and other centered parts differ in pitch,
this can be solved by removing only selected frequencies.~%
Vocal Remover thus has three choices of removal method.
'Simple' inverts the entire frequency spectrum of one
channel. This may remove too much music if other parts of
the audio are centered as well as the vocals. In that case,
try the other choices. If the vocals are at a different
pitch than the other audio (such as a high female voice),
try 'Remove frequency band'. This only removes frequencies
between a lower and upper limit which you can enter in the
'Frequency band...' boxes. Experiment by entering what
sounds like the most significant frequency range of the
original vocals. If the other choices remove too much
audio in a particular frequency range (such as low drums
or bass), try 'Retain frequency band'. This only removes
frequencies outside the limits, retaining the others."))
(defun string-to-list (str)
(read (make-string-input-stream (format nil "(~a)" str))))
;;; ERROR CHECKING:
;; Check that selected audio is stereo
(defun check-stereo ()
(if (soundp s)
(setf message (format nil
"~%Vocal Remover requires an unsplit, stereo track.~%~
If you have a stereo track split into left and right~%~
channels, use 'Make Stereo Track' on the Track~%~
Drop-Down Menu, then run Vocal Remover again.~%"))))
;;; Check that frequency range is valid
(defun check-range ()
(setq low-range (first (string-to-list low-range)))
(setq high-range (first (string-to-list high-range)))
(if (or (not (numberp low-range))
(not (numberp high-range))
(< low-range 0)
(> low-range 20000)
(< high-range 0)
(> high-range 20000))
(progn
(if (= band-choice 1)
(setf band-type "remove")
(setf band-type "retain"))
(setf message (format nil
"~a~%~
Enter both a lower and an upper limit for the~%~
frequency band you want to ~a.~%~
You entered: \"~a\" \"~a\"~%~%~
Both values must be between 0 and 20000."
message
band-type
low-range
high-range)))
;; Else ensure that high-range > low-range.
(let ((temp low-range))
(when (> low-range high-range)
(setq low-range high-range)
(setq high-range temp))))
;; Range values must cannot be higher than Nyquist frequency.
(setq low-range (min low-range (/ *sound-srate* 2)))
(setq high-range (min high-range (/ *sound-srate* 2))))
(defun show-message ()
;; output to both message box and to debug window
;; Copying from debug window is supported on all platforms.
(when (= action 0) ; error
(setf message (format nil "Error.~%~a" message)))
(format t message)
(format nil message))
;;; DSP FUNCTIONS:
(defun bandpass (sig low high)
(lowpass8
(highpass8 sig low)
high))
(defun bandstop (sig low high)
(sum (lowpass8 sig low)
(highpass8 sig high)))
(defun CentrePanRemove ()
(cond
((= band-choice 1) ; remove frequencies inside range
(sum (aref s 0)
(mult -1 (aref s 1))
(bandstop (aref s 1) low-range high-range)))
((= band-choice 2) ; remove frequencies outside range
(sum (aref s 0)
(mult -1 (aref s 1))
(bandpass (aref s 1) low-range high-range)))
(t ; invert and add right to left channel
(sum (aref s 0)
(mult -1 (aref s 1))))))
;;; MAIN PROGRAM:
(cond
((= action 1) ; Show help
(setf message (help)))
((= band-choice 0) ; Remove full spectrum
(check-stereo))
(t ; Remove band limited
(check-stereo)
(check-range)))
(if (= (length message) 0)
(CentrePanRemove)
(show-message))
|