Help/ Error Screens with multiple selected tracks

Using Nyquist scripts in Audacity.
Post and download new plug-ins.
Forum rules
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
Post Reply
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Help/ Error Screens with multiple selected tracks

Post by Gale Andrews » Fri Dec 10, 2010 2:47 pm

If you have x selected tracks you get x instances of a Help or Error screen (though fortunately only one per stereo selected track).

Is this potentially fixable - so a candidate for the Nyquist Wish List ?



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Help/ Error Screens with multiple selected tracks

Post by steve » Fri Dec 10, 2010 4:11 pm

There are different types of error.
In the case of Nyquist errors, Nyquist will quit on the first error.
For example, if you have a mix of mono and stereo tracks in a project and run the following on all tracks:

Code: Select all

(print (snd-srate s))
Nyquist will generate an error and quit on the first stereo track (the code is only valid for a sound but for a stereo track "s" is an array).

In the case of Help screens and other text that is output by the Nyquist script, I don't see an obvious way that this could be "fixed" or even if it is desirable to "fix" it.
Unless an actual error in Nyquist is encountered, Nyquist plug-ins run once per selected track. so if running the plug-in on a track outputs some text, it will display that text each time it runs - that is, it will output the text for each track.

In some cases this is the desirable action - for example, if you have an Analyze plug-in that displays information about a track, then if multiple tracks are selected the plug-in should display the information for each track.
An actual example - this will print the peak level of the selected track(s):

Code: Select all

(format nil "Peak track level is: ~a" (if (arrayp s)
  (max (peak (aref s 0) NY:ALL)(peak (aref s 1) NY:ALL))
  (peak s NY:ALL)))
For mono tracks, this will ensure that track amplitude is at least 0.5 (linear) and will print a message if it is already 0.5 or above.

Code: Select all

(if (< (peak s NY:ALL) 0.5)(mult s 2)(print "Already big enough"))
In the case of Help screens, the issue could be resolved by having some other mechanism for displaying help, such as being able to link to a help file.
This is mentioned briefly here http://forum.audacityteam.org/viewtopic ... 39&t=36639 but could be expanded on. Links would not necessarily need to be html links - a link to a text file could open a text file of the same file name (different extension) located in the same plug-ins folder, or a link to an image could open the image file in the default system image viewer. There could be some security implications, for example, if a link enabled an executable file to run.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Help/ Error Screens with multiple selected tracks

Post by Gale Andrews » Sat Dec 11, 2010 2:13 am

Apart from the "Help" screens, the other irritation is error notifications that report user input errors as a result of the author's error checking code. As with "Help" screens, I would imagine only one "notification" would actually be needed.

I agree if nothing can be done for those specific cases we can't generally restrict text output to the first track.



Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Post Reply