Thanks for the update.
That’s OK, I don’t like using underscores [grin] and I don’t like using function names for variables {there is a Nyquist function (sound) }
but it’s perfectly legal so I have no objections.
I also don’t particularly like to use single characters for variables - especially lower case “L”, though I will sometimes use an “i” or “j” as a loop counter.
I don’t think there’s any mention of variable naming in the Conventions for Nyquist Plug-ins topic, but as Edgar-rtf recently posted,
Nyquist can only read ASCII characters from ASCII 0 to 127 (as documented in the XLISP appendix of the Nyquist manual), everything else causes problems.
so perhaps there should perhaps be some mention in the “Conventions” topic.
Thanks also for the additional “user notes”. I’m not yet sure how user notes will be handled on the wiki, but I’ll check that out.
There isn’t really a “common practice” yet. I tend to delete old versions of my plug-ins so that people will download the correct version. Sometimes it would be useful to be able to look back over old versions, but I don’t see any convenient way to do that with the forum software without incurring the likelihood of other forum users downloading the wrong version.
Re. the code.
There’s still a slight chink in the armour against misuse which is if the audio track has a low sample rate (for example 8000 Hz).
I think there is a good case for limiting the input values to the slider range, as these are well chosen “sensible” values for the purpose of the plug-in. However, if you particularly want to allow room for experimental “effect”, the range could be limited to a proportion of the sample rate, for example:
(setq eeqfc (max (min eeqfc (/ *sound-srate* 2.0)) 1))
For “experimental effects” the other controls could perhaps be left unrestricted ? Extreme values may not provide particularly useful output, but I don’t think they cause any problems in any version of Audacity. The only input value that I think really needs to be limited is the frequency (for the reasons discussed previously), though I think it would be equally valid to restrict values to sensible ranges (same as the slider values?)