Skip to content

請教 VisualizerHelperonFftDataCapture 程式碼片段 #3

@tobeylin

Description

@tobeylin

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

想請教在 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 幫助了我很多!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions