Closed liuruyi1991 closed 4 years ago
Where did you have difficulty? Installing dependencies? https://github.com/sevagh/pitch-detection#build-and-install
I agree with liuruyi1991. The dependencies are too complex and impossible to build. I am on Windows environment and ffts does not have any Windows build script.
I want to include pitch-detection in my Android project, which I am developing using Android Studio on Windows. So the only option is to include the sources of pitch-detection and ffts manually to my native library of Android project. I did that and it resulted in so many errors, that I am about to give up after spending 8-9 hours on it.
ffts build has too many configurations, with an extremely complex CMakeFiles.txt, which I can't understand. I have no idea how to configure my own native CMakeFiles.txt based on that. I know it's not your (pitch-detection) problem, but realize that it still makes your library pitch-detection unusable.
The second dependency is mlpack in your code. I have no idea what it is. If it's Google's ML toolkit, why is it included in the main source files? That is also throwing compilations errors, and I have no idea how to fix it.
If you have a cleaner solution without all these dependencies, please let me know. Otherwise, I am about to give up.
Try this for a simpler Android version of the McLeod pitch method: https://github.com/sevagh/pitcha
There are native Java, and C++ NDK examples of McLeod in it.
The second dependency is mlpack in your code. I have no idea what it is. If it's Google's ML toolkit, why is it included in the main source files?
This is mlpack: https://www.mlpack.org/ - I'm not sure if it's affiliated with Google.
Probabilistic YIN and Probabilistic MPM (two pitch detection methods included in this project) use Hidden Markov Models which rely on mlpack.
This project is very Linux-centric (as are most of my projects) - I only own Linux computers, and I rely heavily on traditional Linux distribution package managers, which should contain mlpack.
ffts, in my experience, has been painless to build with CMake on Linux. From everything I've heard about C++ development on Windows, it's not as easy. However, given the licensing situation, using ffts is essential: https://github.com/sevagh/pitch-detection/issues/27#issuecomment-382489206
Consider this project as an experimental/educational collection of code, and not a polished cross-platform library that you can easily drop into any project.
Those hours both of you spent on figuring out how to use this project are - although painful - beneficial to your personal knowledge and development. I'm proud of both of you, and don't give up.
Thanks for responding. The pitcha code is useful, but itseems to depend on pitch-detection.so, which it's unable to find. Is that built using this repository?
It should be built using the NDK: https://github.com/sevagh/pitcha/search?q=pitch_detection.so&unscoped_q=pitch_detection.so
Pitcha is pretty old so I don't know if the NDK method I used still works.
I found ffts for Android. MLPack seems like it could be a very complicated port. I used to believe that one needs to design a library with platforms in mind.
Anyways, the Pyin is also as C++ library: https://github.com/xstreck1/LibPyin, but the license is GPL. This one doesn't use MLPack.
hi This project has too much error and it cann't run directly. It takes me a week in order to solve this error.