Selection on samples (or between samples)

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.
Post Reply
edwinn
Posts: 269
Joined: Fri Feb 27, 2015 12:46 am
Operating System: Windows 7

Selection on samples (or between samples)

Post by edwinn » Mon Dec 14, 2015 9:59 pm

This would be an easy one, and must admit.. haven't checked HELP much for the answer.

I'm seeing the 'selection' usually end in the middle between two sample points. Why not at the sample nodes? What is the reasoning for this?


-Ed

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

Re: Selection on samples (or between samples)

Post by steve » Mon Dec 14, 2015 10:40 pm

"Samples" are really just "numbers" that represent "amplitude" (vertical height) when an analog waveform is "sampled" ("measured") at regular intervals. The important thing in terms of horizontal position is the period between dots (the "sample period"). Whether the dot is placed at the start, end or middle of the sample period is quite arbitrary, as is the decision whether to mark selections from the start, middle or end of a sample period. a sample period is the smallest unit of time for digital audio - either a sample is included in the selection, or it isn't, so you can't have "half a sample" - either the sample is counted or it isn't.

There has recently been some discussion about how best to represent the selection at sample level to try and make it as clear as possible even if there are tracks at different sample rates, so this may change in future versions of Audacity.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

edwinn
Posts: 269
Joined: Fri Feb 27, 2015 12:46 am
Operating System: Windows 7

Re: Selection on samples (or between samples)

Post by edwinn » Wed Dec 16, 2015 2:06 am

steve wrote:"Samples" are really just "numbers" that represent "amplitude" (vertical height) when an analog waveform is "sampled" ("measured") at regular intervals. The important thing in terms of horizontal position is the period between dots (the "sample period"). Whether the dot is placed at the start, end or middle of the sample period is quite arbitrary, as is the decision whether to mark selections from the start, middle or end of a sample period. a sample period is the smallest unit of time for digital audio - either a sample is included in the selection, or it isn't, so you can't have "half a sample" - either the sample is counted or it isn't.

There has recently been some discussion about how best to represent the selection at sample level to try and make it as clear as possible even if there are tracks at different sample rates, so this may change in future versions of Audacity.
Thank you, and that's a good answer though a little hazy. Are the `dots´ NOT the sample point and represent the amplitude? Can it be set to select or `land on´ the dots when selecting? If that question sounds confusing, it means I'm a little confused.

Also.. I'd like to see an AMPLITUDE readout in the [lower] status bar while hovering over, or from one sample to the next. How cool would THAT be!

-Ed

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

Re: Selection on samples (or between samples)

Post by steve » Wed Dec 16, 2015 2:14 am

edwinn wrote:Are the `dots´ NOT the sample point and represent the amplitude?
The dots represent the "samples", which are "amplitude measurement" that are taken at regular intervals.
Counting the number of "intervals" is a bit like counting the bricks along a wall. You measure the width of part of a wall as exactly 8 bricks wide. How did you do that? Do you measure from the start of one brick to the start of the next, or the middle of one brick to the middle of the next, or the end of one brick to the end of the next? The answer is that it does not really matter - 8 bricks wide is 8 bricks wide whichever way.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

edwinn
Posts: 269
Joined: Fri Feb 27, 2015 12:46 am
Operating System: Windows 7

Re: Selection on samples (or between samples)

Post by edwinn » Wed Dec 16, 2015 1:03 pm

steve wrote:
edwinn wrote:Are the `dots´ NOT the sample point and represent the amplitude?
The dots represent the "samples", which are "amplitude measurement" that are taken at regular intervals. Counting the number of "intervals" is a bit like counting the bricks along a wall. The answer is that it does not really matter - 8 bricks wide is 8 bricks wide whichever way.
Thanks, I kinda' get that. A similar example would be when using an HP spectrum analyzer and acquiring the data. The sweep is 400 intervals but there are 401 points or samples.

But you'd want to trim to a Sample Point, yes? and not an interval? So then, making the selection (zooming in close, and sometimes in dB display mode) is ambiguous to me. How about making that an option in Preferences?

Working with tracks of different sample rates does complicate things, though I can't really get a picture of that (and its impact) in mind right now.

-Ed

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

Re: Selection on samples (or between samples)

Post by steve » Wed Dec 16, 2015 1:25 pm

edwinn wrote:A similar example would be when using an HP spectrum analyzer and acquiring the data. The sweep is 400 intervals but there are 401 points or samples.
Yes that's the type of issue that has to be dealt with. What we want is that if you select 400 samples, then 400 samples should be selected. That sounds obvious, but getting it to work correctly and consistently is surprising tricky.
edwinn wrote:But you'd want to trim to a Sample Point, yes? and not an interval?
Edits must all occur at the boundary between one sample and the adjacent sample. As I mentioned previously, there is no such thing as a partial sample, it's either in or out. Internally Audacity handles this correctly, but I think that we could perhaps display it more clearly when zoomed in very close. In the soon to be released Audacity 2.1.2, sample selection is shown slightly differently from earlier versions, but I think that we can still make it clearer. There is a long discussion about this issue 'somewhere' on this forum - If I can find the topic I'll post a link.

My current thinking on this question is that the selection should not snap to sample positions, but should show in the waveform at exactly the same position as is displayed in the Timeline (the ruler above the tracks). The "dots" should be placed at the centre of the sample period. The result of this is that; If a dot is within the selection, then it is selected. If a dot is outside of the selection then it is not selected. (and this would be consistent across multiple tracks regardless of the sample rate).
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: Selection on samples (or between samples)

Post by Gale Andrews » Wed Dec 16, 2015 1:43 pm

steve wrote:
edwinn wrote:But you'd want to trim to a Sample Point, yes? and not an interval?
Edits must all occur at the boundary between one sample and the adjacent sample. As I mentioned previously, there is no such thing as a partial sample, it's either in or out. Internally Audacity handles this correctly, but I think that we could perhaps display it more clearly when zoomed in very close. In the soon to be released Audacity 2.1.2, sample selection is shown slightly differently from earlier versions, but I think that we can still make it clearer. There is a long discussion about this issue 'somewhere' on this forum - If I can find the topic I'll post a link.
This http://forum.audacityteam.org/viewtopic ... 46&t=72130 ?


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

Post Reply