Hello. I am attempting to post this into the Nyquist forms, if I post to the wrong form, I do apologize in advance.
I was wondering if other people on this form could help me create a Nyquist generator that generates more’s code. However, I know nothing of the Nyquist programming language. What I am thinking of, is for the plug-in to have some kind of library, so that people can type in phrases, and it can be translated into Morse code, even if I off-line. This is possible if you go onto a website, however I would like to be able to do this off-line. I am thinking of 4 to 5 settings. The first setting is a combo box that allows the user to choose whether a phrase or Morse code in dots and dashes is translated into Morse code. The second setting should be an input text field, or you can type in a phrase, or actual dots and dashes in Morse code. The third setting should be the pitch in HZ. It controls the pitch in which the generator is generating the beeps The fourth sitting should be the tempo, or speed, and either W p.m., BPM, or UPS (units per second). I am not sure which would be the easiest, to have the setting in Words per minute, beats per minute order units per second, which ever is easiest for making this type of plug-in. If we’re going to use units per second, one unit should equal exactly as long as it takes to beep one dote in Morse code. The fifth sitting that we might consider, is a randomized feature. This way, you can make The track sound as if A human were using the speaker to beep morse code. Anyone have any suggestions on how this can be accomplished using a Nyquist generate plug-in?
This can be accomplished using audacity if you use the buzz tone generator, However the process can be time-consuming.
No apology needed - you’ve found exactly the right place
That can be rectified
OK, I see that you have a number of “user options” that you want to include. I’ll list them below as a handy reference while we do this, but initially I think it would be best to just get the basic functionality working, then we can add other options later.
Feature List (controls):
Choice: input as words or as dots and dashes
Text input box
Pitch control (Hz)
Tempo control: (either W p.m., BPM, or “Units per Second”)
I’ll be referring to the Nyquist manual a lot during this. Do look up the links that I post, and look at other related commands on the same page - it could give you ideas of how to progress the plug-in. The index page for the manual is here: http://www.cs.cmu.edu/~rbd/doc/nyquist/indx.html
The “Nyquist” language is based on a version of “LISP” (to be more precise, it’s based on “XLISP”).
There is also a manual for XLISP, which, although it does not include functions that are specific to Nyquist, it is very useful as it has a lot more detail and examples for LISP functions that are the basis of Nyquist. The XLISP manual is here: http://www.audacity-forum.de/download/edgar/nyquist/nyquist-doc/xlisp/xlisp-index.htm and I’ll be posting links to this too.
So now, onto the code:
The first thing is that we need to make some sort of “beep”.
Nyquist has several built-in generators. Most of them are based on the “OSC” (oscillator) function. For example, to generate a sine tone with a pitch of MIDI note 60:
While working on scripts, it is useful to see more, so we can use the “Debug” button in the Nyquist Prompt. When using the Debug button we can see error messages and all text that has been sent to standard-output. (Try running the two line example with the Debug button).
Hello! By chance have you thought on creating a graphical interface for this plugin? I mean it’s easy entering text by using the base 4 concept, but a graphical interface would facilitate quite a lot this concept making it less tedious; because for the regular user, it’s not so necesary to look up what’s behind the scenes. Thanks a lot!
(setf letter 0.12) ; length of gap between characters
(setf word 0.3) ; length of gap between words
(setf dot 0.06) ; length of dot in seconds
(setf dott 0.12) ; total length of dot including pause
(setf dash 0.18) ; length of dash in seconds
(setf dasht 0.24) ; total length of dash
That’s all standard. The only variation is speed and pitch of the tone, unless you have “swing.” I knew someone who could send “Morse” so rhythmic that only two or three other people could understand it. 1844 “encryption.”
monmouth > SUPERVISOR COMING STRAIGHTEN IT UP
baltimore > RIGHT [perfect Morse]