Will 2.0.03 measure seconds to 6 decimal places?

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.
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Gale Andrews » Sat Nov 22, 2014 11:14 pm

Edgar wrote:
Gale Andrews wrote: hh:mm:ss + microseconds? I think that's what most want (what 1.2.6 had).
Therein lies the rub! My guess is that anyone interested in examining the seconds out to six decimal points will not be looking at audio that is many hours long. My personal choice would probably be mmmm:ss + micro (i.e. 4 places for the number of whole seconds). Note that by choosing hh:mm:ss we limit the ability to display more than 99 hours + 59 minutes + 59 seconds – probably a most reasonable limit.

Code: Select all

Index: src/widgets/TimeTextCtrl.cpp
===================================================================
--- src/widgets/TimeTextCtrl.cpp	(revision 12198)
+++ src/widgets/TimeTextCtrl.cpp	(working copy)
@@ -400,6 +400,10 @@
    /* i18n-hint: Format string for displaying time in frames with CD Audio
     * frames. Translate 'frames' and leave the rest alone */
    BuiltinFormatStrings[15].formatStr = _("01000,01000 frames|75");
+   /* i18n-hint: Name of time display format that shows time in seconds and microseconds */
+   BuiltinFormatStrings[16].name = _("seconds + microseconds");
+   /* i18n-hint: Format string for displaying time in seconds and microseconds. */
+   BuiltinFormatStrings[16].formatStr = _("010000.01000000 s");
 
    mDigitBoxW = 10;
    mDigitBoxH = 16;
Index: src/widgets/TimeTextCtrl.h
===================================================================
--- src/widgets/TimeTextCtrl.h	(revision 12198)
+++ src/widgets/TimeTextCtrl.h	(working copy)
@@ -134,7 +134,7 @@
     *  needed to create that format output. This is used for the pop-up
     *  list of formats to choose from in the control. Note that the size will
     *  need adjusting if new time formats are added */
-   BuiltinFormatString BuiltinFormatStrings[16];
+   BuiltinFormatString BuiltinFormatStrings[17];
    double         mTimeValue;
 
    wxString       mFormatString;
Now that the index isn't hardocded I tried adding ss + microseconds and hh:mm:ss + microseconds but it certainly does not work as well as it did in 1.2.6.

In an empty 44100 Hz project window we see that TimeText controls start at 1 microsecond instead of 0 (as per your image above), and start at 3 microseconds at 1000000 Hz.

Generate doesn't let you generate exactly 1.000000 seconds when the selection format is in microseconds.

Is this expected?


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

Edgar
Forum Crew
Posts: 2042
Joined: Thu Sep 03, 2009 9:13 pm
Operating System: Windows 10

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Edgar » Sun Nov 23, 2014 4:56 am

Gale, this thread is a year old and the underlying code has changed drastically in the last couple weeks. Are you trying to patch SVN HEAD or are you seeing strange results with SVN HEAD and no patch? There's a much more current thread ( http://forum.audacityteam.org/viewtopic ... 20&t=82163 ) which discusses adding a new format; on that thread suizokukan offers to submit a patch - is that the code you're discussing?
-Edgar
running Audacity personally customized 2.0.6 daily in a professional audio studio
occasionally using current Audacity alpha for testing and support situations
64-bit Windows Pro 10

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

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Gale Andrews » Sun Nov 23, 2014 10:42 am

Edgar wrote:Gale, this thread is a year old and the underlying code has changed drastically in the last couple weeks. Are you trying to patch SVN HEAD or are you seeing strange results with SVN HEAD and no patch? There's a much more current thread ( http://forum.audacityteam.org/viewtopic ... 20&t=82163 ) which discusses adding a new format; on that thread suizokukan offers to submit a patch - is that the code you're discussing?
HEAD doesn't include microseconds. Yes I tested Suizokukan's patch to add seconds and milliseconds (which is fine) and also added seconds and microseconds and hours, minutes, seconds and microseconds (attached).

Gale
Attachments
NumericTextCtrl_secs_and_ms_and_2_microseconds_formats.patch
(2.47 KiB) Downloaded 35 times
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

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

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Robert J. H. » Sun Nov 23, 2014 3:51 pm

Gale Andrews wrote:
Edgar wrote:Gale, this thread is a year old and the underlying code has changed drastically in the last couple weeks. Are you trying to patch SVN HEAD or are you seeing strange results with SVN HEAD and no patch? There's a much more current thread ( http://forum.audacityteam.org/viewtopic ... 20&t=82163 ) which discusses adding a new format; on that thread suizokukan offers to submit a patch - is that the code you're discussing?
HEAD doesn't include microseconds. Yes I tested Suizokukan's patch to add seconds and milliseconds (which is fine) and also added seconds and microseconds and hours, minutes, seconds and microseconds (attached).

Gale
Thanks Gale

It occurred to me that there is another format that is actually missing: Percentage
This is especially useful for "Player" mode.
It is arguable though if it should apply to the track's length or the project length.

Yet another thing, why has the Audio position to show a value of 0 in stop mode? In this case, it should take the value of the left boundary of the selection in my humble opinion.
In my accessibility extension, it always reports the maximum of those two values. Thus, one hotkey less to belay.

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

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by steve » Sun Nov 23, 2014 4:29 pm

Robert J. H. wrote:It occurred to me that there is another format that is actually missing: Percentage
There's an infinite number of formats "missing".
Julian days : hh : mm
tP x 10^nn
ss + nanoseconds
moments
beats at 120 bpm
4/4 bars + 120 bpm
3/4 bars + 120 bpm
5/4 bars + 120 bpm
6/6 bars + 120 bpm
4/4 bars + 121 bpm
3/4 bars + 121 bpm
....
....

I don't believe that adding this one or that one in an ad hoc manner is the correct approach because there will always be some situation that requires units that are not available. Imo what we need is a general solution that allows the user to define "ticks" and "tick multipliers".
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: Will 2.0.03 measure seconds to 6 decimal places?

Post by Robert J. H. » Sun Nov 23, 2014 8:27 pm

steve wrote:
Robert J. H. wrote:It occurred to me that there is another format that is actually missing: Percentage
There's an infinite number of formats "missing".
Julian days : hh : mm
tP x 10^nn
ss + nanoseconds
moments
beats at 120 bpm
4/4 bars + 120 bpm
3/4 bars + 120 bpm
5/4 bars + 120 bpm
6/6 bars + 120 bpm
4/4 bars + 121 bpm
3/4 bars + 121 bpm
....
....

I don't believe that adding this one or that one in an ad hoc manner is the correct approach because there will always be some situation that requires units that are not available. Imo what we need is a general solution that allows the user to define "ticks" and "tick multipliers".
Percentage can't be defined like that.
The actual problem is that the entire project length or the total length of a track are nowhere available on the screen (e.g. in the status bar).
Of course, I can simply take the selection length and calculate the percentage according to that. This makes at least sense for a (screen reader) real time report of the audio position per hotkey.
However, the decoding is only simple when the format is whole seconds or samples.

You did not answer the second question, any opinion on that?

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

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Gale Andrews » Sun Nov 23, 2014 9:30 pm

steve wrote:I don't believe that adding this one or that one in an ad hoc manner is the correct approach because there will always be some situation that requires units that are not available. Imo what we need is a general solution that allows the user to define "ticks" and "tick multipliers".
Well one could say it is a lottery what requested formats get added. Are the "ticks" the ticks on the Timeline and is the "tick multiplier" a sliding scale of some sort?
Robert J. H. wrote:You did not answer the second question, any opinion on that?
Why has the Audio position to show a value of 0 in stop mode? In this case, it should take the value of the left boundary of the selection in my humble opinion.
Isn't the left edge of the selection displayed by Selection Start?


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

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

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Robert J. H. » Mon Nov 24, 2014 8:56 am

Gale Andrews wrote:
Robert J. H. wrote:You did not answer the second question, any opinion on that?
Why has the Audio position to show a value of 0 in stop mode? In this case, it should take the value of the left boundary of the selection in my humble opinion.
Isn't the left edge of the selection displayed by Selection Start?
Sure it is, I don't say that any of these controls should be removed.
However, the 000000 values are absolutely meaningless.
Audio Position should somewhat represent the cursor position, shouldn't it?
This would mean that it takes the same value as the left edge of the selection.
There's one exception to this rule: the left selection edge can start before zero, whereas the audio position can not.

By the way, the display for negative time values is broken in the 2.0.7 alpha builts (not related to the patch). The screen reader reports only dashes.
This worked before, at least with NVDA.
Last edited by Robert J. H. on Fri Apr 24, 2015 4:12 pm, edited 2 times in total.
Reason: Fixed quote tag

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

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by steve » Mon Nov 24, 2014 9:28 am

Robert J. H. wrote:Why has the Audio position to show a value of 0 in stop mode? In this case, it should take the value of the left boundary of the selection in my humble opinion.
I'm unsure what you are observing. As far as I can see it appears to be working correctly. Could you give steps to reproduce the issue (I have NVDA installed on a virtual machine with Windows XP)
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: Will 2.0.03 measure seconds to 6 decimal places?

Post by Gale Andrews » Mon Nov 24, 2014 3:37 pm

Robert J.H. wrote:the display for negative time values is broken in the 2.0.7 alpha builts (not related to the patch). The screen reader reports only dashes.
I think NVDA is reading what is displayed correctly.

On Windows 7 If I have exactly one second of audio behind zero, 2.0.0 shows for Selection Start:

Code: Select all

00h 00m -1.-00s
2.0.6 shows

Code: Select all

00h 00m -1.000s
2.1.0-alpha shows all dashes

Code: Select all

--h --m --.---s

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

Post Reply