-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run C++ Extractor Client Code #20
Comments
You can pipe from VectorInput (http://essentia.upf.edu/documentation/doxygen/classessentia_1_1streaming_1_1VectorInput.html): vectorInput = new streaming::VectorInput(); vectorInput->setVector(&signal); Btw, I've simplified the code of this extractor, check the latest commit. |
Basically I cannot use the operator >> in the mixed code ObjectiveC / C++, so can I do something like
|
I explain my knowledge better here. The basic issue here is that in the ObjC / C++ mixed mode is hard to write the operators overload >> << so I cannot write something like with another example from the standard example codes:
But I have to figure out how to write this in a different way, may be something like that: std:vectoressentia::Real ticks = 0.0; So far my understanding looking at the standard examples is that to compute I have to do something like
then I can connect them together in this way:
Then I have to process the frames like so:
As soon as I have in the essentia:Pool the values I can get the values or pass them to another extractor:
At this point computation was done and I can get the values
|
Just another example for the PredominantMelody if I'm following the guide here in the right way: http://essentia.upf.edu/documentation/howto_standard_extractor.html
} |
if I understood correctly, the problem is in << >> operators, can you use this instead (which is equivalent)? |
@dbogdanov |
Looking at the examples like the rhythm extractor:
https://github.com/MTG/essentia/blob/master/src/examples/streaming_rhythmextractor_multifeature.cpp
in the essentia architecture an extractor is used in pipe with an audio input node:
Algorithm* mono = factory.create("MonoMixer");
Algorithm* rhythmextractor = factory.create("RhythmExtractor2013");
rhythmextractor->configure("method", "multifeature");
connect(audioloader->output("audio"), mono->input("audio"));
connect(audioloader->output("numberChannels"), mono->input("numberChannels"));
connect(audioloader->output("sampleRate"), pool, "metadata.sampleRate");
connect(mono->output("audio"), rhythmextractor->input("signal"));
and then connected to the ouput:
connect(mono->output("audio"), rhythmextractor->input("signal"));
Finally the network run the nodes:
Network network(audioloader);
network.run();
Is it possible to run the extractor directly i.e. using the constructor class:
essentia::init();
essentia::streaming::RhythmExtractor2013 *rythmExt =
new essentia::streaming::RhythmExtractor2013();
/// pass the pcm input signal
rythmExt->process();
The text was updated successfully, but these errors were encountered: