mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-12 09:33:34 +02:00
Usage of _ in Nyquist program bodies
This commit is contained in:
@@ -48,7 +48,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,
|
||||
@@ -75,12 +75,12 @@ If you enter a value into this field, the 'number of measures'
|
||||
value will be ignored.
|
||||
|
||||
To generate rhythm track or view help screen 2,
|
||||
restart Rhythm Track and select from 'Action choice'.")) ;end of help1
|
||||
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
|
||||
@@ -95,7 +95,7 @@ what pitch to use. C-notes are:
|
||||
C# (C-sharp) above middle C is 61.
|
||||
|
||||
To generate rhythm track or view help screen 1,
|
||||
restart Rhythm Track and select from 'Action choice'.")) ;end of help 2
|
||||
restart Rhythm Track and select from 'Action choice'."))) ;end of help 2
|
||||
|
||||
|
||||
;Check function: returns 1 on error
|
||||
@@ -156,44 +156,44 @@ 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))))
|
||||
(_"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
|
||||
" timesig))))
|
||||
(_"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
|
||||
" measures))))
|
||||
(_"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
|
||||
" offset))))
|
||||
(_"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
|
||||
" q))))
|
||||
(_"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))))
|
||||
(_"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))))
|
||||
(_"Low MIDI pitch ~a outside valid range 18 to 116
|
||||
") low))))
|
||||
|
||||
;validate string
|
||||
(if (> (length m-s) 0) ;if at least one item
|
||||
@@ -203,16 +203,16 @@ 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 (seconds0, or two
|
||||
numbers (minutes seconds) separated by a space.
|
||||
Use whole numbers only.~%"))))
|
||||
Use whole numbers only.~%")))))
|
||||
;one or two integers
|
||||
((and
|
||||
(= (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 +220,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 +366,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)))))
|
||||
|
Reference in New Issue
Block a user