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

請教 VisualizerHelperonFftDataCapture 程式碼片段 #3

Open
tobeylin opened this issue Dec 27, 2021 · 0 comments
Open

請教 VisualizerHelperonFftDataCapture 程式碼片段 #3

tobeylin opened this issue Dec 27, 2021 · 0 comments

Comments

@tobeylin
Copy link

你好 因為近期也在研究這塊,網路上爬了很多資料

想請教在 VisualizerHelperonFftDataCapture 程式碼片段裡

為什麼只需要計算 mCount*2 的 magnitude 呢?

mCount*2 小於 fft.length / 2,那麼 mCount*2+1~fft.length/2 的資料就直接捨棄了嗎?

for (int i = 2; i < mCount *2;) {
    model[j] = (float) Math.hypot(fft[i], fft[i + 1]);
    i += 2;
    j++;
    model[j] = Math.abs(model[j]);
}

先說聲謝謝!這個 repo 幫助了我很多!

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

No branches or pull requests

1 participant