Regular Interval Labels - cannot handle large files

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
steve
Site Admin
Posts: 81649
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Regular Interval Labels - cannot handle large files

Post by steve » Sat Feb 14, 2015 2:48 pm

Gale Andrews wrote:Sorry Robert can you explain that in more detail. What are you suggesting can be changed?
OK my name's not Robert, but what he is (correctly) saying is that once Audacity 2.1 is released, this limitation can be easily fixed.

Audacity 2.1 supports version 4 plugins, which give Nyquist access to additional information from Audacity, including the start/end time of the selection in seconds.
The current version of the Equal Labels plugin has to calculate the start / end times either from the (get-duration) function, or from the 'LEN' (number of selected samples) variable, both of which amount to much the same thing because they both depend on the sample count.

To fix this limitation, the plugin version needs to be changed from version 3 to version 4, and then instead of

Code: Select all

 (get-duration 1)
using

Code: Select all

 (- (get '*selection* 'end)(get '*selection* 'start))
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: Regular Interval Labels - cannot handle large files

Post by Gale Andrews » Sat Feb 14, 2015 2:56 pm

steve wrote:
Gale Andrews wrote:Sorry Robert can you explain that in more detail. What are you suggesting can be changed?
OK my name's not Robert, but what he is (correctly) saying is that once Audacity 2.1 is released, this limitation can be easily fixed.

Audacity 2.1 supports version 4 plugins, which give Nyquist access to additional information from Audacity, including the start/end time of the selection in seconds.
The current version of the Equal Labels plugin has to calculate the start / end times either from the (get-duration) function, or from the 'LEN' (number of selected samples) variable, both of which amount to much the same thing because they both depend on the sample count.

To fix this limitation, the plugin version needs to be changed from version 3 to version 4, and then instead of

Code: Select all

 (get-duration 1)
using

Code: Select all

 (- (get '*selection* 'end)(get '*selection* 'start))
OK so I would suggest tracking this on our Bugzilla, unless you are just going to do it, of course. ;)

Are there any other Nyquist plugins that would benefit from a similar change?


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

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

Re: Regular Interval Labels - cannot handle large files

Post by steve » Sat Feb 14, 2015 3:05 pm

Gale Andrews wrote:OK so I would suggest tracking this on our Bugzilla, unless you are just going to do it, of course. ;)

Are there any other Nyquist plugins that would benefit from a similar change?
Several of the shipped plugins are likely to benefit from updating.

I was planning to update Regular Interval Labels anyway - I think it would be a useful enhancement if there was an option to start the labels at a specified time (currently the start time is relative to the start of the selection, but with version 4 we can start the labels at an absolute time position).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Robert J. H.
Posts: 3633
Joined: Thu May 31, 2012 8:33 am
Operating System: Windows 10

Re: Regular Interval Labels - cannot handle large files

Post by Robert J. H. » Sat Feb 14, 2015 6:34 pm

Gale Andrews wrote:
Robert J. H. wrote:This can be altered for the next audacity version (or rather the version after that).
The selection end time (from the property '*selection-->'end) is expressed in seconds and not affected by this limitation.
Sorry Robert can you explain that in more detail. What are you suggesting can be changed?


Gale
The code in the snippet has to know how long the selection is.
Normally, this is achieved with

Code: Select all

(get-duration 1)
for seconds or with the variable 'len' in samples.
Due to the 32-bit limitation, len takes the highest possible value--which is negative and 'get-duration' = 1 (s).
However, Version 4 plug-ins deliver the start and end time as a property of the variable '*selection* and those are expressed in seconds.
Thus, the lines 117 and 118 in equalabel.ny have to be changed to

Code: Select all

		(setq start (+ (get '*selection* 'start) (max 0 start))) ;disallow negative label time
		(setf dur (- (get '*selection* 'end) start)) ;calculate duration
Of course, the second line has also to be changed

Code: Select all

;version 4
This should work for Audacity 2.1.0 and above.
equalabel.ny
Regular Interval labels
Audacity 2.1.0 and above
(6.24 KiB) Downloaded 27 times
Please test it...

Robert

Post Reply