This is a “version 4” Nyquist plugin, so it requires “Audacity 2.1 alpha” or later.
The basic concept is the same as the “Regular Interval Labels” that has been shipped with Audacity for several years. It creates labels at regular intervals.
Unfortunately Nyquist plugins can still not grey-out controls that are not relevant, so some controls are marked “(if used)” to indicate that they are not always active.
There are two ways that “regular interval” can be placed within a specified space - we can fit as many “Intervals” as will fit, or we can fit as many “labels” as will fit.
To clarify this difference, consider placing labels into a 9 second space, at intervals of 2 seconds:
Fitting 2 second regions into a 9 second selection.
Here I have used “region labels” so that the regions are clearly visible:
Note that there is no room to fit a 5th “2 second interval” into the specified space.
However, if we we using point labels, or short region labels, this might “look” rather odd:
The plug-in has done “the right thing”, but clearly there is enough room for one more “label”.
Note that in each case, the label interval is exactly the same, but with point labels it “looks” like there is a label missing.
On the other hand, if we place as many “labels” as possible into the available pace, then we end up labelling empty space.
In this example,I have placed as many labels as possible into an 8.1 second space.
The attached plugin attempts to resolve this by offering “Label placement methods” that include options for: Exact Interval
(places as many regular “intervals” into the space as will fit.)
and Exact Interval + Final
(places as many “labels” into the space as will fit.)
Other features in this plugin should be discoverable by playing with it.
Please let me know if you find bugs.
I’m not sure if it does fix it. It really comes down to a question of definition - are we placing “labels” or are we placing “intervals”.
There is a selection from 0.0 to 9.0.
Region labels of 0.5 seconds duration each, are placed at intervals of 2 seconds.
The labels are:
0 to 0.5 seconds
2 to 2.5 seconds
4 to 4.5 seconds
6 to 6.5 seconds
There is clearly room within the 9 second selection to place another label at 8 to 8.5 seconds.
With the posted plugin, that can be done by selecting “Exact Interval + Final”.
There are now labels at:
0 to 0.5 seconds
2 to 2.5 seconds
4 to 4.5 seconds
6 to 6.5 seconds
8 to 8.5 seconds
To me, this looks more expected.
The reason for not including that final label, is that we are placing labels “at intervals of 2 seconds”, and there is no room for an “interval” of 2 seconds starting at 8.0 seconds - the 2 second interval would extend from 8 to 10 seconds.
With this plugin, Nyquist is capable of handling all and any option we care to include, however, that makes the logic within the plugin code very complex, and more importantly it makes the plugin difficult to use because the interface becomes necessarily very complex. Furthermore, the Audacity/Nyquist interface lacks sophistication. We have 3 types of controls: number/slider, text and multiple choice, and that is all. We are not able to grey out controls, dynamically change the GUI text, or anything else.
The plugin posted in the first post of this topic is my best shot at supporting both “placing labels” and “placing intervals”, but I still don’t think that this distinction is clear for users. My initial post is lengthy in describing the distinction, but Gale still found it necessary to ask for clarification, so it is certainly far from obvious.
Are we being too fastidious in trying to support both?
I was being deliberately obtuse to some extent, to make the point that the distinction probably isn’t clear. I also have not tried the plugin yet.
I think users will understand the concept of an option for an extra label which, when enabled, produces one more label. If they don’t get the result they expected, they enable the option, but don’t have to figure out why it works. OTOH, “Final label” is a little ambiguous according to the scenario.
We are placing labels and we can choose the number of labels or the interval between them. That is very clear in the current plugin, until we get to considering “final label” and “adjusting to fit length”.
I guessed that, and I agree, the distinction is not an obvious one, so really I’d prefer to devise a scheme where that distinction is not a necessary consideration for users.
I think that “number of regular interval labels” is unambiguous (unless we are being overly fastidious).
If we want 5 regular interval in a 10 second space, then the labels will be at 0, 2, 4, 6 and 8 seconds.
Assuming that we don’t allow overlapping region labels, the labels will always entirely fit within the available space, and it never looks weird or unexpected.
I think that “adjusting the interval for best fit” is also reasonably unambiguous.
If we have a 10 second space, and we set the interval close to 2 seconds, then the interval will be adjusted to exactly 2 seconds and the result is the same as above.
The ambiguity comes when setting labels at “exact intervals”.
What I’m thinking is, to avoid confusing complexity in the UI, we need a simple “rule” for what will occur.
The “rule” should not lead to weird looking results.
When the rule is applied, if the “exact interval” fits exactly into the available space, then the result should be identical to the “adjust interval for best fit” result.
Region labels should not be labelling white-space.
A simple rule that achieves the above is: Include the label if it fits entirely inside the available space.
The edge case is when we use point labels and the exact interval fits exactly into the available space. In this case we could count that label as “inside” the available space, or “not inside” the available space. This edge case is covered by item 2: if the “exact interval” fits exactly into the available space, then the result should be identical to the “adjust interval for best fit result”.
Does that sound reasonable?
I’m testing this now, and so far no weird results.
Imo, the main problem with the latest version is that we can’t grey out controls, hence the rather clumsy workaround of marking some controls “(if used)”. I don’t see any satisfactory workaround, but I’m hoping that we get the ability to grey out controls in the next Audacity release after 2.1, in which case, those controls currently marked “(if used)” will either be greyed out or active according to the options chosen.