Giter Site home page Giter Site logo

redfrik / ofxaudioanalyzer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from leozimmerman/ofxaudioanalyzer

0.0 2.0 0.0 62.37 MB

openFrameworks wrapper for Essentia. Audio analysis algorithms in real-time

License: GNU Affero General Public License v3.0

Makefile 25.29% C++ 60.82% C 4.01% Fortran 9.88%

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

Watchers

 avatar  avatar

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.