Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update intro of FrequencyAnalyzer.frequencyBinCount #24184

Merged
merged 4 commits into from
Mar 30, 2023

Conversation

dawei-wang
Copy link
Contributor

Fix #24183

Description

Motivation

Additional details

Related issues and pull requests

@dawei-wang dawei-wang requested a review from a team as a code owner February 5, 2023 20:34
@dawei-wang dawei-wang requested review from wbamberg and removed request for a team February 5, 2023 20:34
@github-actions github-actions bot added the Content:WebAPI Web API docs label Feb 5, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2023

Preview URLs

External URLs (1)

URL: /en-US/docs/Web/API/AnalyserNode/frequencyBinCount
Title: AnalyserNode.frequencyBinCount

(comment last updated: 2023-03-30 04:35:51)

@@ -14,7 +14,7 @@ browser-compat: api.AnalyserNode.frequencyBinCount

{{APIRef("Web Audio API")}}

The **`frequencyBinCount`** read-only property of the {{domxref("AnalyserNode")}} interface is an unsigned integer half that of the {{domxref("AnalyserNode.fftSize")}}. This generally equates to the number of data values you will have to play with for the visualization.
The **`frequencyBinCount`** read-only property of the {{domxref("AnalyserNode")}} interface is an unsigned integer half that of the {{domxref("AnalyserNode.fftSize")}}. This is the total number of data points available. Their indices have a linear relationship with the frequencies they represent, between 0 and the [Nyquist frequency](https://en.wikipedia.org/wiki/Nyquist_frequency).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The frequencyBinCount read-only property of the {{domxref("AnalyserNode")}} interface is an unsigned integer half that of the {{domxref("AnalyserNode.fftSize")}}

  1. "half that" - you mean half the value of, or half the data size of - impossible to tell.
  2. Normally we don't mention the data size because users of the API don't care unless it forces them to use something other than Number.

So I would restructure this to something like:

The frequencyBinCount read-only property of the {{domxref("AnalyserNode")}} interface is the total number of data points available to whatever it is they are available to.
This is half the WHAT???? of the the {{domxref("AnalyserNode.fftSize")}}. The two method's indices have a linear relationship with the frequencies they represent, between 0 and the Nyquist frequency.

@dawei-wang dawei-wang requested review from hamishwillee and removed request for wbamberg February 6, 2023 00:39
@hamishwillee hamishwillee requested review from a team and wbamberg and removed request for a team February 6, 2023 01:29
@Josh-Cena
Copy link
Member

Could someone from @mdn/yari-content-web-api review this?

Copy link
Contributor

@teoli2003 teoli2003 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@teoli2003 teoli2003 changed the title Update intro Update intro if FrequencyAnalyzer.frequencyBinCount Mar 30, 2023
@teoli2003 teoli2003 changed the title Update intro if FrequencyAnalyzer.frequencyBinCount Update intro of FrequencyAnalyzer.frequencyBinCount Mar 30, 2023
@teoli2003 teoli2003 merged commit cee9779 into mdn:main Mar 30, 2023
@dawei-wang dawei-wang deleted the patch-3 branch March 30, 2023 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Visualization is by far not the only use case for FFT
4 participants