Skip to content

Audio buffer convert to pitch, base on Apple Accelerate Lib

License

Notifications You must be signed in to change notification settings

WymanLyu/PitchDetector

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PitchDetector

基于苹果加速库的音高检测 Base on Apple Accelerate Lib, detect audio pitch

Overview

使用

 PitchDetector *pitchDetector = new PitchDetector(NUMBER_SAMPLES, SAMPLE_RATE);
 Pitch pit = pitchDetector->process(BUFFER_DATA, NUMBER_SAMPLES);
 // get information you need 从Pitch的结果中获取需要的信息【比如音高,频率...】
 printf("frequency:%f - amplitude:%f - octave:%ld - key:%ld - step:%ld - name :%s \n", pit.frequency, pit.amplitude, pit.octave, pit.key, pit.step, pit.stepString.c_str());

注意

如果是在.m文件使用此类,请修改成.mm

最后

If you think it's useful, star to me, Free to share with ideas, issue or pull requests

欢迎提出任何问题,

License

MIT

About

Audio buffer convert to pitch, base on Apple Accelerate Lib

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages