Measuring short times in decimal seconds

Effects, Recipes, Interfacing with other software, etc.
Forum rules
If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like
msittig
Posts: 6
Joined: Tue Dec 11, 2012 2:13 pm
Operating System: Please select

Measuring short times in decimal seconds

Post by msittig » Tue Dec 11, 2012 2:44 pm

Audacity 2.0.2 on Windows XP.

I am a physics teacher so my main use for Audacity is measuring/generating sound (pressure) waves with my students. We often want to measure the period of a wave, which tends to be a very short time on the order of 10-thousandths of a second. When I upgraded from 1.2.6 to 2.0.2, I was surprised to find that the option to measure time segments in units of less than milliseconds (the default for 1.2.6) is gone.

Image

Here is the old version with times measured down to the millionths(!) of a second:

Image

I know that I can use samples and the project rate to find time durations, but having to explain sampling to my middle school students tends to obscure the point, rather than illuminate it. Is there something I'm missing?

Right now I'm using 1.2.6 and having my students download this old version.

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

Re: Measuring short times in decimal seconds

Post by steve » Tue Dec 11, 2012 3:30 pm

msittig wrote:When I upgraded from 1.2.6 to 2.0.2, I was surprised to find that the option to measure time segments in units of less than milliseconds (the default for 1.2.6) is gone.
There's some potential problems that I can see with adding decimals to 5 or more decimal places in the "time boxes":
  • Other than for middle school physics teachers, either milliseconds or samples are more useful, so this would seem to be a small niche application.
  • The minimum time resolution for digital audio is 1 sample period, which for a sample rate of 44.1 kHz is a little over 0.00002 seconds. Periods shorter than this can only be determined by extrapolation, but you can't select "half a sample period". Going beyond 4 decimal places would mean that the selection could be adjusted in the Selection toolbar "time boxes" but there would be no change in the actual selection. This was not a problem in 1.2.6 because the time was for display purposes only.
  • 5 or more decimal places would make the "time boxes" very large and the three of them would not fit side by side on smaller monitors.
A possible workaround is that if you set the Project Rate (bottom left corner of the main screen) to 100000 (100 kHz), then "samples" will display as 100 samples per millisecond (100,000 samples per second). It would be easy to demonstrate that is the case without necessarily going into detail about sample rates.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

msittig
Posts: 6
Joined: Tue Dec 11, 2012 2:13 pm
Operating System: Please select

Re: Measuring short times in decimal seconds

Post by msittig » Wed Dec 12, 2012 12:09 am

Thanks for the relevant and helpful feedback! I can see how all of your points make sense, especially the small monitor size since I am a netbook user myself. I like the tip about setting the project sample rate to 100 kHz; that's most likely what I will do.

Cheers!

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

Re: Measuring short times in decimal seconds

Post by steve » Wed Dec 12, 2012 2:02 am

If it is any use to you, it would be very easy to make a little plug-in for the Analyze menu that could give you the exact duration to as many decimal places as you like (well, up to about 12 decimal places ;))
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

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

Re: Measuring short times in decimal seconds

Post by steve » Wed Dec 12, 2012 2:25 am

steve wrote:If it is any use to you, it would be very easy to make a little plug-in for the Analyze menu that could give you the exact duration to as many decimal places as you like (well, up to about 12 decimal places ;))
Here's a plug-in called "Show Duration" that will display the duration in seconds to 5 decimal places.
Installation instructions: http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins
Attachments
show-duration.ny
(564 Bytes) Downloaded 287 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

msittig
Posts: 6
Joined: Tue Dec 11, 2012 2:13 pm
Operating System: Please select

Re: Measuring short times in decimal seconds

Post by msittig » Wed Dec 12, 2012 2:38 am

That plug-in would be great, but I also tried the 100 kHz workaround and I'm thinking it will work for what we need.

Thanks again.

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

Re: Measuring short times in decimal seconds

Post by steve » Wed Dec 12, 2012 2:49 am

msittig wrote:That plug-in would be great
I think you must have been typing while I was posting. See my previous post.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Jona
Posts: 6
Joined: Wed Sep 20, 2017 3:57 pm
Operating System: Windows 7

Re: Measuring short times in decimal seconds

Post by Jona » Wed Sep 20, 2017 4:05 pm

steve wrote:
steve wrote:If it is any use to you, it would be very easy to make a little plug-in for the Analyze menu that could give you the exact duration to as many decimal places as you like (well, up to about 12 decimal places ;))
Here's a plug-in called "Show Duration" that will display the duration in seconds to 5 decimal places.
Installation instructions: http://wiki.audacityteam.org/wiki/Nyquist_Plug-ins
Hi Steve,

I'm time-stamping a lot of speech files, and I'm looking for a way to have audacity display the start and stop time of a selection in seconds + milliseconds as one number, for example: 1234.567 seconds (instead of the current way, hh:mm:ss.sss). It sounds like your plugin does this, but I can't get it to install - any suggestions? (I followed the instructions on the Nyquist Plugins page: downloaded, saved in the plug-ins folder, and enabled it, but it doesn't show up under "Effect" in audacity.) I'm using 2.1.2.

Thanks!

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

Re: Measuring short times in decimal seconds

Post by steve » Mon Sep 25, 2017 9:42 pm

Jona wrote: it doesn't show up under "Effect" in audacity.
It's an "Analyze" type effect, so when enabled, it is listed in the "Analyze" menu.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Jona
Posts: 6
Joined: Wed Sep 20, 2017 3:57 pm
Operating System: Windows 7

Re: Measuring short times in decimal seconds

Post by Jona » Tue Oct 03, 2017 8:12 pm

steve wrote:It's an "Analyze" type effect, so when enabled, it is listed in the "Analyze" menu.
Aha! There it is indeed! Thanks!

But I realized that this doesn't exactly do what I want - your plugin gives the duration out to 5 decimal points, but not the objective start and stop time. Is there a way to get this information from your plugin? Or do you know of a different way of doing it? (I want the start and stop time to show up just as a number of seconds.milliseconds, not hh:mm:ss.mmm, or I'd be fine with getting the time of the cursor location.)

Post Reply