ERROR IN TEXT TO MUSIC

WHAT DO I NEED TO ADD IN HEER I KEEP GETTING ERROR MESSAGE. WHY?



432-filenameic..."
;action "source to music generator..."
;info " By curtisfullmvgaya. GPL v2.\n\n generates text to music with sing and chanting and light language."
;; generator.ny by curtisfullmvgay, March 2011
;; Version 1.0
;; Released under terms of the GNU General Public License version 2
;; http://www.gnu.org/licenses/gpl-2.0.html


;control notes "MIDI Note List" string "" "c2 c3 ef4 g4 bf4 c5"
;control MIDI "instruments-generator" choice "electic-guitar-generator,electic-piano-generator" 0
;control MIDI-VOICE1 "EN-LIGHT-LANGUAGE-VOICE1" choice "male-voice-chanter_gen,female-voice-chanter_gen" 0 
;control MIDI-VOICE2 "EN-LIGHT-LAGGUAGE-VOICE2" choice "female-back-ground-vice-chanter_gen,male-back-ground-voice-chanter_gen" 0
;control 432-filename "432-FILENAME" file "" OPEN
;control n "Number of Harmonics" int "" 8 1 32
;control dur "Duration" int "sec" 10 1 30
;control bw "Band Width" int "Hz" 2 1 1000
;control mode "Odd Harmonics Only" int "0=all 1=odd" 0 0 1


SWS

IF 432-filename = electic-guitar-.5(list(c4, d4, e4, f4))

IF 432-filename = ""(list(c4, d4, e4, f4))
print next(432-filename, t)


IF 13-1 = electic-guitar,elect-piano .5({a b c})
IF 13-2 = male-voice-chanter_gen,({x y z})
IF 13-2 = female-voice-chanter_gen({x y z})
IF 13-2 = female-back-ground-vice-chanter_gen({x y z})
IF 13-2 = male-back-ground-voice-chanter_gen({x y z})
IF 13-3 = electic-guitar,electic-piano(list(13-1, 13-2)

exec .5(i, 9, 432-*.txt,*.doc,(t, "~A4 ", next(13-13)))




IF 432-pattern = electic-guitar-13(list(C4, D4, E4, F4, A4))
IF-gen(dur: 0.4, text: ""(electic-guitar,electi-piano),
          432: next(432-pattern), score-len: 9)


;; Format user's MIDI-VOICE1-MIDI-VOICE2, MIDI note list into a LISP expression and evaluate. The
;; result is assigned to symname.
;;
(defun eval-string-to-list (symname str)
  (let ((form (strcat "(setq " symname " (list " str "))")))
    (eval (read (make-string-input-stream form)))))


;; A noisy sine wave oscillator. Uses filtered noise to ring modulate sine
;; wave.
;;
(defun nseosc (hz dur bw)
  (mult (osc (hz-to-step hz) dur)
	(lowpass4 (noise dur) bw)))


;; An n "harmonic" noisy oscillator.
;;
(defun hnosc (pitch dur &key (bw 100)(n 8)(odd nil))
  (let (hz ffn j)
    (setq hz (step-to-hz pitch))
    (setq ffn (if odd 
		  #'(lambda (j)(* hz (+ (* j 2) 1)))
		#'(lambda (j)(* hz j))))
    (simrep (i (truncate n))
	    (progn 
	      (setq j (+ i 1)) 
	      (scale (/ 1.0 j)
		     (nseosc (funcall ffn j) dur bw))))))

	


;; Evaluate user's note list and generate tone.
;;
(eval-string-to-list "notelist" notes)
(setq rawsig (simrep (i (length notelist))
		     (hnosc (nth i notelist) dur :bw bw :n n :odd (= mode 1)))) 

;; Noramlize.
;;
(setq peakamp (peak rawsig ny:all))
(scale (* 0.95 (/ 1.0 peakamp)) rawsig)

debuged:

432-filenameic..."
;action "source to music generator..."
;info " By curtisfullmvgaya. GPL v2.\n\n generates text to music with sing and chanting and light language."
;; generator.ny by curtisfullmvgay, March 2011
;; Version 1.0
;; Released under terms of the GNU General Public License version 2
;; http://www.gnu.org/licenses/gpl-2.0.html


;control notes "MIDI Note List" string "" "c2 c3 ef4 g4 bf4 c5"
;control MIDI "instruments-generator" choice "electic-guitar-generator,electic-piano-generator" 0
;control MIDI-VOICE1 "EN-LIGHT-LANGUAGE-VOICE1" choice "male-voice-chanter_gen,female-voice-chanter_gen" 0 
;control MIDI-VOICE2 "EN-LIGHT-LAGGUAGE-VOICE2" choice "female-back-ground-vice-chanter_gen,male-back-ground-voice-chanter_gen" 0
;control 432-filename "432-FILENAME" file "" OPEN
;control n "Number of Harmonics" int "" 8 1 32
;control dur "Duration" int "sec" 10 1 30
;control bw "Band Width" int "Hz" 2 1 1000
;control mode "Odd Harmonics Only" int "0=all 1=odd" 0 0 1


SWS

IF 432-filename = electic-guitar-.5(list(c4, d4, e4, f4))

IF 432-filename = ""(list(c4, d4, e4, f4))
print next(432-filename, t)


IF 13-1 = electic-guitar,elect-piano .5({a b c})
IF 13-2 = male-voice-chanter_gen,({x y z})
IF 13-2 = female-voice-chanter_gen({x y z})
IF 13-2 = female-back-ground-vice-chanter_gen({x y z})
IF 13-2 = male-back-ground-voice-chanter_gen({x y z})
IF 13-3 = electic-guitar,electic-piano(list(13-1, 13-2)

exec .5(i, 9, 432-*.txt,*.doc,(t, "~A4 ", next(13-13)))




IF 432-pattern = electic-guitar-13(list(C4, D4, E4, F4, A4))
IF-gen(dur: 0.4, text: ""(electic-guitar,electi-piano),
          432: next(432-pattern), score-len: 9)


;; Format user's MIDI-VOICE1-MIDI-VOICE2, MIDI note list into a LISP expression and evaluate. The
;; result is assigned to symname.
;;
(defun eval-string-to-list (symname str)
  (let ((form (strcat "(setq " symname " (list " str "))")))
    (eval (read (make-string-input-stream form)))))


;; A noisy sine wave oscillator. Uses filtered noise to ring modulate sine
;; wave.
;;
(defun nseosc (hz dur bw)
  (mult (osc (hz-to-step hz) dur)
	(lowpass4 (noise dur) bw)))


;; An n "harmonic" noisy oscillator.
;;
(defun hnosc (pitch dur &key (bw 100)(n 8)(odd nil))
  (let (hz ffn j)
    (setq hz (step-to-hz pitch))
    (setq ffn (if odd 
		  #'(lambda (j)(* hz (+ (* j 2) 1)))
		#'(lambda (j)(* hz j))))
    (simrep (i (truncate n))
	    (progn 
	      (setq j (+ i 1)) 
	      (scale (/ 1.0 j)
		     (nseosc (funcall ffn j) dur bw))))))

	


;; Evaluate user's note list and generate tone.
;;
(eval-string-to-list "notelist" notes)
(setq rawsig (simrep (i (length notelist))
		     (hnosc (nth i notelist) dur :bw bw :n n :odd (= mode 1)))) 

;; Noramlize.
;;
(setq peakamp (peak rawsig ny:all))
(scale (* 0.95 (/ 1.0 peakamp)) rawsig)

i am getting no audio now for some reason when i am trying to select ah text file to stream into generate the mp3.
can some please help to figure this out? and what to add?


432-filenameic..."
;action "source to music generator..."
;info " By curtisfullmvgaya. GPL v2.\n\n generates text to music with sing and chanting and light language."
;; generator.ny by curtisfullmvgay, March 2011
;; Version 1.0
;; Released under terms of the GNU General Public License version 2
;; http://www.gnu.org/licenses/gpl-2.0.html


;control notes "MIDI Note List" string "" "c2 c3 ef4 g4 bf4 c5"
;control MIDI "instruments-HARMONIC" choice "" "electic-guitar-generator,electic-piano-generator" 0
;control MIDI-VOICE1 "VOICEl-en-light-language" choice "En-male-voice-chanter_gen,female-voice-chanter_gen" 0 
;control MIDI-VOICE2 "VOICEl-en-light-language" choice "en-female-back-ground-vice-chanter_gen,male-chanter_gen" 0
;control 432-filename "432-FILENAME.txt" file "" open
;control n "Number of Harmonics" int "" 8 1 32
;control dur "Duration" int "sec" 10 1 30
;control bw "Band Width" int "Hz" 2 1 1000

;control Mode "Odd Harmonics Only" int "0=all 1=odd" 0 0 1
;control Mode "Fm-voice" int "0=all "1-FM-VOICE " 0 0 1



IF 432-filename = electic-guitar-.5(list(c4, d4, e4, f4))

IF 432-filename = ""(list(c4, d4, e4, f4))
print next(432-filename, t)


IF 13-1 = electic-guitar,elect-piano .5({a b c})
IF 13-2 = male-voice-chanter_gen,({x y z})
IF 13-2 = female-voice-chanter_gen({x y z}\)
IF 13-2 = female-back-ground-vice-chanter_gen({x y z})
IF 13-2 = male-back-ground-voice-chanter_gen({x y z})
IF 13-3 = electic-guitar,electic-piano(list(13-1, 13-2)
exec .5(i, 9, 432-*.txt,*.doc,(t, "~A4 ", next(13-13)))




IF 432-pattern = electic-guitar-13(list(C4, D4, E4, F4, A4))
IF-gen(dur: 0.4, text: ""(electic-guitar,electi-piano),
          432: next(432-pattern), score-len: 9)



;; Format user"s MIDI note list into a LISP expression and evaluate. The
;; result is assigned to symname.
;;
(defun eval-string-to-list (symname str)
  (let ((form (strcat "(setq " symname " (list " str "))")))
    (eval (read (make-string-input-stream form)))))


;; A noisy sine wave oscillator. Uses filtered noise to ring modulate sine
;; wave.
;;
(defun nseosc (hz dur bw)
  (mult (osc (hz-to-step hz) dur)
	(lowpass4 (noise dur) bw)))


;; An n "harmonic" noisy oscillator.
;;
(defun hnosc (pitch dur &key (bw 100)(n 8)(odd nil))
  (let (hz ffn j)
    (setq hz (step-to-hz pitch))
    (setq ffn (if odd 
		  #"(lambda (j)(* hz (+ (* j 2) 1)))
		#"(lambda (j)(* hz j))))
    (simrep (i (truncate n))
	    (progn 
	      (setq j (+ i 1)) 
	      (scale (/ 1.0 j)
		     (nseosc (funcall ffn j) dur bw))))))

	


;; Evaluate user"s note list and generate tone.
;;
(eval-string-to-list "notelist" notes)
(setq rawsig (simrep (i (length notelist))
		     (hnosc (nth i notelist) dur :bw bw :n n :odd (= mode 1)))) 

;; Noramlize.
;;
(setq peakamp (peak rawsig ny:all))
(scale (* 0.95 (/ 1.0 peakamp)) rawsig)

The very first line of your code is an error:

432-filenameic..."

There are many other errors. For example, none of this is valid Nyquist code:

SWS

IF 432-filename = electic-guitar-.5(list(c4, d4, e4, f4))

IF 432-filename = ""(list(c4, d4, e4, f4))
print next(432-filename, t)


IF 13-1 = electic-guitar,elect-piano .5({a b c})
IF 13-2 = male-voice-chanter_gen,({x y z})
IF 13-2 = female-voice-chanter_gen({x y z})
IF 13-2 = female-back-ground-vice-chanter_gen({x y z})
IF 13-2 = male-back-ground-voice-chanter_gen({x y z})
IF 13-3 = electic-guitar,electic-piano(list(13-1, 13-2)

exec .5(i, 9, 432-*.txt,*.doc,(t, "~A4 ", next(13-13)))




IF 432-pattern = electic-guitar-13(list(C4, D4, E4, F4, A4))
IF-gen(dur: 0.4, text: ""(electic-guitar,electi-piano),
          432: next(432-pattern), score-len: 9)

You will need to refer to the Nyquist manual: http://www.cs.cmu.edu/~rbd/doc/nyquist/

Additional documentation can be found in the Audacity manual: https://manual.audacityteam.org/man/nyquist.html
and in the Audacity wiki: https://wiki.audacityteam.org/wiki/Nyquist_Audio_Programming

curtisfullmvgaya ,

I’ve never used Nyquist and I’ve never done any audio programming, but I have done quite a bit of programming in various languages.

The “trick” is to start with something simple that works and “develop” your code a little at a time, testing and debugging as you go. So start with a simple working example and then modify and add-to the example. If you can add one line at a time that’s fine as long a it “makes sense” to the Nyquist interpreter.

And, it’s helpful if your added-code “does something” testable, such as make a sound or print-out a message. If I’m writing a regular computer program I’ll display little debug messages like “starting loop” or I’ll display variable values, or whatever so I can “see” what the program is doing, and what it’s not doing. Then once everything is working (or that part of the program is working) I can take-out or comment-out those messages.

So normally, you don’t just start at the top and work-down. You have to start with something that works, and something that you can tell if it’s working. Then add code that does something that you an try or test.

Of course, professional programmers write more than one line of code at a time, and sometimes the program won’t run if a section of code isn’t “complete”, but NOBODY writes the whole program at once… Programs are written and tested in manageable parts.

I see you’ve started with the “Harmonic Noise” plug-in from here:
https://wiki.audacityteam.org/wiki/Nyquist_Generate_Plugins#Harmonic_Noise

I don’t understand what you are trying to do with it. You appear to be adding code in a different computer language (BASIC perhaps?), but Nyquist scripts have to be written in the Nyquist programming language.

For example, in the Nyquist language, an “IF” statement is written like this:

(setf val 7)

(if (> val 10)
    (print "val is greater than 10")
    (print "val is less than or equal to 10"))

If you try changing the value of “val” in the first line, you will see that;
if the value is greater than 10, it prints “val is greater than 10”,
otherwise it prints “val is less than or equal to 10”.