The system administrator has tweaked some settings. You should now be able to post the full plug-in.
Before you do, there’s a few details that I noticed that you may want to change:
-
Use spaces rather than tabs.
The problem with tabs is that the amount of space they create depends on the text editor that you are using. The code may look beautifully laid out and clear in one text editor, and be all over the place in another, simply due to different tab sizes.
For LISP languages (including Nyquist) it is common to use two spaces for each indent level.
-
Avoid dangling parentheses.
LISP languages tend to use a lot of short lines and many indentation levels which make dangling parentheses cumbersome:
;; Good
(defun test (param)
(let ((val (* param 2)))
(if (> val 42)
val
(- val 100))))
;; Bad
(defun test (param)
(let ((val (* param 2)
)
)
(if (> val 42)
val
(- val 100)
)
)
)
-
;name "fade 'n silence"
Is that a typo?
By convention, names of effects are capitalised, and it is highly recommended to avoid punctuation characters.
I’m unsure what you meant, but perhaps something like:
;name "Fade in Silence"
-
;author "Steve Daulton & Samse26"
Avoid special characters in header strings. I don’t think there’s a problem in this specific case, but in some cases they can cause weird bugs. Best to stick with normal “safe” characters a to z, A to Z, 0 to 9, hyphen (“-”), space, and underscore (“_”).
Better as:
;author "Steve and Samse26"
or just:
;author "Samse26"
with a comment about where you got the other code:
;; Based on code from: https://forum.audacityteam.org.whatever
- Code comments
I often add far too many code comments. This is intentional because there’s not many code examples available for people learning Nyquist, so I add them to help people that are unfamiliar with Nyquist. For “production code” it is better to only add code comments when necessary. It’s much better to try to write code that is self explanatory.
A classic example of bad commenting:
; l ("L") is the label list
; The "nl" function adds a new label to the label list
(setf l (nl 0 4 str))
Much better is:
(setf labels (add-label 0 4 str))
(Adding the “manual” as comments at the top of the file as you’ve done is often useful)