You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Although Essentia provides a large amount of documentation, but I still haven't found an example of inputting audio from a buffer and then running an algorithm. The following is the code I wrote to run the beat tracking algorithm.
essentia::init();
AlgorithmFactory&` factory = standard::AlgorithmFactory::instance();
Algorithm* beatTracker = factory.create("BeatTrackerDegara");
Pool pool;
vector<Real> audioBuffer;
vector<Real> ticks;
audioBuffer.resize(1024);
beatTracker->input("signal").set(state->audioBuffer);
beatTracker->output("ticks").set(state->ticks);
// read data from file and convert to float
for (int i = 0;i < 1024;i++) {
state->audioBuffer[i] = audio_in[i] / 32768.0f;
}
beatTracker->compute();
state->pool.add("ticks", state->ticks);
const auto& beat_ticks = state->pool.value<vector<Real>>("ticks");
Then I encountered the error:
terminate called after throwing an instance of 'essentia::EssentiaException'
what(): Descriptor name 'ticks' of type std::vector<Real> not found
Why does this problem occur and how can it be fixed?
The text was updated successfully, but these errors were encountered:
Although Essentia provides a large amount of documentation, but I still haven't found an example of inputting audio from a buffer and then running an algorithm. The following is the code I wrote to run the beat tracking algorithm.
Then I encountered the error:
Why does this problem occur and how can it be fixed?
The text was updated successfully, but these errors were encountered: