Generate tone series in Nyquist

How would it be possible to create a series of tones from a string of text using a Nyquist plugin? It seems like it should be simple to do but I can not figure out how. What I am trying to make is the following:

a4 = 435 Hz
input: output
0: c4
1: cs4
2: d4
3: ds4
4: e4
5: f4
6: fs4
7: g4
8: gs4
9: a4
A: as4
B: b4

For instance, if I entered 18B2, I would get 274.033 Hz, 410.585 Hz, 488.271 Hz and 290.328 Hz in that order and I would be able to save as a sound file. I’d like to be able to input volume, length of each tone and (of course) the string. My purpose for this is to create music from the digits of the mathematical constant π in base 12.

Any help is greatly appreciated!

You could try dissecting David Sky’s Morse code generator plug-in, (copy attached in zip file).
As it converts a string of characters (alphanumeric) into dah-dit-dah type sounds, which is similar to what you are trying to achieve. (3.9 KB)

Why are you using 435 Hz? A4 is usually 440 Hz.

David R Sky was working on a “sequencer” plug-in, but sadly he died before it was ever released. I don’t think that it was quite complete but if anyone has a copy of what he was working on I’d be interested in finishing it.

The basic principle for making this in Nyquist is fairly simple. Here’s some ideas and key functions:
Input data with text input:

;control variable-name "text-left" string "text-right" "initial-string"

Generate a tone at given pitch - “number” is the midi note number - 60 is middle C

(osc number)

Set volume with (scale …)

(scale amount sound)

Here’s a little bit of code that produces a series of notes at different amplitudes. You can run this by selecting part of a track and then click on “Nyquist Prompt” from the Effects menu, then copy and paste this code into the Nyquist Prompt text box:

(defun note (pitch dur amp) 
  (scale-db (- amp 12)(osc pitch dur *table*)))

 (note c4 i lp)
 (note d4 i lpp)
 (note f4 i lmp)
 (note g4 i lmf)
 (note d4 q lf)))

In the above example, notation is based on the Adagio score language. See here:

David’s Audacity plug-in webpage is not being maintained …

Most of his released plug-ins are available from the main Audacity web site\

Thanks to Trebor for bringing this up - it caused me to check the list and it appears that a working version of his sequencer is available on the Audacity site. It is called “Audio selection Sequencer 2”.

I note the zip-file from that page containing David’s “stereo widener” won’t open on my computer.
I’ve repackaged the NY file in a zip, attached. (1.14 KB)

Have you tested all of them? :astonished:
Well spotted Trebor, I’ll bring it to the attention of one of the site admin.

Thanks, Trebor. I finally got around to changing the corrupt zip on the server. I think it’s OK (works in IE and Firefox). Chrome insists on pulling the old corrupt file despite clearing the download list, but that must be a Chrome bug.


Widener zip from now opens no problem on my computer,

(BTW I’m using firefox) .