我正在研究分析声音文件音高的程序.我遇到了一个名为"TarsosDSP"的非常好的API,它提供了各种音高分析.但是我在设置它时遇到了很多麻烦.有人能告诉我一些关于如何使用这个API(特别是PitchProcessor类)的快速指示吗?一些代码片段将非常受欢迎,因为我在声音分析方面真的很新.
谢谢
编辑:我在http://husk.eecs.berkeley.edu/courses/cs160-sp14/index.php/Sound_Programming找到了一些文档,其中有一些示例代码,显示如何设置PitchProcessor,...
int bufferReadResult = mRecorder.read(mBuffer, 0, mBufferSize);
// (note: this is NOT android.media.AudioFormat)
be.hogent.tarsos.dsp.AudioFormat mTarsosFormat = new be.hogent.tarsos.dsp.AudioFormat(SAMPLE_RATE, 16, 1, true, false);
AudioEvent audioEvent = new AudioEvent(mTarsosFormat, bufferReadResult);
audioEvent.setFloatBufferWithByteBuffer(mBuffer);
pitchProcessor.process(audioEvent);
Run Code Online (Sandbox Code Playgroud)
...我很迷茫,mBuffer和mBufferSize究竟是什么?我如何找到这些值?我在哪里输入我的音频文件?