Default plugin issues: Regular Interval Labels

from Issues on translating default plugins - #2 by steve



Which menu is ‘Regular Interval Labels’ in? Is it in the “Analyze” menu or the “Tools” menu?

Tools.

This effect could do with a rewrite to take advantage of being classed as a “tool”.

A quick fix for own use only (hopefully I’ll have time to rewrite the effect before 2.3.1 is released):
Open the file “equalabel.ny” in NotePad++ and change line 3 from:

$type tool

to:

$type tool analyze

You will also need to remove the leading white space on lines 68 to 72.

That quick fix worked!!
“Regular Interval Labels” placed regular Interval Labels!
Thanks!!!
I look forward to genuine fix.

However, I can’t meet “Too many labels” error.
When I import very long audio (1454 sec) and try to place labels by 1.0 sec interval, “Nyquist returned the value: 2” message appears instead of “Too many labels” one.
Debug says:

error: bad function - "Too many labels.~%~%~\nSelection length is ~a seconds and~%~\nLabel interval is ~a seconds~%~\ngiving a total of ~a labels.~%~\nMaximum number of labels from this effect is 1000.~%~\nPlease use a shorter selection, or a longer Label interval."
Function: #<FSubr-THROW: #fa22230>
Arguments:
  (QUOTE ERR)
  (FORMAT NIL ("Too many labels.~%~%~\nSelection length is ~a seconds and~%~\nLabel interval is ~a seconds~%~\ngiving a total of ~a labels.~%~\nMaximum number of labels from this effect is 1000.~%~\nPlease use a shorter selection, or a longer Label interval.") (FORMATGG (GET-DURATION 1)) (FORMATGG INTERVAL) (IF (= ADJUST 1) (ROUND (/ (GET-DURATION 1) INTERVAL)) (1+ (ROUND (/ (GET-DURATION 1) INTERVAL)))))
Function: #<FSubr-WHEN: #fa20ed0>
Arguments:
  (> TOTALNUM 1000)
  (THROW (QUOTE ERR) (FORMAT NIL ("Too many labels.~%~%~\nSelection length is ~a seconds and~%~\nLabel interval is ~a seconds~%~\ngiving a total of ~a labels.~%~\nMaximum number of labels from this effect is 1000.~%~\nPlease use a shorter selection, or a longer Label interval.") (FORMATGG (GET-DURATION 1)) (FORMATGG INTERVAL) (IF (= ADJUST 1) (ROUND (/ (GET-DURATION 1) INTERVAL)) (1+ (ROUND (/ (GET-DURATION 1) INTERVAL))))))
Function: #<Closure-CHECK-NUMBER-OF-LABELS: #f9dfc80>
Function: #<FSubr-CASE: #fa20fb0>
Arguments:
  MODE
  (0 (SETF INTERVAL (/ (GET-DURATION 1) TOTALNUM)))
  (1 (SETF TOTALNUM (GET-INTERVAL-COUNT)) (WHEN (= ADJUST 1) (SETF INTERVAL (/ (GET-DURATION 1) TOTALNUM))) (CHECK-NUMBER-OF-LABELS))
Function: #<Closure-MAKE-LABELS: #f9e01b0>
Function: #<FSubr-CATCH: #fa1fa70>
Arguments:
  (QUOTE ERR)
  (MAKE-LABELS)
Function: #<FSubr-IF: #fa22d60>
Arguments:
  (LASTTRACKP)
  (CATCH (QUOTE ERR) (MAKE-LABELS))
  NIL
1>

Good to know that we’re on the right track :slight_smile:

I noticed that. Again it’s because Audacity’s newer built-in validation is getting there before the Nyquist check. I’ll be removing that string from the plug-in.

I’ve started work on this, and I think that I’ll be making an intermediate fix that does most of what I’d like the effect to do, and doesn’t require a full rewrite. If you’re happy to test it, I’ll post it here first for you (should be ready later today).

I’ll be glad to!

Super. Give this a go:
equalabel.ny (5.86 KB)
Note that this has some additional features which are not yet documented. If you find any problems, please let me know (general feedback is also welcome).

Note also, there may initially (first run) be a message about restoring default settings. This should go away after applying the new effect for the first time.

There’s a new Windows alpha build available: https://www.fosshub.com/Audacity-devel.html
You may need to refresh the page to get the latest version, “audacity-2.3.1-alpha-72fbf1b.zip”

Great!

New feature, ‘Number & Interval’, seems working well too.
I wondered whether time selection is needed even in this mode, though.

And, though it isn’t a new feature, I can’t notice what differs by enabling ‘Adjust label interval to fit length’.
It didn’t help to read its wiki information…


Really? I didn’t saw something like that.

Bad news.
By applying my translation, it throws a huge amount of errors saying “wxUniChar::FromHi8bit(): invalid multibyte character” that is completely the same as ones of “Sample Data Export”.

The result message after continuing to press ‘Continue’ is also buggy on the debug output.
Like this:
RegularIntervalLabels_error.png
Note that “Sample Data Import” doesn’t produce such errors at all (after a file passed plugin’s validation of file existence, ASCII characters and numeric values, of course).

Ideally we wouldn’t require a selection, but it requires a lot of code changes to remove the requirement for an audio selection, which I don’t have time to do right now, so we will just have to put up with that for 2.3.1.

The documentation in the “alpha manual” is mostly done now (apart from the image that still needs to be updated). https://alphamanual.audacityteam.org/man/Regular_Interval_Labels

I was just alerting you to a “possibility” so that you would not be alarmed IF it happened. Good to hear that it didn’t :wink:


I’m still of the opinion that this is a character encoding issue, but I’m not familiar enough with the translation process to help you with this. I’m hoping that one of the other developers will step in to help when they have time (we only have a very small team of developers, and a lot to do). Let’s keep the discussion about the translation in the other topic.

Yeah, what I saw is that alpha manual.
I jumped from the [?] button of the plugin to it.


(… others …)

I see!