Giter VIP home page Giter VIP logo

ofxaudioanalyzer's Introduction

ofxAudioAnalyzer

Description

openFrameworks addon for audio analysis. It provides the following algorithms :

  • RMS, Instant power, Energy, Pitch frequency, Pitch Confidence, Pitch Salience, HFC, Centroid, Inharmonicity, Spectral Complexity, Dissonance, Roll Off, Odd To Even Harmonic Energy Ratio, Strong Peak, Strong Decay, Onsets, Spectrum, Mel Bands, MFCC, Harmonic Pitch Class Profile, Tristimulus

    See AlgorithmsReference.md

This addon uses Essentia library.

Demo video: https://vimeo.com/129795472

Compatibility

OSX & Linux - OF 0.10.0

Tested with OSX 10.11.6 and Ubuntu 14.04

Compilation

  • Linux: Makefiles.

  • OSX: The best and easiest way is to use Xcode Projects. You can also use the makefiles, but in OSX you'll need to add ofxAudioDecoder to addons.make.

Dependencies

For playing and analyzing audio files (see Audio File Player), ofxAudioDecoder addon is needed for OSX.

Usage

  • The examples included in the repository can be used to build new projects specially the empty ones. They can be compiled with Xcode or by Terminal using the Makefiles.

  • Creating a new project:

    • Create a new project using the Project Generator. Be sure to include ofxAudioAnalyzer and ofxAudioDecoder addons.

    • Include ofxAudioAnalyzer header into ofApp.h

      #include "ofxAudioAnalyzer.h"
    • Create an instance of ofxAudioAnalyzer into ofApp class:
    ofxAudioAnalyzer audioAnalyzer;
    • In the setup() function setup the audioAnalyzer's parameters (sampleRate, bufferSize, channels). Be sure that the parameters of the audioAnalyzer match the parameters of the ofSoundStream or the audio files you load to the sound player to avoid errors:
    audioAnalyzer.setup(44100, 512, 2);
    • Analyze the ofSoundBuffer in ofApp::audioIn() and ofApp::audioOut() when using ofSoundStream, or in the ofApp::update() if you are using audio file player, ofSoundBuffer parameters must always match audioAnalyzer's:
    audioAnalyzer.analyze(soundBuffer);
    • Retrieve analysis results specifying algorithm, channel, smooth amount and if you want it normalized (Smoothing and normalizing are optionals. Normalizing is not necessary for all algorithms, some of them output values from 0.0-1.0 by default. See allAlgorithms example):
    float rms = audioAnalyzer.getValue(RMS, channel, smoothAmount, doNormalize);

Audio File player

This repository includes an extended version of ofBaseSoundPlayer taken and modified from: https://github.com/YCAMInterlab/ofxTimeline/tree/master/libs/ofOpenALSoundPlayer_TimelineAdditions/src.

This class [ofSoundPlayerExtended] lets you load, play and analyze audiofiles (wav & mp3). See examples: allAlgorithms, audioFilePlayer and onsets to understand how it works.

(!) ofSoundPlayerExtended is not really necessary for the addon to work. If you don't need or it's giving to much errors, just remove it from Xcode project or the addon's /src directory.

Issues

For any bug, help or feature request open an issue or check this OF Forum Thread.

License

Essentia library and this addon are distributed under Affero GPLv3 license. See License

ofxaudioanalyzer's People

Contributors

leozimmerman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxaudioanalyzer's Issues

Assistance with min max values for GUI sliders

Hi @leozimmerman I'm getting back into openFrameworks after a few months off and really liking what you've done with ofxAudioAnalyzer. I've changed it to use ofParameter and have set it up to work with ofxGuiExtended. But I'm not sure what the min and max values should be for all the float sliders. Any chance you could assist with this? Cheers.

Libraries missing while running on other machine

Hi,

I have a problem with the linking of the depending libraries (I think).
When I follow the instructions from the Readme I can succesfully build and run my project. But when I try to run my app on another machine it doesn't start and gives an error, saying:
Dyld Error Message: Library not loaded: /usr/local/opt/taglib/lib/libtag.1.dylib
Reason: image not found
All the libraries, mentioned in the Readme, are under 'Link Binary With Libraries' in the Build Phases.
I'm quite new to the linking of libraries, so I'm not sure what to do.

Thanks :)

example not building on linux

/home/s***/of-workspace/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp: In member function ‘virtual float ofSoundPlayerExtended::getPosition() const’:
/home/shank/of-workspace/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp:726:13: error: control reaches end of non-void function [-Werror=return-type]
pos = float(mpg123_tell(mp3streamf)) / float(channels) / float(samplerate);
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1plus: some warnings being treated as errors
make[1]: *** [/home/s***/of-workspace/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:354: /home/s***/of-workspace/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofSoundPlayerExtended.o] Error 1
make[1]: Leaving directory '/home/s***/of-workspace/addons/ofxAudioAnalyzer/example-onsets'
make: *** [/home/s***/of-workspace/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:129: Release] Error 2

VAD - voice activity detection

Nice add-on.

For a new project I was hoping to do VAD to know when people are speaking (maybe even singing) and I was wondering if your audio analysis could be used for it?

Do you think it's possible to build on what you have to add VAD (voice activity detection)?

Thanks

Linux Error: requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC

Ubuntu 18.04

Hi. On attempting to build examples and building an empty project with and without ofSoundPlayerExtended, the following errors occur:

/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(mapflags.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(rdft2-pad.o): requires dynamic R_X86_64_PC32 reloc against 'memcpy' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(alloc.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(assert.o): requires dynamic R_X86_64_PC32 reloc against 'fflush' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(kalloc.o): requires dynamic R_X86_64_PC32 reloc against 'malloc' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(planner.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(primes.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(problem.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(timer.o): requires dynamic R_X86_64_PC32 reloc against 'gettimeofday' which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(lt4-problem.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(problem2.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
Etc...

Cont.

/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(direct-r2r.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(direct2.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/usr/bin/ld.gold: error: /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a(hc2hc-direct.o): requires dynamic R_X86_64_32 reloc which may overflow at runtime; recompile with -fPIC
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofSoundPlayerExtended.o:ofSoundPlayerExtended.cpp:function ofSoundPlayerExtended::readFile(boost::filesystem::path const&, std::vector<short, std::allocator >&): error: undefined reference to 'ofSoundPlayerExtended::mpg123ReadFile(boost::filesystem::path const&, std::vector<short, std::allocator >&, std::vector<float, std::allocator >&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofSoundPlayerExtended.o:ofSoundPlayerExtended.cpp:function ofSoundPlayerExtended::stream(boost::filesystem::path const&, std::vector<short, std::allocator >&): error: undefined reference to 'ofSoundPlayerExtended::mpg123Stream(boost::filesystem::path const&, std::vector<short, std::allocator >&, std::vector<float, std::allocator >&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::TypeProxy::checkType(std::type_info const&, std::type_info const&) const: error: undefined reference to 'essentia::nameOfType[abi:cxx11](std::type_info const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::TypeProxy::checkType(std::type_info const&, std::type_info const&) const: error: undefined reference to 'essentia::nameOfType[abi:cxx11](std::type_info const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::standard::Algorithm::processingMode[abi:cxx11]'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::standard::Algorithm::processingMode[abi:cxx11]'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::Logger::debug(essentia::DebuggingModule, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::ParameterMap::add(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::standard::Algorithm::processingMode[abi:cxx11]'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::standard::Algorithm::processingMode[abi:cxx11]'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::Logger::debug(essentia::DebuggingModule, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::Logger::debug(essentia::DebuggingModule, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::Logger::debug(essentia::DebuggingModule, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, bool)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&,

Etc...

On Ubuntu 16

Linking bin/myCreativeSketch for linux64
g++ -o bin/myCreativeSketch obj/linux64/Release/src/main.o obj/linux64/Release/src/ofApp.o /home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAAOnsetsAlgorithm.o /home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzer.o /home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerAlgorithms.o /home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAAMultiPitchKlapuriAlgorithm.o /home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o /home/red/OF/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a /home/red/OF/addons/ofxAudioAnalyzer/libs/essentia/lib/linux64/libessentia.a /home/red/OF/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a -Wl,-rpath=./libs:./bin/libs -Wl,--as-needed -Wl,--gc-sections -fuse-ld=gold -L/home/red/OF/libs/fmodex/lib/linux64/ -lfmodex /home/red/OF/libs/kiss/lib/linux64/libkiss.a /home/red/OF/libs/poco/lib/linux64/libPocoZip.a /home/red/OF/libs/poco/lib/linux64/libPocoNet.a /home/red/OF/libs/poco/lib/linux64/libPocoXML.a /home/red/OF/libs/poco/lib/linux64/libPocoFoundation.a /home/red/OF/libs/poco/lib/linux64/libPocoRedis.a /home/red/OF/libs/poco/lib/linux64/libPocoJSON.a /home/red/OF/libs/poco/lib/linux64/libPocoUtil.a /home/red/OF/libs/poco/lib/linux64/libPocoCrypto.a /home/red/OF/libs/poco/lib/linux64/libPocoNetSSL.a /home/red/OF/libs/poco/lib/linux64/libPocoEncodings.a /home/red/OF/libs/tess2/lib/linux64/libtess2.a -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lcurl -lglfw -lpulse-simple -lpulse -lasound -lGLEW -lGLU -lGL -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lboost_filesystem -lboost_system -lpugixml -luriparser -lXinerama -lrtaudio
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function ofxAudioAnalyzerUnit::setup(int, int): error: undefined reference to 'essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::TypeProxy::checkType(std::type_info const&, std::type_info const&) const: error: undefined reference to 'essentia::nameOfType[abi:cxx11](std::type_info const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::TypeProxy::checkType(std::type_info const&, std::type_info const&) const: error: undefined reference to 'essentia::nameOfType[abi:cxx11](std::type_info const&)'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::standard::Algorithm::processingMode[abi:cxx11]'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o:ofxAudioAnalyzerUnit.cpp:function essentia::EssentiaFactoryessentia::standard::Algorithm::create_i(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, essentia::Parameter const&) const: error: undefined reference to 'essentia::standard::Algorithm::processingMode[abi:cxx11]'
/home/red/OF/addons/obj/linux64/Release/ofxAudioAnalyzer

Etc...

Error while linking to essentia

Hi,
Trying to compile on UbuntuStudio 16.04 with standard Linux tools.
I get errors while linking. I suspect a wrongly define compiler macro but not sure how to correct it
if it is indeed the case. I have also compiled and installed essentia in case there was an issue with the static library shipped.

Thanks for the help.

Trad

Compiling example-allAlgorithms for Release
make[1]: Entering directory '/home/traddog/Desktop/of_v0.9.3_linux64_release/addons/ofxAudioAnalyzer/example-allAlgorithms'
HOST_OS=Linux
checking pkg-config libraries: cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl libpulse-simple alsa gl glu glew gtk+-3.0 libmpg123
Linking bin/example-allAlgorithms for linux64
g++ -o bin/example-allAlgorithms obj/linux64/Release/src/ofApp.o obj/linux64/Release/src/main.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAAMultiPitchKlapuriAlgorithm.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofSoundPlayerExtended.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerAlgorithms.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzer.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAAOnsetsAlgorithm.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxSliderGroup.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxLabel.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxBaseGui.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxGuiGroup.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxToggle.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxSlider.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxPanel.o /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxGui/src/ofxButton.o /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/openFrameworksCompiled/lib/linux64/libopenFrameworks.a /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/ofxAudioAnalyzer/libs/essentia/lib/linux64/libessentia.a /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/ofxAudioAnalyzer/libs/essentia/lib/linux64/libessentia.a /home/traddog/Desktop/of_v0.9.3_linux64_release/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/libfftw3f.a -Wl,-rpath=./libs:./bin/libs -Wl,--as-needed -Wl,--gc-sections -Wl,-rpath=./libs -L/home/traddog/Desktop/of_v0.9.3_linux64_release/libs/fmodex/lib/linux64/ -lfmodex /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/glfw/lib/linux64/libglfw3.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/kiss/lib/linux64/libkiss.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/tess2/lib/linux64/libtess2.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoNetSSL.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoNet.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoCrypto.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoUtil.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoJSON.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoXML.a /home/traddog/Desktop/of_v0.9.3_linux64_release/libs/poco/lib/linux64/libPocoFoundation.a -lz -lgstapp-1.0 -lgstvideo-1.0 -lgstbase-1.0 -lgstreamer-1.0 -ludev -lfontconfig -lfreetype -lsndfile -lopenal -lssl -lcrypto -lpulse-simple -lpulse -lasound -lGLEW -lGLU -lGL -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lmpg123 -lglut -lX11 -lXrandr -lXxf86vm -lXi -lXcursor -ldl -lpthread -lfreeimage -lrtaudio -lboost_filesystem -lboost_system
/home/traddog/Desktop/of_v0.9.3_linux64_release/addons/obj/linux64/Release/ofxAudioAnalyzer/src/ofxAudioAnalyzerUnit.o: In function ofxAudioAnalyzerUnit::setup(int, int)': ofxAudioAnalyzerUnit.cpp:(.text+0x4f22): undefined reference toessentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
ofxAudioAnalyzerUnit.cpp:(.text+0x4f6f): undefined reference to essentia::standard::Algorithm::output(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' ofxAudioAnalyzerUnit.cpp:(.text+0x4fa8): undefined reference toessentia::standard::Algorithm::input(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
o

need of ofBaseSoundPlayer.h to make it work in OF 0.10

Hello,
I would like to implement your library in a research project made in OF 0.10. To implement ofBaseSoundPlayer.h, just coping it into the new sound library in OF would be enough to make it work?
Any suggestion?
Best

Building a new libfftw3f.a on Linux was required

In case anyone needs this, this is how I made it work:

cd /tmp/
wget https://www.fftw.org/fftw-3.3.10.tar.gz
untar fftw-3.3.10.tar.gz
cd fftw-3.3.10
./configure --prefix /tmp/FFT/ --enable-float
make
make install
cp /tmp/FFT/lib/libfftw3f.a ~/src/openFrameworks/addons/ofxAudioAnalyzer/libs/fftw3f/lib/linux64/

MFCC errors?

dct_f.assign(10,0 );

while numberCoefficients (integer ∈ [1, ∞), default = 13) : 13 is the number of output mel coefficients.
http://essentia.upf.edu/documentation/reference/streaming_MFCC.html


Should it be dct_f.assign(13,0 )?


I changed the two line and got 13 coefficients. keep 2-13 as coefficients, the first is energy?

dct_f.assign(13,0 )?
dct = factory.create("DCT", "inputSize", 24, "outputSize", 13);

thanks

unable to compile on 10.10 with given instructions

I have followed the instructions in the readme and installed all dependencies trough the provided link, added the files to the project and added the needed paths to the project. I am using the 64bit version of openframeworks. However when I try to compile the example projects, I get about 75 linking errors like:

Undefined symbols for architecture x86_64:
"non-virtual thunk to std::__1::basic_iostream<char, std::__1::char_traits >::~basic_iostream()", referenced from:
construction vtable for std::__1::basic_iostream<char, std::__1::char_traits >-in-std::__1::basic_stringstream<char, std::__1::char_traits, std::__1::allocator > in libessentia.a(yamlast.cpp.1.o)

( full output here: https://gist.github.com/gepatto/208a0b43bb133882cf93 )

addon compilation issue with qt on mac

Hello,

I've been trying to compile this addon with Qt 5.7.0 on mac OS 10.12.1. Using .qbs build system.

I'm getting the following linker error:
ld: framework not found /Users/burakertekin/openFrameworks/addons/ofxAudioAnalyzer/OpenAL clang: error: linker command failed with exit code 1 (use -v to see invocation) Process failed with exit code 1.
Although, I've added OpenAL to frameworks list in qbs file. Do I have to compile this addon somehow? Anybody have an idea on this?

Thanks!

Program hangs on AudioAnalyzer::analyze

My SoundBuffer is being initialized and updated correctly but once I try to run AudioAnalyzer::analyze(SoundBuffer) my program hangs and my audio buffer freezes with all 0's
I followed the example but they are using older versions which ask for a SoundBuffer as an input.

`{void ofApp::audioIn(float * input, int bufferSize, int nChannels){

float buffer1[bufferSize];
float buffer2[bufferSize];

for(int i = 0; i < bufferSize ; i += 1) {
    buffer1[i] = input[i*nChannels];
    buffer2[i] = input[i*nChannels+1];
    
}


//Feeding float array into a SoundBuffer
pop.copyFrom(buffer1, 512, 2, 44100);

audioAnal.analyze(pop);

}`

cannot open source file "AL/al.h" (Windows)

I don't know which is the development stage on Windows, anyway this the first error I get on Visual Studio 2017 + OF 0.10.0 + Windows 10

Severity Code Description Project File Line Suppression State
Error (active) E1696 cannot open source file "AL/al.h" example-allAlgorithms D:\of_v0.10.0_vs2017_release\addons\ofxAudioAnalyzer\src\ofSoundPlayerExtended.h 19
Error (active) E1696 cannot open source file "AL/alc.h" example-allAlgorithms D:\of_v0.10.0_vs2017_release\addons\ofxAudioAnalyzer\src\ofSoundPlayerExtended.h 20
Error (active) E0757 overloaded function "std::chrono::duration<_Rep, _Period>::duration [with _Rep=long long, _Period=std::nano]" is not a type name example-allAlgorithms C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.15.26726\include\chrono 195
Error (active) E0020 identifier "ALCcontext" is undefined example-allAlgorithms D:\of_v0.10.0_vs2017_release\addons\ofxAudioAnalyzer\src\ofSoundPlayerExtended.h 87
Error (active) E0020 identifier "ALCdevice" is undefined example-allAlgorithms D:\of_v0.10.0_vs2017_release\addons\ofxAudioAnalyzer\src\ofSoundPlayerExtended.h 118
Error (active) E0020 identifier "ALuint" is undefined example-allAlgorithms D:\of_v0.10.0_vs2017_release\addons\ofxAudioAnalyzer\src\ofSoundPlayerExtended.h 128
Error (active) E0020 identifier "ALuint" is undefined example-allAlgorithms D:\of_v0.10.0_vs2017_release\addons\ofxAudioAnalyzer\src\ofSoundPlayerExtended.h 129

Deprecation warnings in all examples

All examples use the following style setup:

soundStream.setup(this, outChannels, inChannels, sampleRate, bufferSize, 3);

Apparently this setup function is deprecated, but I can't find any example or documentation on how to properly use ofSoundStreamSettings. An example selecting a specific audio device would be useful.

Multiple compilation errors in ofSoundPlayerExtended.cpp on linux

I'm getting a few errors when attempting to compile this for the first time. (This is after removing the '-Werror=return-type' compiler flag because that was catching errors in this addon too.) This is a fresh clone of ofxAudioAnalyzer and openFrameworks. I'm trying to compile an empty project that has this and a few other addons included before I start developing in the new project.

First error seems to be a prototype error:

/home/trent/documents/github/openFrameworks/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp:165:6: error: prototype for ‘bool ofSoundPlayerExtended::mpg123ReadFile(std::__cxx11::string, std::vector<short int>&, std::vector<float>&)’ does not match any in class ‘ofSoundPlayerExtended’
 bool ofSoundPlayerExtended::mpg123ReadFile(string path,vector<short> & buffer,vector<float> & fftAuxBuffer){
      ^~~~~~~~~~~~~~~~~~~~~
In file included from /home/trent/documents/github/openFrameworks/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp:2:0:
/home/trent/documents/github/openFrameworks/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.h:99:10: error: candidate is: bool ofSoundPlayerExtended::mpg123ReadFile(const boost::filesystem::path&, std::vector<short int>&, std::vector<float>&)
     bool mpg123ReadFile(const std::filesystem::path& path,std::vector<short> & buffer,std::vector<float> & fftAuxBuffer);
          ^~~~~~~~~~~~~~

The second is that ‘getMpg123EncodingString’ was not declared:

/home/trent/documents/github/openFrameworks/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp: In member function ‘bool ofSoundPlayerExtended::mpg123Stream(const boost::filesystem::path&, std::vector<short int>&, std::vector<float>&)’:
/home/trent/documents/github/openFrameworks/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp:311:74: error: ‘getMpg123EncodingString’ was not declared in this scope
             ofLogError("ofSoundPlayerExtended") << "mpg123Stream(): " << getMpg123EncodingString(stream_encoding)
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
/home/trent/documents/github/openFrameworks/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp:311:74: note: suggested alternative: ‘mpg123_copy_string’
             ofLogError("ofSoundPlayerExtended") << "mpg123Stream(): " << getMpg123EncodingString(stream_encoding)
                                                                          ^~~~~~~~~~~~~~~~~~~~~~~
                                                                          mpg123_copy_string

Operating System: Ubuntu 18.04.1 LTS
I'm just using openFrameworks and ofxAudioAnalysis from master.

example-rmsInput does not build on macOS

I'm using macOS 10.14, openFrameworks 10.1, and Xcode 10.3. Getting the following error:

/Users/miller/Projects/of_v0.10.1_osx_release/addons/ofxAudioAnalyzer/src/ofSoundPlayerExtended.cpp:17:10: 'ofxAudioDecoder.h' file not found

Examples crashing on runtime

I'm getting this error on every example, any idea why?
Thread 1: EXC_ARITHMETIC (code=EXC_I386_DIV, subcode=0x0)
screenshot 2018-11-15 at 19 21 30

audioIn crashing when exiting app

Hi!

My app is sometimes crashing when exiting the application in the com.apple.audio.IOThread.client;
Apparently the rtStreamPtr pointer is already null;

-> rtStreamPtr->soundInputPtr->audioIn(rtStreamPtr->inputBuffer);

Before exiting the app I call the functions:

ofSoundStreamStop();
audioAnalyzer.exit();

But it still crashes every two times. The inconsistency makes me think it can be a multithread issue, but I don't know where else should I call it.

Any thoughts?

Imanol

New examples request

Thanks for your work. Any chance to include examples to illustrate some of the other essentia algorithms such as chord detection or beat detection?

Compiler erros in Release mode

I'm a huge fan of this library. I need some help compiling in Release mode.
The error is also replicated by compiling example-allAlgorithms.
Using Xcode 13.2.1 and OF 0.11.2
In Debug mode all works fine.

The errors:

Showing Recent Messages
Undefined symbol: essentia::nameOfType(std::type_info const&)
Undefined symbol: essentia::debugIndentLevel
Undefined symbol: essentia::loggerInstance
Undefined symbol: essentia::Logger::debug(essentia::DebuggingModule, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool)
Undefined symbol: essentia::Parameter::~Parameter()
Undefined symbol: essentia::EssentiaFactoryessentia::standard::Algorithm::_instance
Undefined symbol: essentia::standard::Algorithm::output(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)
Undefined symbol: essentia::init()
Undefined symbol: essentia::activatedDebugLevels
Undefined symbol: essentia::standard::Algorithm::input(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)
Undefined symbol: essentia::ParameterMap::add(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, essentia::Parameter const&)
Undefined symbol: essentia::standard::Algorithm::processingMode

Any suggestion?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.