Comments (7)
Well, this is trickier than it seems...
Normally, you should just uncomment those lines: https://github.com/MTG/essentia/blob/master/wscript#L65
However, if you do that, then this file doesn't compile anymore: https://github.com/MTG/essentia/blob/master/src/base/roguevector.h
And the problem lies in the fact that the RogueVector
class relies on an implementation detail of the C++ library which uses protected inheritance in libstdc++, so we can override its behavior, but uses private inheritance in libc++... There is actually no clean way to do this with libc++, so we're stuck with libstdc++ at the moment (which is not very nice when developing with clang/libc++, I agree...).
The correct and clean solution would be to replace all uses of std::vector
in Essentia using a new essentia::Vector class that would also give us the behavior of the RogueVector
class (ie: can "borrow" memory from another vector, required for the streaming mode). That is however quite some bit of work...
from essentia.
I completely understand. I wish I had the necessary skills to contribute a solution to this issue.
In the meantime, I suppose one workable solution for my prototype would be to compile my extractor as a command line utility, execute the utility from my "host" application, write the algorithm results to a file, and then read/parse the file contents to my host libc++ application.
If anyone else has any ideas, input would be greatly appreciated.
from essentia.
Compiling the extractor as a command-line utility seems the best choice:
- a crash in Essentia doesn't crash your host app
- it is very easily parallelizable if you want to run an extractor on lots of files; you can also have a task queue distribute jobs depending on the number of cores available to optimize CPU usage (very adapted to running lots of tasks on a cluster)
- you get the build system for the extractor nearly "for free", just add yours in the
src/examples
and edit the https://github.com/MTG/essentia/blob/master/src/examples/wscript file to add it.
from essentia.
I just came across the same issue when trying to build Essentia on mobile iOS.
I ported FFTW to iOS/armv7 using this script that works (quite) good:
Then I put everything in XCode5 and build.
Now the error is exactly the problem depicted here:
Without having the libc++ flags active I have:
/Users/loreto/Projects/iOS/AUDIO/EssentiaTouch/EssentiaTouch/Classes/essentia/roguevector.h:127:40: No member named '_M_impl' in 'essentia::RogueVector'
My question here is
Is possibile to use instead Apple "veclib.h" from Accelerate.Framework here ?
I mean
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/Accelerate.framework/Frameworks/vecLib.framework/Headers/vecLib.h
from essentia.
the problem here is that the RogueVector class relies on an implementation detail of the std::vector class from the gnu libstdc++ that gcc links to. Clang however links against libc++ which has a different implementation and doesn't allow the RogueVector to be implemented on top of it, because all its member variables are private (they are protected in libstdc++).
If you could compile using libstdc++ instead of libc++ that should make it work.
Otherwise, the better (but more time consuming) solution would be to implement a custom vector class that would allow the RogueVector to be implemented, and change all the buffers in the streaming mode to use that vector class (instead of std::vector currently)
from essentia.
I agree that the best solution would it be to implement the custom vector class. So far I'm compiling against libstdc++ and it works fine on LLVM5.0 / armv7.
That was operating in standard mode, due to too much native IO limitation with the streaming mode on armv7 devices.
Hope to see a RogueVector specific implementation and a huge refactoring then!
from essentia.
The latest version of master now builds against libc++ instead of libstdc++ on mac os. It's a big fat hack but it works, so that's what it is :-) The correct fix is still to move most of Essentia to a specific essentia::Vector (and essentia::Matrix to replace tnt::Array2D), but that will be for a later version. In the meantime, it should now compile everywhere using the native compiler and C++ standard lib (should also work on iphone, although I haven't tested it)
from essentia.
Related Issues (20)
- Wrong implementation of the 'AutoCorrelation' algorithm HOT 2
- PredominantPitchMelodia requires reinstantiation for sequential audio processing HOT 2
- Installation issues HOT 1
- documentation website is down HOT 3
- Essentia and Unity
- Is there a model to determine the time-stamps to beat mapping? HOT 1
- RhythmExtractor2013 ticks doesn't accurately provide the information of when the first beat occurs HOT 2
- TempoCNN minimum expected audio length
- Problem: cannot import name [TensorflowPredict...] from essentia.streaming HOT 2
- Problem connecting the Pipeline for DiscogsEffnet ('StreamingAlgo' object has no attribute 'poolIn') HOT 3
- Extractor Docs: "See detailed documentation" link 404's. HOT 1
- Import and runtime error on M1 Mac. Is Essentia Python wheels compatible with older version like Big Sur? HOT 10
- cannot import name 'TensorflowPredictMusiCNN' from 'essentia.standard' HOT 4
- Adding CMake and VS2019/2022 support HOT 23
- Update Vamp plugin to the latest Vamp SDK
- MSVC Vamp plugin builds for Windows
- speech vs music algorithms HOT 3
- Unexpected performance in melody tracking
- PitchMelodia requires 8192 samples
- Build fails with "error: βav_register_allβ was not declared in this scope"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from essentia.