Nyquist Plugin HEADS UP

Using Nyquist scripts in Audacity.
Post and download new plug-ins.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Nyquist Plugin HEADS UP

Permanent link to this post Posted by dondiego929 » Sat Jun 05, 2010 4:25 pm

<<deleted by user>>
Last edited by dondiego929 on Mon Sep 13, 2010 2:15 am, edited 1 time in total.
dondiego929
 
Posts: 54
Joined: Mon May 17, 2010 4:40 am
Operating System: Please select

Re: Nyquist Plugin HEADS UP

Permanent link to this post Posted by steve » Sun Jun 06, 2010 10:40 am

dondiego929 wrote:Your header ";info, ;control" HAS to start at the left edge

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.
Code: Select all
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".

dondiego929 wrote:I had capitalized REAL as the type of input I wanted in one of my ";control" lines.
A big NO NO for Nyquist.cpp (although you CAN capitalize INT due to the coding).

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:
Code: Select all
;nyquist plug-in
;version 1
;type process
;name "!Test..."
;action "Testing..."
;control p "Parameter" real "REAL" 0 0 100
(print p)


dondiego929 wrote:Seems it has to do with those "crazy" :shock: sliders that you HAVE to use for some reason.


As described here: http://www.audacity-forum.de/download/e ... tm#widgets
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.
dondiego929 wrote:if they TOUCH that slider, it will mess it up.
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/In ... l#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".
Code: Select all
;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:
Code: Select all
;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" ;), 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.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45686
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Nyquist Plugin HEADS UP

Permanent link to this post Posted by dondiego929 » Tue Jun 08, 2010 6:57 pm

<<deleted by user>>
Last edited by dondiego929 on Mon Sep 13, 2010 2:16 am, edited 1 time in total.
dondiego929
 
Posts: 54
Joined: Mon May 17, 2010 4:40 am
Operating System: Please select

Re: Nyquist Plugin HEADS UP

Permanent link to this post Posted by steve » Tue Jun 08, 2010 8:50 pm

dondiego929 wrote:Ahhh, "floating points". Remember when they introduced that FPU chip on mainboards?

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

dondiego929 wrote:Perhaps the NYQUIST processing code is different between versions

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.

dondiego929 wrote:all I know is that I capitalized REAL and it totally brought the whole program down when I used a non-whole number (integer).

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.

dondiego929 wrote:Too bad we can't get a non-slider widget for our plug-ins. Maybe Audacity 2.0 will have one!

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.)

dondiego929 wrote:I'm having trouble getting the ";action" module to work with my plug-in.

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

dondiego929 wrote:http://www.computerhistory.org/brochures/decades.php

Wow, the "Bendix G-15" looks awesome. Not much bigger than an industrial fridge-freezer and 20kb of memory :shock:
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Site Admin
 
Posts: 45686
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Nyquist Plugin HEADS UP

Permanent link to this post Posted by waxcylinder » Wed Jun 09, 2010 9:16 am

dondiego929 wrote:... check out this site for some cool 1950s computer brochures:
http://www.computerhistory.org/brochures/decades.php
...I've ordered my Heath Kit and it SHOULD be in the postage by now. Ha ha.

Cheers!
~DonDiego

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

WC
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * FAQ * * * * * Tutorials * * * * * Audacity Manual * * * * * Audacity Wiki * * * * *
waxcylinder
Forum Staff
 
Posts: 9132
Joined: Tue Jul 31, 2007 11:03 am
Location: Manchester, UK
Operating System: Windows 10


Return to Nyquist



Who is online

Users browsing this forum: No registered users and 2 guests