Help/ Error Screens with multiple selected tracks

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

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:

(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):

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

(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 https://forum.audacityteam.org/t/wish-list-html-links/15153/1 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.

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