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.
Foxman
Posts: 4
Joined: Thu Jan 24, 2013 7:25 pm
Operating System: Please select

Will 2.0.03 measure seconds to 6 decimal places?

Post by Foxman » Thu Jan 24, 2013 8:25 pm

In the past my students and I have used Audacity to experiment with speed of sound studies. After updating to the lastest version of Audacity we noticed that the program will only measure recording times out to 3 decimal places as the older version we used would mearsure to 6 deciamal places. My question is, has the new version reduced the accuracy offered or are we just missing how to configure the software to measure with that accuracy?

Believe it or not the 4th decimal place does make a big difference in getting accurate results.

version 2.0.3
win XP

Thanks for any help

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 » Thu Jan 24, 2013 8:54 pm

This came up once before on the forum.
Audacity is now more accurate than the old 1.2.x version, but the greatest precision in the Selection Toolbar is in "samples" rather than fractions of a second. The other teacher thought it was a bit too complicated to require that the students divide the number of samples by 44100, so the best solution that we came up with is to set the project sample rate to 100,000 and display the time in hh:mm:ss+samples.
To change the project sample rate to 100,000, type 100000 in the Project Rate box (bottom left corner of the main Audacity window).
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 » Thu Jan 24, 2013 8:59 pm

We can add your vote to reinstate microseconds. I'm not clear why this was omitted except for space reasons. It is "probably" a fairly simple code change if you wish to recompile Audacity yourself.



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

DVDdoug
Forum Crew
Posts: 9287
Joined: Fri Sep 10, 2010 11:30 pm
Operating System: Windows 10

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by DVDdoug » Fri Jan 25, 2013 1:02 am

The other teacher thought it was a bit too complicated to require that the students divide the number of samples by 44100...
:D :D That must be one of our public school teachers here in California! You don't need to understand the details of the math or science as long as you feel good about yourself! :D :D

Foxman
Posts: 4
Joined: Thu Jan 24, 2013 7:25 pm
Operating System: Please select

Re: Will 2.0.03 measure seconds to 6 decimal places?

Post by Foxman » Fri Jan 25, 2013 1:12 pm

Thanks for the help. I am sorry I missed the discussion in my search and FAQ. I must have not understood what I was reading.

I probably would vote for the milliseconds measurement to return as it was convenient, but my students will do what they are told and dividing samples by Hz should be simple enough for them. If not "I give up!" 8 more years and my job will be going fishing. :D

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 » Fri Jan 25, 2013 7:54 pm

Gale Andrews wrote:It is "probably" a fairly simple code change if you wish to recompile Audacity yourself.
It is only a few lines of new code if you are willing to add it to the bottom of the list but re-ordering the list so that the new choice "fits in" to its proper place adds a tiny bit more change.

Foxman - I would be happy to supply the code change (patch) so that you may compile it in or provide you with a patched executable (or both).

Personally I only need 2 or 3 decimal places but more is trivial (well - I don't know what to call it <grin>):
sel.png
sel.png (28.66 KiB) Viewed 1436 times

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 » Fri Jan 25, 2013 8:07 pm

Edgar wrote:
Gale Andrews wrote:It is "probably" a fairly simple code change if you wish to recompile Audacity yourself.
It is only a few lines of new code if you are willing to add it to the bottom of the list but re-ordering the list so that the new choice "fits in" to its proper place adds a tiny bit more change.
What have you added - hh:mm:ss + microseconds? I think that's what most want (what 1.2.6 had).

I'm interested in the patch that inserts the new item in an appropriate place.


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 » Fri Jan 25, 2013 11:19 pm

Gale Andrews wrote: What have you added - hh:mm:ss + microseconds? I think that's what most want (what 1.2.6 had).
Here is the current situation:
sel203.png
sel203.png (23.73 KiB) Viewed 1426 times
You will see that I have added a couple of additional "seconds + ..." entries and reordered the list so that they fall in the "appropriate" place. The actual number of decimal places displayed is simply a matter of adding zeros to the format string to match the number of decimal places you desire.

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 » Fri Jan 25, 2013 11:42 pm

Gale Andrews wrote: I'm interested in the patch that inserts the new item in an appropriate place.
A patch for a "user" would be a little bit different from a patch for a "Developer" <grin>. The current code makes it more difficult than necessary to insert new entries in the list because all of the ordinal list positions are hardcoded with an integer value (1, 2, 3 etc.). This means that if you insert a new item in the list every item thereafter must have that hardcoded integer position changed. This makes a lot of sense when the list is very short, rarely likely to change, or the code is running on a PDP 11 or slower CPU (i.e. 25 or more years old). Given the current length of this list, the likelihood of acceding to the users' desire to add more items and the possibility that this list could be tailored to suit an individual user's needs (via a GUI editor – quite easy to do <grin>) it makes sense to change this code so that it looks vaguely like:
int listPosition = 0;
place item at list position listPosition;
listPosition = listPosition + 1;
… Do it again as many times as necessary…
Or even:
int listPosition = 0;
if (user wants to see the item on the list) then
_____place item at list position listPosition;
_____listPosition = listPosition + 1;
endif
… Do it again as many times as necessary…

For proof of concept (because the Development Team would need to decide whether they wanted it done "right" or "quick and dirty") I would propose giving you a simple two-line patch which tacks the new item on the bottom. Then if there was any Developer support for adding the item the Developers could choose which way they wanted it done.

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 » Sat Jan 26, 2013 12:32 am

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;
Attachments
sel12198.png
sel12198.png (25.67 KiB) Viewed 1423 times
microTTC1.zip
zipped patch
(646 Bytes) Downloaded 50 times

Post Reply