Nyquist Plugin HEADS UP

<>

Correct - and this can be a problem when copying and pasting code that has been posted on the forum. For example, if you use the “SELECT ALL” link then copy the code below, the forum software appears to add leading white-space at the beginning of the line.

123

so when it is pasted you may get “[space][space][space][space]123” instead of “123”. (I get this effect using Firefox on Linux - not sure if it’s the same for other browsers/platforms). Selecting the text by click and drag avoids this problem.

In a Nyquist plug-in, the header code is “special” in that it passes information to Audacity, and not to Nyquist (the leading semi-colon makes it a comment for Nyquist so it is ignored). For Nyquist, spaces are ignored, even though the complete line (including white-space) is read, but for Audacity white-space is important and “[space][space][space][space]123” is not the same as “123”.

I’m unable to produce this issue. There should be no difference between using upper or lower case anywhere in a plug-in (other than characters are different, such as upper case “#” becoming a “~”) as Nyquist code is not case sensitive.

The following code should work whether “REAL” is upper case or lower case:

;nyquist plug-in
;version 1
;type process
;name "!Test..."
;action "Testing..."
;control p "Parameter" real "REAL" 0 0 100
(print p)



As described here: Audacity and Nyquist
version 1 plug-ins only support one type of input control - the slider. As I have recommended previously, Audacity 1.3.12 supports version 3 plug-ins which extend the capabilities of Nyquist plug-ins and include text input and multiple choice input.

As you say, even with version 1 plug-ins, the sliders do not have to use the sliders, you type directly into the control parameter, though slider widgets will always display a slider.

This is another limitation in old versions of Audacity.

In old versions of Audacity, if “any slider is focused all the values get rounded to the nearest slider “tick”. Slider ticks, for floating point controls, come every 1/1000th of the range. Meanwhile the display values are rounded to the nearest thousandth, hundredth, tenth, or unit depending on the range. If the range is 0-30, for example,
display values are rounded to the nearest .1 and ticks are every .03”
http://audacity.238276.n2.nabble.com/Inputting-exact-values-into-Audacity-Nyquist-effects-td3850278.html#a3850278
This (unfortunate) behaviour was updated last year so that this no longer occurs. However, in Audacity 1.3.12, entering a floating point value in a slider control where the data type is set to “real” does not force the assigned variable to be a float. It merely allows the value to be a float. If you need to force the value to be a float you must do so explicitly after the control. For example;

In Audacity 1.2.6 the following always returns “float”.

;nyquist plug-in
;version 1
;type process
;name "!Test..."
;action "Testing..."
;control p "Parameter" real "REAL" 0 0 100

(if (integerp p)(print "integer")
   (if (floatp p)(print "float")(print "not integer or float")))

whereas in Audacity 1.3.12, it will return “integer” for integer values and “float” for floating point values.
If you require “p” to be a float, you can set it explicitly like this:

;nyquist plug-in
;version 1
;type process
;name "!Test..."
;action "Testing..."
;control p "Parameter" real "REAL" 0 0 100

(setq p (float p))
(if (integerp p)(print "integer")
   (if (floatp p)(print "float")(print "not integer or float")))

Of course I would not dream of trying to pressurise “a guy who is trying to bring a class action lawsuit against corporate America for forcing people to wear uniforms and enforcing dress codes” :wink:, but if you want to take full advantage of the current Nyquist feature set that is available in Audacity, you will need to use the current version of Audacity. Upgrading Audacity will allow a greater degree of “future-proofing” your plug-ins against new versions of Audacity as well as solving many shortcomings of old versions.

<>

Indeed I do - I think my DX-100 had one of those (and a massive 1 GB hard drive :astonished: )

Nyquist was updated in Audacity 1.3.something last year. It’s still not using the current Nyquist code, but at least it’s a few year less out of date than it was before.

I’ve tried that here with Audacity 1.2.6 and I can use upper (or lower) case. Perhaps if you still have a copy of the code that was causing the crashing I could try that out and see if I can reproduce the problem.

It certainly will. Audacity 2.0 is unlikely to be very much different from Audacity 1.3.12. The general consensus on this forum is that Audacity 1.3.12 already has less bugs than 1.2.6, but the developers have raised the bar for Audacity 2.0 and are still not happy to release it as 2.0 (Windows 7 did us no favours at all as it raised a whole load of compatibility problems with both Audacity 1.2 and 1.3 - the difference is that there are people fixing the issues in 1.3 but 1.2.6 was abandoned a long time ago.)

Try generating 1000 seconds of white noise, then apply the high-pass filter - do you get a progress bar?

Wow, the “Bendix G-15” looks awesome. Not much bigger than an industrial fridge-freezer and 20kb of memory :open_mouth:

Don - thanks for sharing that link - just spent a nostalgic half-hour browsing the Digital PDP-11 catalogues :nerd:

WC