Why selecting samples from 0...4096 is really 1..4096 ??

Hp

## Selection f(samples)

### Re: Selection f(samples)

It's a computer/programming tradition to start counting at zero. If you are addressing memory there truly is an address zero location in hardware and in an audio file sample zero also exists. i.e. with 4 bits we can count from binary 0000 (decimal zero) to 1111 (decimal 15 or hexadecimal F).

### Re: Selection f(samples)

OK, I am a programmer tooDougDbug wrote:It's a computer/programming tradition to start counting at zero. If you are addressing memory there truly is an address zero location in hardware and in an audio file sample zero also exists. i.e. with 4 bits we can count from binary 0000 (decimal zero) to 1111 (decimal 15 or hexadecimal F).

with your binary example 0000 to 1111 we have a count of 16.

**Goldwave from 0...4096, would have a count of 4097, really uses 1...4096 as a count of 4096**

or I am wrong

Hp

### Re: Selection f(samples)

Hi I know what you mean, and here's why it does that... each sample is like a staircase step... the index (sample) number is the beginning of each step... since the finish marker is placed at the end of the step it gives you one number higher.HpW wrote:OK, I am a programmer tooDougDbug wrote:It's a computer/programming tradition to start counting at zero. If you are addressing memory there truly is an address zero location in hardware and in an audio file sample zero also exists. i.e. with 4 bits we can count from binary 0000 (decimal zero) to 1111 (decimal 15 or hexadecimal F).

with your binary example 0000 to 1111 we have a count of 16.

Goldwave from 0...4096, would have a count of 4097, really uses 1...4096 as a count of 4096

or I am wrong

Hp

Here's a small example, with 4 samples (with "_" being the staircase step of each sample):

0_1_2_3_4

so if you put the finish marker before the fourth sample it would be on "3", but if you selected all 4 samples then the finish marker would now be on "4" so it says "4"!

Hopefully this makes sense to you, or you at least understand what the program is doing now!