1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-04 17:49:45 +02:00
audacity/plug-ins/tremolo.ny
Paul Licameli da39cc451f Remove redundant ellipses from names in .ny files...
... The code that parses the header was always just throwing them out.

The code that populates menus deduces whether to add ellipses, as there are
controls or not, regardless what the $name line said.
2018-03-02 20:11:54 -05:00

51 lines
1.5 KiB
Common Lisp

;nyquist plug-in
;version 3
;type process
;preview linear
;categories "http://lv2plug.in/ns/lv2core#ModulatorPlugin"
$name (_"Tremolo")
;manpage "Tremolo"
;debugbutton disabled
$action (_"Applying Tremolo...")
$author (_"Steve Daulton")
$copyright (_"Released under terms of the GNU General Public License version 2")
;; tremolo.ny by Steve Daulton (www.easyspacepro.com) July 2012.
;; Based on Tremolo by Dominic Mazzoni and David R. Sky."
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
;;
;; For information about writing and modifying Nyquist plug-ins:
;; https://wiki.audacityteam.org/wiki/Nyquist_Plug-ins_Reference
$control wave (_"Waveform type") choice ((_"sine") (_"triangle") (_"sawtooth") (_"inverse sawtooth") (_"square")) 0
$control phase (_"Starting phase (degrees)") int "" 0 -180 180
$control wet (_"Wet level (percent)") int "" 40 1 100
$control lfo (_"Frequency (Hz)") float-text "" 4 0.001 1000
; Convert % to linear
(setq wet (/ wet 200.0))
; set tremolo waveform
(setq waveform
(abs-env
(case wave
(0 *sine-table*)
(1 *tri-table*)
; sawtooth
(2 (maketable (pwlv -1 0.995 1 1 -1)))
; inverse sawtooth
(3 (maketable (pwlv -1 0.005 1 1 -1)))
; square
(4 (maketable (pwlv -1 0.005 1 0.5 1 0.505 -1 1 -1))))))
;;; Generate modulation wave
(defun mod-wave (level)
(when (= wave 0)
(setq phase (- phase 90)))
(sum (- 1 level)
(mult level
(osc (hz-to-step lfo) 1.0 waveform phase))))
(mult s (mod-wave wet))