8bit_coder wrote:- Code: Select all
(1 (s-min *track* 1)))
What does this do?
If the signal is "valid" (not exceeding 0dB), then *track* will be less than 1, so this code does nothing, so why is it there?
8bit_coder wrote:- Code: Select all
(1 (mult -1 sig)(s-min *track* amt)(mult -1 sig))
What is "sig" in this code?
Try running the plug-in with the debug button and the option "Negative only" and you will see the error:
- Code: Select all
error: unbound variable - SIG
That indicates that the variable "sig" has not been bound to anything - it doesn't have a value, it's just an undefined symbol.
8bit_coder wrote:- Code: Select all
(s-min *track* -amt)
No that's not logical in Nyquist / LISP.
Try running this code in the Nyquist Prompt with the debug button:
- Code: Select all
(setf arg 4)
(print -arg)
The debug output says:
- Code: Select all
error: unbound variable - -ARG
The symbol "-arg" is NOT the inverse of "arg". It is just another symbol, unrelated to "arg".
To get the inverse of "arg" you could write:
- Code: Select all
(mult -1 arg)
or more simply:
- Code: Select all
(- arg)
(in the latter case, note the space between "-", which is the function name, and "arg" which is the argument being passed to the function.)
Even then it does not really make much sense. Let's put in a value:
- Code: Select all
(setf amt 0.5)
(s-min *track* (- amt))
What this will do, is to return the minimum of *track* and -0.5. Try it, and I think it will become clear.