1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-11 09:03:36 +02:00

Update Nyquist plug-in headers

Mostly consistency updates, plus a couple of minor fixes.
Line breaks in translated control text strings do not work, so have
been removed.
Obsolete ";categories" commands removed, and ";info" commands replaced
with standard Lisp comments.
This commit is contained in:
Steve Daulton
2018-03-21 22:49:35 +00:00
parent 2ccc8eec9b
commit 975e95abad
26 changed files with 627 additions and 559 deletions

View File

@@ -1,38 +1,40 @@
;nyquist plug-in
;version 4
;type generate
;categories "http://lv2plug.in/ns/lv2core#GeneratorPlugin"
$name (_"Rhythm Track")
;manpage "Rhythm_Track"
;preview linear
$action (_"Generating Rhythm...")
$author (_"Dominic Mazzoni")
$copyright (_"Released under terms of the GNU General Public License version 2")
$nyquist plug-in
$version 4
$type generate
$name (_ "Rhythm Track")
$manpage "Rhythm_Track"
$preview linear
$action (_ "Generating Rhythm...")
$author (_ "Dominic Mazzoni")
$copyright (_ "Released under terms of the GNU General Public License version 2")
;; by Dominic Mazzoni, David R. Sky and Steve Daulton.
;; Drip sound generator by Paul Beach
;; Released under terms of the GNU General Public License version 2:
;; http://www.gnu.org/licenses/old-licenses/gpl-2.0.html .
;; 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 action (_"Action choice") choice ((_"Generate track") (_"Help screen 1") (_"Help screen 2")) 0
$control tempo (_"Tempo (beats per minute)") real (_"30 - 300 beats/minute") 120 30 300
$control timesig (_"Beats per measure (bar)") int (_"1 - 20 beats/measure") 4 1 20
$control swing (_"Swing amount") float (_"+/- 1") 0 -1 1
$control measures (_"Number of measures (bars)") int (_"1 - 1000 bars") 16 1 1000
$control click-track-dur (_"Optional rhythm track duration (minutes seconds)") string (_"Whole numbers only") ""
$control action (_ "Action choice") choice ((_ "Generate track") (_ "Help screen 1") (_ "Help screen 2")) 0
$control tempo (_ "Tempo (beats per minute)") real (_ "30 - 300 beats/minute") 120 30 300
$control timesig (_ "Beats per measure (bar)") int (_ "1 - 20 beats/measure") 4 1 20
$control swing (_ "Swing amount") float (_ "+/- 1") 0 -1 1
$control measures (_ "Number of measures (bars)") int (_ "1 - 1000 bars") 16 1 1000
$control click-track-dur (_ "Optional rhythm track duration (minutes seconds)") string (_ "Whole numbers only") ""
;;control ticklen "Individual beat duration (milliseconds)" int "1 - 100 ms" 10 1 100
$control offset (_"Start time offset (seconds)") real (_"0 - 30 seconds") 0 0 30
$control click-type (_"Beat sound") choice (
(_"Metronome tick") (_"Ping") (_"Cowbell") (_"Resonant noise") (_"Noise click") (_"Drip")
) 0
$control offset (_ "Start time offset (seconds)") real (_ "0 - 30 seconds") 0 0 30
$control click-type (_ "Beat sound") choice (
(_ "Metronome tick") (_ "Ping") (_ "Cowbell") (_ "Resonant noise") (_ "Noise click") (_ "Drip")) 0
;;control q "Noise click resonance - discernable pitch (q)" int "1 - 20" 1 1 20
$control high (_"MIDI pitch of strong beat") int (_"18 - 116") 84 18 116
$control low (_"MIDI pitch of weak beat") int (_"18 - 116") 80 18 116
$control high (_ "MIDI pitch of strong beat") int (_ "18 - 116") 84 18 116
$control low (_ "MIDI pitch of weak beat") int (_ "18 - 116") 80 18 116
;; allow q control to be commented out.
(if (not (boundp 'q))
@@ -48,7 +50,7 @@ $control low (_"MIDI pitch of weak beat") int (_"18 - 116") 80 18 116
(defun help1 ()
(format nil
(_"Rhythm Track Generator help - screen 1 of 2
(_ "Rhythm Track Generator help - screen 1 of 2
Generates a rhythm track at the selected tempo, beats per
measure, and either number of measures or track duration,
@@ -80,7 +82,7 @@ restart Rhythm Track and select from 'Action choice'."))) ;end of help1
(defun help2 ()
(format nil
(_"Rhythm Track Generator help - screen 2 of 2
(_ "Rhythm Track Generator help - screen 2 of 2
'Start time offset': makes the rhythm track start at a later
time than the very beginning (zero seconds), maximum
@@ -156,43 +158,43 @@ restart Rhythm Track and select from 'Action choice'."))) ;end of help 2
; tempo
(if (= (check tempo 30 300) 1)
(setq error-msg (strcat error-msg (format nil
(_"Tempo ~a outside valid range 30 to 300 bpm
(_ "Tempo ~a outside valid range 30 to 300 bpm
") tempo))))
;beats per measure
(if (= (check timesig 1 20) 1)
(setq error-msg (strcat error-msg (format nil
(_"Beats per measure ~a outside valid range 1 to 20
(_ "Beats per measure ~a outside valid range 1 to 20
") timesig))))
;number of measures
(if (= (check measures 1 1000) 1)
(setq error-msg (strcat error-msg (format nil
(_"Number of measures ~a outside valid range 1 to 1000
(_ "Number of measures ~a outside valid range 1 to 1000
") measures))))
;time start offset
(if (= (check offset 0 30) 1)
(setq error-msg (strcat error-msg (format nil
(_"Time offset ~a outside valid range 0 to 30 seconds
(_ "Time offset ~a outside valid range 0 to 30 seconds
") offset))))
; q
(if (= (check q 1 20) 1)
(setq error-msg (strcat error-msg (format nil
(_"Filter quality q ~a outside valid range 1 to 20
(_ "Filter quality q ~a outside valid range 1 to 20
") q))))
;high MIDI pitch
(if (= (check high 18 116) 1)
(setq error-msg (strcat error-msg (format nil
(_"High MIDI pitch ~a outside valid range 18 to 116
(_ "High MIDI pitch ~a outside valid range 18 to 116
") high))))
;low MIDI pitch
(if (= (check low 18 116) 1)
(setq error-msg (strcat error-msg (format nil
(_"Low MIDI pitch ~a outside valid range 18 to 116
(_ "Low MIDI pitch ~a outside valid range 18 to 116
") low))))
;validate string
@@ -203,7 +205,7 @@ restart Rhythm Track and select from 'Action choice'."))) ;end of help 2
(not (integerp (first m-s))) ;first is not an integer or
(and (= (length m-s) 2)(not (integerp (second m-s))))) ;second is not an integer
(setq error-msg (strcat error-msg (format nil
(_"If used, 'Optional rhythm track duration' must be
(_ "If used, 'Optional rhythm track duration' must be
entered as either one number (seconds), or two
numbers (minutes seconds) separated by a space.
Use whole numbers only.~%")))))
@@ -212,7 +214,7 @@ Use whole numbers only.~%")))))
(= (length m-s) 1) ;one integer and
(= (check (first m-s) 0 3660) 1)) ;outside valid range
(setq error-msg (strcat error-msg (format nil
(_"~a seconds is outside valid range 0 to 3660~%") (first m-s)))))
(_ "~a seconds is outside valid range 0 to 3660~%") (first m-s)))))
;one or two integers
((and
(= (length m-s) 2) ;2 integers and
@@ -220,7 +222,7 @@ Use whole numbers only.~%")))))
(= (check (first m-s) 0 60) 1) ;1st is outside valid range or
(= (check (second m-s) 0 59) 1))) ;2nd is outside valid range or
(setq error-msg (strcat error-msg (format nil
(_"~a is outside valid range 0 to (60 59)~%")
(_ "~a is outside valid range 0 to (60 59)~%")
m-s))))))) ;end of error checking
(defun metronome-tick (hz peak)
@@ -366,4 +368,4 @@ Use whole numbers only.~%")))))
(make-click-track measures (* timesig beatlen)))) ;click track
;Else error message
(setq error-msg (strcat (format nil
(_"Error.~%You have entered at least one invalid value:~%~%")) error-msg)))))
(_ "Error.~%You have entered at least one invalid value:~%~%")) error-msg)))))