Skip to content

Fix #2032: ABSN extrapolates the last output - #2256

Merged
rtoy merged 4 commits into
WebAudio:mainfrom
rtoy:2032-absn-interpolation-of-last-sample
Dec 15, 2020
Merged

rtoy merged 4 commits into
WebAudio:mainfrom
rtoy:2032-absn-interpolation-of-last-sample

Conversation

@rtoy

@rtoy rtoy commented Oct 2, 2020 •

Copy link
Copy Markdown
Member

Update playbackSignal to mention that extrapolation is used to compute the output sample when the buffer is not looping and we're at the end of the buffer but need output a sample after the end of the buffer but before the next output sample frame.


Preview | Diff

Update `playbackSignal` to mention that extrapolation is used to
compute the output sample when the buffer is not looping and we're at
the end of the buffer but need output a sample after the end of the
buffer but before the next output sample frame.
@rtoy rtoy self-assigned this Oct 2, 2020
@rtoy
rtoy requested a review from padenot October 2, 2020 18:17
@padenot

padenot commented Oct 12, 2020

Copy link
Copy Markdown
Member

cc @karlt.

@padenot

padenot commented Oct 12, 2020

Copy link
Copy Markdown
Member

This looks sensible, but @karlt knows more about this.

@karlt

karlt commented Oct 15, 2020

Copy link
Copy Markdown
Contributor

I understand that @rtoy and I see this somewhat differently.
sub-sample start timing and upsampling are both situations where extrapolation would be just as useful before the first buffer sample as after the last sample, so it seems undesirable to me to describe extrapolation only after the last sample.

I would suggest just removing "between" from the text in the previous paragraph "UA-supplied algorithm that interpolates -between- sample frames in the neighborhood of position". If "interpolates" is not considered generic enough to support values outside the provided buffer samples, then it can be replaced with "interpolates or extrapolates". I would be happy that using "extrapolates" in this way would also include UA-specific sinc function approximations.

@rtoy

rtoy commented Nov 3, 2020

Copy link
Copy Markdown
Member Author

Sorry for the delay @karlt

I understand that @rtoy and I see this somewhat differently.
sub-sample start timing and upsampling are both situations where extrapolation would be just as useful before the first buffer sample as after the last sample, so it seems undesirable to me to describe extrapolation only after the last sample.

I would suggest just removing "between" from the text in the previous paragraph "UA-supplied algorithm that interpolates -between- sample frames in the neighborhood of position". If "interpolates" is not considered generic enough to support values outside the provided buffer samples, then it can be replaced with "interpolates or extrapolates". I would be happy that using "extrapolates" in this way would also include UA-specific sinc function approximations.

I'm fine with removing "between" as you suggest. I'm not sure what you're suggesting for the rest of the new text, though.

I don't think sinc interpolators are forbidden. It might be unexpected if users say start(t) and there's non-zero and possibly audible output before time t. For all the DSP work I've done, we always used casual systems and had to account for any filter delays appropriately.

@karlt

karlt commented Nov 4, 2020

Copy link
Copy Markdown
Contributor

I'm fine with removing "between" as you suggest. I'm not sure what you're suggesting for the rest of the new text, though.

If "between" is removed, I'm suggesting that there is no need to add a new paragraph. i.e. modification to the preceding paragraph is sufficient to remove implication that interpolation (or extrapolation) happens only between samples.

@rtoy

rtoy commented Nov 6, 2020

Copy link
Copy Markdown
Member Author

I'm fine with removing "between" as you suggest. I'm not sure what you're suggesting for the rest of the new text, though.

If "between" is removed, I'm suggesting that there is no need to add a new paragraph. i.e. modification to the preceding paragraph is sufficient to remove implication that interpolation (or extrapolation) happens only between samples.

That's fine with me. I've made the proposed changes.

Minor editorial change to make it clear that we're talking about the
variables in the algorithm rather than some generic term, especially
for "position".
@rtoy

rtoy commented Dec 15, 2020

Copy link
Copy Markdown
Member Author

@karlt says these changes are ok. I'm going to land this now.

@rtoy
rtoy merged commit 23502fc into WebAudio:main Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants