diff --git a/src/algorithms/extractor/keyextractor.cpp b/src/algorithms/extractor/keyextractor.cpp index 72de281eb..0ba866dbd 100644 --- a/src/algorithms/extractor/keyextractor.cpp +++ b/src/algorithms/extractor/keyextractor.cpp @@ -26,9 +26,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* KeyExtractor::name = "KeyExtractor"; -const char* KeyExtractor::category = "Tonal"; -const char* KeyExtractor::description = DOC("This algorithm extracts key/scale for an audio signal"); +const char* KeyExtractor::name = essentia::standard::KeyExtractor::name; +const char* KeyExtractor::category = essentia::standard::KeyExtractor::category; +const char* KeyExtractor::description = essentia::standard::KeyExtractor::description; + KeyExtractor::KeyExtractor(): _frameCutter(0), _windowing(0), _spectrum(0), _spectralPeaks(0), _hpcpKey(0), _key(0) { @@ -106,9 +107,10 @@ KeyExtractor::~KeyExtractor() { namespace essentia { namespace standard { -const char* KeyExtractor::name = essentia::streaming::KeyExtractor::name; -const char* KeyExtractor::category = essentia::streaming::KeyExtractor::category; -const char* KeyExtractor::description = essentia::streaming::KeyExtractor::description; +const char* KeyExtractor::name = "KeyExtractor"; +const char* KeyExtractor::category = "Tonal"; +const char* KeyExtractor::description = DOC("This algorithm extracts key/scale for an audio signal"); + KeyExtractor::KeyExtractor() { declareInput(_audio, "audio", "the audio input signal"); diff --git a/src/algorithms/extractor/levelextractor.cpp b/src/algorithms/extractor/levelextractor.cpp index 2895a29e1..00f1ee685 100644 --- a/src/algorithms/extractor/levelextractor.cpp +++ b/src/algorithms/extractor/levelextractor.cpp @@ -26,10 +26,10 @@ using namespace std; namespace essentia { namespace streaming { +const char* LevelExtractor::name = essentia::standard::LevelExtractor::name; +const char* LevelExtractor::category = essentia::standard::LevelExtractor::category; +const char* LevelExtractor::description = essentia::standard::LevelExtractor::description; -const char* LevelExtractor::name = "LevelExtractor"; -const char* LevelExtractor::category = "Loudness/dynamics"; -const char* LevelExtractor::description = DOC("This algorithm extracts the loudness of an audio signal in frames using Loudness algorithm."); LevelExtractor::LevelExtractor() { @@ -66,9 +66,10 @@ LevelExtractor::~LevelExtractor() { namespace essentia { namespace standard { -const char* LevelExtractor::name = essentia::streaming::LevelExtractor::name; -const char* LevelExtractor::category = essentia::streaming::LevelExtractor::category; -const char* LevelExtractor::description = essentia::streaming::LevelExtractor::description; +const char* LevelExtractor::name = "LevelExtractor"; +const char* LevelExtractor::category = "Loudness/dynamics"; +const char* LevelExtractor::description = DOC("This algorithm extracts the loudness of an audio signal in frames using Loudness algorithm."); + LevelExtractor::LevelExtractor() { declareInput(_signal, "signal", "the audio input signal"); diff --git a/src/algorithms/extractor/lowlevelspectraleqloudextractor.cpp b/src/algorithms/extractor/lowlevelspectraleqloudextractor.cpp index 3b01a428c..f514b623d 100644 --- a/src/algorithms/extractor/lowlevelspectraleqloudextractor.cpp +++ b/src/algorithms/extractor/lowlevelspectraleqloudextractor.cpp @@ -26,11 +26,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* LowLevelSpectralEqloudExtractor::name = "LowLevelSpectralEqloudExtractor"; -const char* LowLevelSpectralEqloudExtractor::category = "Extractors"; -const char* LowLevelSpectralEqloudExtractor::description = DOC("This algorithm extracts a set of level spectral features for which it is recommended to apply a preliminary equal-loudness filter over an input audio signal (according to the internal evaluations conducted at Music Technology Group). To this end, you are expected to provide the output of EqualLoudness algorithm as an input for this algorithm. Still, you are free to provide an unprocessed audio input in the case you want to compute these features without equal-loudness filter.\n" -"\n" -"Note that at present we do not dispose any reference to justify the necessity of equal-loudness filter. Our recommendation is grounded on internal evaluations conducted at Music Technology Group that have shown the increase in numeric robustness as a function of the audio encoders used (mp3, ogg, ...) for these features."); +const char* LowLevelSpectralEqloudExtractor::name = essentia::standard::LowLevelSpectralEqloudExtractor::name; +const char* LowLevelSpectralEqloudExtractor::category = essentia::standard::LowLevelSpectralEqloudExtractor::category; +const char* LowLevelSpectralEqloudExtractor::description = essentia::standard::LowLevelSpectralEqloudExtractor::description; + LowLevelSpectralEqloudExtractor::LowLevelSpectralEqloudExtractor() : _configured(false) { @@ -119,9 +118,12 @@ LowLevelSpectralEqloudExtractor::~LowLevelSpectralEqloudExtractor() { namespace essentia { namespace standard { -const char* LowLevelSpectralEqloudExtractor::name = essentia::streaming::LowLevelSpectralEqloudExtractor::name; -const char* LowLevelSpectralEqloudExtractor::category = essentia::streaming::LowLevelSpectralEqloudExtractor::category; -const char* LowLevelSpectralEqloudExtractor::description = essentia::streaming::LowLevelSpectralEqloudExtractor::description; +const char* LowLevelSpectralEqloudExtractor::name = "LowLevelSpectralEqloudExtractor"; +const char* LowLevelSpectralEqloudExtractor::category = "Extractors"; +const char* LowLevelSpectralEqloudExtractor::description = DOC("This algorithm extracts a set of level spectral features for which it is recommended to apply a preliminary equal-loudness filter over an input audio signal (according to the internal evaluations conducted at Music Technology Group). To this end, you are expected to provide the output of EqualLoudness algorithm as an input for this algorithm. Still, you are free to provide an unprocessed audio input in the case you want to compute these features without equal-loudness filter.\n" +"\n" +"Note that at present we do not dispose any reference to justify the necessity of equal-loudness filter. Our recommendation is grounded on internal evaluations conducted at Music Technology Group that have shown the increase in numeric robustness as a function of the audio encoders used (mp3, ogg, ...) for these features."); + LowLevelSpectralEqloudExtractor::LowLevelSpectralEqloudExtractor() { declareInput(_signal, "signal", "the input audio signal"); diff --git a/src/algorithms/extractor/lowlevelspectralextractor.cpp b/src/algorithms/extractor/lowlevelspectralextractor.cpp index 73ef22de3..7c8b91e88 100644 --- a/src/algorithms/extractor/lowlevelspectralextractor.cpp +++ b/src/algorithms/extractor/lowlevelspectralextractor.cpp @@ -27,9 +27,10 @@ using namespace std; using namespace essentia; using namespace essentia::streaming; -const char* LowLevelSpectralExtractor::name = "LowLevelSpectralExtractor"; -const char* LowLevelSpectralExtractor::category = "Extractors"; -const char* LowLevelSpectralExtractor::description = DOC("This algorithm extracts all low-level spectral features, which do not require an equal-loudness filter for their computation, from an audio signal"); +const char* LowLevelSpectralExtractor::name = essentia::standard::LowLevelSpectralExtractor::name; +const char* LowLevelSpectralExtractor::category = essentia::standard::LowLevelSpectralExtractor::category; +const char* LowLevelSpectralExtractor::description = essentia::standard::LowLevelSpectralExtractor::description; + LowLevelSpectralExtractor::LowLevelSpectralExtractor() : _configured(false) { @@ -242,9 +243,10 @@ void LowLevelSpectralExtractor::clearAlgos() { namespace essentia { namespace standard { -const char* LowLevelSpectralExtractor::name = essentia::streaming::LowLevelSpectralExtractor::name; -const char* LowLevelSpectralExtractor::category = essentia::streaming::LowLevelSpectralExtractor::category; -const char* LowLevelSpectralExtractor::description = essentia::streaming::LowLevelSpectralExtractor::description; +const char* LowLevelSpectralExtractor::name = "LowLevelSpectralExtractor"; +const char* LowLevelSpectralExtractor::category = "Extractors"; +const char* LowLevelSpectralExtractor::description = DOC("This algorithm extracts all low-level spectral features, which do not require an equal-loudness filter for their computation, from an audio signal"); + LowLevelSpectralExtractor::LowLevelSpectralExtractor() { declareInput(_signal, "signal", "the audio input signal"); diff --git a/src/algorithms/extractor/rhythmdescriptors.cpp b/src/algorithms/extractor/rhythmdescriptors.cpp index ff8898c4d..ac8427c2e 100644 --- a/src/algorithms/extractor/rhythmdescriptors.cpp +++ b/src/algorithms/extractor/rhythmdescriptors.cpp @@ -27,9 +27,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* RhythmDescriptors::name = "RhythmDescriptors"; -const char* RhythmDescriptors::category = "Rhythm"; -const char* RhythmDescriptors::description = DOC("This algorithm computes rhythm features (bpm, beat positions, beat histogram peaks) for an audio signal. It combines RhythmExtractor2013 for beat tracking and BPM estimation with BpmHistogramDescriptors algorithms."); +const char* RhythmDescriptors::name = essentia::standard::RhythmDescriptors::name; +const char* RhythmDescriptors::category = essentia::standard::RhythmDescriptors::category; +const char* RhythmDescriptors::description = essentia::standard::RhythmDescriptors::description; RhythmDescriptors::RhythmDescriptors() { @@ -137,9 +137,10 @@ void RhythmDescriptors::reset() { namespace essentia { namespace standard { -const char* RhythmDescriptors::name = essentia::streaming::RhythmDescriptors::name; -const char* RhythmDescriptors::category = essentia::streaming::RhythmDescriptors::category; -const char* RhythmDescriptors::description = essentia::streaming::RhythmDescriptors::description; +const char* RhythmDescriptors::name = "RhythmDescriptors"; +const char* RhythmDescriptors::category = "Rhythm"; +const char* RhythmDescriptors::description = DOC("This algorithm computes rhythm features (bpm, beat positions, beat histogram peaks) for an audio signal. It combines RhythmExtractor2013 for beat tracking and BPM estimation with BpmHistogramDescriptors algorithms."); + RhythmDescriptors::RhythmDescriptors() { declareInput(_signal, "signal", "the audio input signal"); diff --git a/src/algorithms/extractor/tonalextractor.cpp b/src/algorithms/extractor/tonalextractor.cpp index ebb9f74cf..2c714c5bf 100644 --- a/src/algorithms/extractor/tonalextractor.cpp +++ b/src/algorithms/extractor/tonalextractor.cpp @@ -26,9 +26,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* TonalExtractor::name = "TonalExtractor"; -const char* TonalExtractor::category = "Tonal"; -const char* TonalExtractor::description = DOC("This algorithm computes tonal features for an audio signal"); +const char* TonalExtractor::name = essentia::standard::TonalExtractor::name; +const char* TonalExtractor::category = essentia::standard::TonalExtractor::category; +const char* TonalExtractor::description = essentia::standard::TonalExtractor::description; + TonalExtractor::TonalExtractor(): _frameCutter(0), _windowing(0), _spectrum(0), _spectralPeaks(0), _hpcpKey(0), _hpcpChord(0), _hpcpTuning(0), _key(0), @@ -160,9 +161,10 @@ TonalExtractor::~TonalExtractor() { namespace essentia { namespace standard { -const char* TonalExtractor::name = essentia::streaming::TonalExtractor::name; -const char* TonalExtractor::category = essentia::streaming::TonalExtractor::category; -const char* TonalExtractor::description = essentia::streaming::TonalExtractor::description; +const char* TonalExtractor::name = "TonalExtractor"; +const char* TonalExtractor::category = "Tonal"; +const char* TonalExtractor::description = DOC("This algorithm computes tonal features for an audio signal"); + TonalExtractor::TonalExtractor() { declareInput(_signal, "signal", "the audio input signal"); diff --git a/src/algorithms/extractor/tuningfrequencyextractor.cpp b/src/algorithms/extractor/tuningfrequencyextractor.cpp index 8aa2fd5af..249652e66 100644 --- a/src/algorithms/extractor/tuningfrequencyextractor.cpp +++ b/src/algorithms/extractor/tuningfrequencyextractor.cpp @@ -26,9 +26,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* TuningFrequencyExtractor::name = "TuningFrequencyExtractor"; -const char* TuningFrequencyExtractor::category = "Tonal"; -const char* TuningFrequencyExtractor::description = DOC("This algorithm extracts the tuning frequency of an audio signal"); +const char* TuningFrequencyExtractor::name = essentia::standard::TuningFrequencyExtractor::name; +const char* TuningFrequencyExtractor::category = essentia::standard::TuningFrequencyExtractor::category; +const char* TuningFrequencyExtractor::description = essentia::standard::TuningFrequencyExtractor::description; + TuningFrequencyExtractor::TuningFrequencyExtractor(): _frameCutter(0), _spectralPeaks(0), _spectrum(0), _tuningFrequency(0), _windowing(0) { createInnerNetwork(); @@ -87,9 +88,10 @@ TuningFrequencyExtractor::~TuningFrequencyExtractor() { namespace essentia { namespace standard { -const char* TuningFrequencyExtractor::name = essentia::streaming::TuningFrequencyExtractor::name; -const char* TuningFrequencyExtractor::category = essentia::streaming::TuningFrequencyExtractor::category; -const char* TuningFrequencyExtractor::description = essentia::streaming::TuningFrequencyExtractor::description; +const char* TuningFrequencyExtractor::name = "TuningFrequencyExtractor"; +const char* TuningFrequencyExtractor::category = "Tonal"; +const char* TuningFrequencyExtractor::description = DOC("This algorithm extracts the tuning frequency of an audio signal"); + TuningFrequencyExtractor::TuningFrequencyExtractor() { declareInput(_signal, "signal", "the audio input signal"); diff --git a/src/algorithms/io/audioloader.cpp b/src/algorithms/io/audioloader.cpp index 071c2d065..7d3e94d27 100644 --- a/src/algorithms/io/audioloader.cpp +++ b/src/algorithms/io/audioloader.cpp @@ -26,24 +26,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* AudioLoader::name = "AudioLoader"; -const char* AudioLoader::category = "Input/output"; -const char* AudioLoader::description = DOC("This algorithm loads the single audio stream contained in a given audio or video file. Supported formats are all those supported by the ffmpeg library including wav, aiff, flac, ogg and mp3.\n" -"\n" -"This algorithm will throw an exception if it was not properly configured which is normally due to not specifying a valid filename. Invalid names comprise those with extensions different than the supported formats and non existent files. If using this algorithm on Windows, you must ensure that the filename is encoded as UTF-8\n\n" -"Note: ogg files are decoded in reverse phase, due to be using ffmpeg library.\n" -"\n" -"References:\n" -" [1] WAV - Wikipedia, the free encyclopedia,\n" -" http://en.wikipedia.org/wiki/Wav\n" -" [2] Audio Interchange File Format - Wikipedia, the free encyclopedia,\n" -" http://en.wikipedia.org/wiki/Aiff\n" -" [3] Free Lossless Audio Codec - Wikipedia, the free encyclopedia,\n" -" http://en.wikipedia.org/wiki/Flac\n" -" [4] Vorbis - Wikipedia, the free encyclopedia,\n" -" http://en.wikipedia.org/wiki/Vorbis\n" -" [5] MP3 - Wikipedia, the free encyclopedia,\n" -" http://en.wikipedia.org/wiki/Mp3"); +const char* AudioLoader::name = essentia::standard::AudioLoader::name; +const char* AudioLoader::category = essentia::standard::AudioLoader::category; +const char* AudioLoader::description = essentia::standard::AudioLoader::description; AudioLoader::~AudioLoader() { @@ -502,9 +487,24 @@ void AudioLoader::reset() { namespace essentia { namespace standard { -const char* AudioLoader::name = essentia::streaming::AudioLoader::name; -const char* AudioLoader::category = essentia::streaming::AudioLoader::category; -const char* AudioLoader::description = essentia::streaming::AudioLoader::description; +const char* AudioLoader::name = "AudioLoader"; +const char* AudioLoader::category = "Input/output"; +const char* AudioLoader::description = DOC("This algorithm loads the single audio stream contained in a given audio or video file. Supported formats are all those supported by the ffmpeg library including wav, aiff, flac, ogg and mp3.\n" +"\n" +"This algorithm will throw an exception if it was not properly configured which is normally due to not specifying a valid filename. Invalid names comprise those with extensions different than the supported formats and non existent files. If using this algorithm on Windows, you must ensure that the filename is encoded as UTF-8\n\n" +"Note: ogg files are decoded in reverse phase, due to be using ffmpeg library.\n" +"\n" +"References:\n" +" [1] WAV - Wikipedia, the free encyclopedia,\n" +" http://en.wikipedia.org/wiki/Wav\n" +" [2] Audio Interchange File Format - Wikipedia, the free encyclopedia,\n" +" http://en.wikipedia.org/wiki/Aiff\n" +" [3] Free Lossless Audio Codec - Wikipedia, the free encyclopedia,\n" +" http://en.wikipedia.org/wiki/Flac\n" +" [4] Vorbis - Wikipedia, the free encyclopedia,\n" +" http://en.wikipedia.org/wiki/Vorbis\n" +" [5] MP3 - Wikipedia, the free encyclopedia,\n" +" http://en.wikipedia.org/wiki/Mp3"); void AudioLoader::createInnerNetwork() { diff --git a/src/algorithms/io/audiowriter.cpp b/src/algorithms/io/audiowriter.cpp index 613cc5692..f4ec49f30 100644 --- a/src/algorithms/io/audiowriter.cpp +++ b/src/algorithms/io/audiowriter.cpp @@ -29,11 +29,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* AudioWriter::name = "AudioWriter"; -const char* AudioWriter::category = "Input/output"; -const char* AudioWriter::description = DOC("This algorithm encodes an input signal into a stereo audio file.\n\n" -"Supported formats are wav, aiff, mp3, flac and ogg.\n\n" -"An exception is thrown when other extensions are given. Note that to encode in mp3 format it is mandatory that ffmpeg was configured with mp3 enabled."); +const char* AudioWriter::name = essentia::standard::AudioWriter::name; +const char* AudioWriter::category = essentia::standard::AudioWriter::category; +const char* AudioWriter::description = essentia::standard::AudioWriter::description; void AudioWriter::configure() { @@ -119,9 +117,12 @@ void AudioWriter::reset() { namespace essentia { namespace standard { -const char* AudioWriter::name = essentia::streaming::AudioWriter::name; -const char* AudioWriter::category = essentia::streaming::AudioWriter::category; -const char* AudioWriter::description = essentia::streaming::AudioWriter::description; +const char* AudioWriter::name = "AudioWriter"; +const char* AudioWriter::category = "Input/output"; +const char* AudioWriter::description = DOC("This algorithm encodes an input signal into a stereo audio file.\n\n" +"Supported formats are wav, aiff, mp3, flac and ogg.\n\n" +"An exception is thrown when other extensions are given. Note that to encode in mp3 format it is mandatory that ffmpeg was configured with mp3 enabled."); + void AudioWriter::createInnerNetwork() { _writer = streaming::AlgorithmFactory::create("AudioWriter"); diff --git a/src/algorithms/io/easyloader.cpp b/src/algorithms/io/easyloader.cpp index 1a756df5c..c05589fe3 100644 --- a/src/algorithms/io/easyloader.cpp +++ b/src/algorithms/io/easyloader.cpp @@ -26,15 +26,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* EasyLoader::name = "EasyLoader"; -const char* EasyLoader::category = "Input/output"; -const char* EasyLoader::description = DOC("This algorithm loads the raw audio data from an audio file, downmixes it to mono and normalizes using replayGain. The audio is resampled in case the given sampling rate does not match the sampling rate of the input signal and is normalized by the given replayGain value.\n" -"\n" -"This algorithm uses MonoLoader and therefore inherits all of its input requirements and exceptions.\n" -"\n" -"References:\n" -" [1] Replay Gain - A Proposed Standard,\n" -" http://replaygain.hydrogenaudio.org"); +const char* EasyLoader::name = essentia::standard::EasyLoader::name; +const char* EasyLoader::category = essentia::standard::EasyLoader::category; +const char* EasyLoader::description = essentia::standard::EasyLoader::description; EasyLoader::EasyLoader() : AlgorithmComposite(), @@ -88,9 +82,16 @@ void EasyLoader::configure() { namespace essentia { namespace standard { -const char* EasyLoader::name = essentia::streaming::EasyLoader::name; -const char* EasyLoader::category = essentia::streaming::EasyLoader::category; -const char* EasyLoader::description = essentia::streaming::EasyLoader::description; +const char* EasyLoader::name = "EasyLoader"; +const char* EasyLoader::category = "Input/output"; +const char* EasyLoader::description = DOC("This algorithm loads the raw audio data from an audio file, downmixes it to mono and normalizes using replayGain. The audio is resampled in case the given sampling rate does not match the sampling rate of the input signal and is normalized by the given replayGain value.\n" +"\n" +"This algorithm uses MonoLoader and therefore inherits all of its input requirements and exceptions.\n" +"\n" +"References:\n" +" [1] Replay Gain - A Proposed Standard,\n" +" http://replaygain.hydrogenaudio.org"); + void EasyLoader::createInnerNetwork() { _loader = streaming::AlgorithmFactory::create("EasyLoader"); diff --git a/src/algorithms/io/eqloudloader.cpp b/src/algorithms/io/eqloudloader.cpp index eb408b1a7..7c07674bb 100644 --- a/src/algorithms/io/eqloudloader.cpp +++ b/src/algorithms/io/eqloudloader.cpp @@ -27,17 +27,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* EqloudLoader::name = "EqloudLoader"; -const char* EqloudLoader::category = "Input/output"; -const char* EqloudLoader::description = DOC("This algorithm loads the raw audio data from an audio file, downmixes it to mono and normalizes using replayGain and equal-loudness filter. Audio is resampled in case the given sampling rate does not match the sampling rate of the input signal and normalized by the given replayGain gain. In addition, audio data is filtered through an equal-loudness filter.\n" -"\n" -"This algorithm uses MonoLoader and thus inherits all of its input requirements and exceptions.\n" -"\n" -"References:\n" -" [1] Replay Gain - A Proposed Standard,\n" -" http://replaygain.hydrogenaudio.org\n" -" [2] Replay Gain - Equal Loudness Filter,\n" -" http://replaygain.hydrogenaudio.org/proposal/equal_loudness.html"); +const char* EqloudLoader::name = essentia::standard::EqloudLoader::name; +const char* EqloudLoader::category = essentia::standard::EqloudLoader::category; +const char* EqloudLoader::description = essentia::standard::EqloudLoader::description; + EqloudLoader::EqloudLoader() : AlgorithmComposite(), _monoLoader(0), _trimmer(0), _scale(0), _eqloud(0) { @@ -84,9 +77,17 @@ void EqloudLoader::configure() { namespace essentia { namespace standard { -const char* EqloudLoader::name = essentia::streaming::EqloudLoader::name; -const char* EqloudLoader::category = essentia::streaming::EqloudLoader::category; -const char* EqloudLoader::description = essentia::streaming::EqloudLoader::description; +const char* EqloudLoader::name = "EqloudLoader"; +const char* EqloudLoader::category = "Input/output"; +const char* EqloudLoader::description = DOC("This algorithm loads the raw audio data from an audio file, downmixes it to mono and normalizes using replayGain and equal-loudness filter. Audio is resampled in case the given sampling rate does not match the sampling rate of the input signal and normalized by the given replayGain gain. In addition, audio data is filtered through an equal-loudness filter.\n" +"\n" +"This algorithm uses MonoLoader and thus inherits all of its input requirements and exceptions.\n" +"\n" +"References:\n" +" [1] Replay Gain - A Proposed Standard,\n" +" http://replaygain.hydrogenaudio.org\n" +" [2] Replay Gain - Equal Loudness Filter,\n" +" http://replaygain.hydrogenaudio.org/proposal/equal_loudness.html"); void EqloudLoader::createInnerNetwork() { diff --git a/src/algorithms/io/monoloader.cpp b/src/algorithms/io/monoloader.cpp index 1c7abce7e..9ae9fad93 100644 --- a/src/algorithms/io/monoloader.cpp +++ b/src/algorithms/io/monoloader.cpp @@ -25,11 +25,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* MonoLoader::name = "MonoLoader"; -const char* MonoLoader::category = "Input/output"; -const char* MonoLoader::description = DOC("This algorithm loads the raw audio data from an audio file and downmixes it to mono. Audio is resampled in case the given sampling rate does not match the sampling rate of the input signal.\n" -"\n" -"This algorithm uses AudioLoader and thus inherits all of its input requirements and exceptions."); +const char* MonoLoader::name = essentia::standard::MonoLoader::name; +const char* MonoLoader::category = essentia::standard::MonoLoader::category; +const char* MonoLoader::description = essentia::standard::MonoLoader::description; MonoLoader::MonoLoader() : AlgorithmComposite(), @@ -86,9 +84,11 @@ void MonoLoader::configure() { namespace essentia { namespace standard { -const char* MonoLoader::name = essentia::streaming::MonoLoader::name; -const char* MonoLoader::category = essentia::streaming::MonoLoader::category; -const char* MonoLoader::description = essentia::streaming::MonoLoader::description; +const char* MonoLoader::name = "MonoLoader"; +const char* MonoLoader::category = "Input/output"; +const char* MonoLoader::description = DOC("This algorithm loads the raw audio data from an audio file and downmixes it to mono. Audio is resampled in case the given sampling rate does not match the sampling rate of the input signal.\n" +"\n" +"This algorithm uses AudioLoader and thus inherits all of its input requirements and exceptions."); void MonoLoader::createInnerNetwork() { diff --git a/src/algorithms/io/monowriter.cpp b/src/algorithms/io/monowriter.cpp index 774bae49c..e1639051b 100644 --- a/src/algorithms/io/monowriter.cpp +++ b/src/algorithms/io/monowriter.cpp @@ -24,13 +24,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* MonoWriter::name = "MonoWriter"; -const char* MonoWriter::category = "Input/output"; -const char* MonoWriter::description = DOC("This algorithm writes a mono audio stream to a file.\n\n" - -"Supported formats are wav, aiff, mp3, flac and ogg. An exception is thrown when other extensions are given. Note that to encode in mp3 format it is mandatory that ffmpeg was configured with mp3 enabled.\n\n" - -"If the file specified by filename could not be opened or the header of the file omits channel's information, an exception is thrown."); +const char* MonoWriter::name = essentia::standard::MonoWriter::name; +const char* MonoWriter::category = essentia::standard::MonoWriter::category; +const char* MonoWriter::description = essentia::standard::MonoWriter::description; void MonoWriter::reset() { @@ -118,9 +114,14 @@ AlgorithmStatus MonoWriter::process() { namespace essentia { namespace standard { -const char* MonoWriter::name = essentia::streaming::MonoWriter::name; -const char* MonoWriter::category = essentia::streaming::MonoWriter::category; -const char* MonoWriter::description = essentia::streaming::MonoWriter::description; +const char* MonoWriter::name = "MonoWriter"; +const char* MonoWriter::category = "Input/output"; +const char* MonoWriter::description = DOC("This algorithm writes a mono audio stream to a file.\n\n" + +"Supported formats are wav, aiff, mp3, flac and ogg. An exception is thrown when other extensions are given. Note that to encode in mp3 format it is mandatory that ffmpeg was configured with mp3 enabled.\n\n" + +"If the file specified by filename could not be opened or the header of the file omits channel's information, an exception is thrown."); + void MonoWriter::createInnerNetwork() { _writer = streaming::AlgorithmFactory::create("MonoWriter"); diff --git a/src/algorithms/rhythm/beatsloudness.cpp b/src/algorithms/rhythm/beatsloudness.cpp index 51a0b8d64..f7cf7d04d 100644 --- a/src/algorithms/rhythm/beatsloudness.cpp +++ b/src/algorithms/rhythm/beatsloudness.cpp @@ -22,15 +22,12 @@ using namespace std; - namespace essentia { namespace streaming { -const char* BeatsLoudness::name = "BeatsLoudness"; -const char* BeatsLoudness::category = "Rhythm"; -const char* BeatsLoudness::description = DOC("This algorithm computes the spectrum energy of beats in an audio signal given their positions. The energy is computed both on the whole frequency range and for each of the specified frequency bands. See the SingleBeatLoudness algorithm for a more detailed explanation.\n" -"\n" -"Note that the algorithm will output empty results in the case if no beats are specified in the \"beats\" parameter."); +const char* BeatsLoudness::name = essentia::standard::BeatsLoudness::name; +const char* BeatsLoudness::category = essentia::standard::BeatsLoudness::category; +const char* BeatsLoudness::description = essentia::standard::BeatsLoudness::description; BeatsLoudness::BeatsLoudness() { @@ -98,9 +95,12 @@ void BeatsLoudness::configure() { namespace essentia { namespace standard { -const char* BeatsLoudness::name = essentia::streaming::BeatsLoudness::name; -const char* BeatsLoudness::category = essentia::streaming::BeatsLoudness::category; -const char* BeatsLoudness::description = essentia::streaming::BeatsLoudness::description; +const char* BeatsLoudness::name = "BeatsLoudness"; +const char* BeatsLoudness::category = "Rhythm"; +const char* BeatsLoudness::description = DOC("This algorithm computes the spectrum energy of beats in an audio signal given their positions. The energy is computed both on the whole frequency range and for each of the specified frequency bands. See the SingleBeatLoudness algorithm for a more detailed explanation.\n" +"\n" +"Note that the algorithm will output empty results in the case if no beats are specified in the \"beats\" parameter."); + void BeatsLoudness::createInnerNetwork() { _beatLoud = streaming::AlgorithmFactory::create("BeatsLoudness"); diff --git a/src/algorithms/rhythm/beattrackerdegara.cpp b/src/algorithms/rhythm/beattrackerdegara.cpp index 8cf561151..e5f9c0c50 100644 --- a/src/algorithms/rhythm/beattrackerdegara.cpp +++ b/src/algorithms/rhythm/beattrackerdegara.cpp @@ -26,27 +26,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* BeatTrackerDegara::name = "BeatTrackerDegara"; -const char* BeatTrackerDegara::category = "Rhythm"; -const char* BeatTrackerDegara::description = DOC("This algorithm estimates the beat positions given an input signal. It computes 'complex spectral difference' onset detection function and utilizes the beat tracking algorithm (TempoTapDegara) to extract beats [1]. The algorithm works with the optimized settings of 2048/1024 frame/hop size for the computation of the detection function, with its posterior x2 resampling.) While it has a lower accuracy than BeatTrackerMultifeature (see the evaluation results in [2]), its computational speed is significantly higher, which makes reasonable to apply this algorithm for batch processings of large amounts of audio signals.\n" -"\n" -"Note that the algorithm requires the audio input with the 44100 Hz sampling rate in order to function correctly.\n" -"\n" -"References:\n" -" [1] N. Degara, E. A. Rua, A. Pena, S. Torres-Guijarro, M. E. Davies, and\n" -" M. D. Plumbley, \"Reliability-informed beat tracking of musical signals,\"\n" -" IEEE Transactions on Audio, Speech, and Language Processing, vol. 20,\n" -" no. 1, pp. 290–301, 2012.\n\n" -" [2] J.R. Zapata, M.E.P. Davies and E. Gómez, \"Multi-feature beat tracking,\"\n" -" IEEE Transactions on Audio, Speech, and Language Processing, vol. 22,\n" -" no. 4, pp. 816-825, 2014."); - -// TODO updated ref [2] when the article gets published - -// evaluation results on a large collection of tracks [2] for essentia implementations (DBogdanov): -// *Degara: 65.4407 55.3735 45.6554 66.5149 45.6192 49.9258 69.5233 77.7232 2.2475 68.0827 -- fast -// *MultiFeature: 65.8871 53.9884 47.2754 66.4396 46.3123 50.8143 72.0530 80.5138 2.3865 67.5627 -- very slow -// RhythmExtractor: 49.6150 40.3908 21.4286 55.7790 29.8988 37.5160 41.1232 51.7029 1.5479 48.3133 -- slow +const char* BeatTrackerDegara::name = essentia::standard::BeatTrackerDegara::name; +const char* BeatTrackerDegara::category = essentia::standard::BeatTrackerDegara::category; +const char* BeatTrackerDegara::description = essentia::standard::BeatTrackerDegara::description; BeatTrackerDegara::BeatTrackerDegara() : AlgorithmComposite(), @@ -140,9 +122,27 @@ void BeatTrackerDegara::reset() { namespace essentia { namespace standard { -const char* BeatTrackerDegara::name = essentia::streaming::BeatTrackerDegara::name; -const char* BeatTrackerDegara::category = essentia::streaming::BeatTrackerDegara::category; -const char* BeatTrackerDegara::description = essentia::streaming::BeatTrackerDegara::description; +const char* BeatTrackerDegara::name = "BeatTrackerDegara"; +const char* BeatTrackerDegara::category = "Rhythm"; +const char* BeatTrackerDegara::description = DOC("This algorithm estimates the beat positions given an input signal. It computes 'complex spectral difference' onset detection function and utilizes the beat tracking algorithm (TempoTapDegara) to extract beats [1]. The algorithm works with the optimized settings of 2048/1024 frame/hop size for the computation of the detection function, with its posterior x2 resampling.) While it has a lower accuracy than BeatTrackerMultifeature (see the evaluation results in [2]), its computational speed is significantly higher, which makes reasonable to apply this algorithm for batch processings of large amounts of audio signals.\n" +"\n" +"Note that the algorithm requires the audio input with the 44100 Hz sampling rate in order to function correctly.\n" +"\n" +"References:\n" +" [1] N. Degara, E. A. Rua, A. Pena, S. Torres-Guijarro, M. E. Davies, and\n" +" M. D. Plumbley, \"Reliability-informed beat tracking of musical signals,\"\n" +" IEEE Transactions on Audio, Speech, and Language Processing, vol. 20,\n" +" no. 1, pp. 290–301, 2012.\n\n" +" [2] J.R. Zapata, M.E.P. Davies and E. Gómez, \"Multi-feature beat tracking,\"\n" +" IEEE Transactions on Audio, Speech, and Language Processing, vol. 22,\n" +" no. 4, pp. 816-825, 2014."); + +// TODO updated ref [2] when the article gets published + +// evaluation results on a large collection of tracks [2] for essentia implementations (DBogdanov): +// *Degara: 65.4407 55.3735 45.6554 66.5149 45.6192 49.9258 69.5233 77.7232 2.2475 68.0827 -- fast +// *MultiFeature: 65.8871 53.9884 47.2754 66.4396 46.3123 50.8143 72.0530 80.5138 2.3865 67.5627 -- very slow +// RhythmExtractor: 49.6150 40.3908 21.4286 55.7790 29.8988 37.5160 41.1232 51.7029 1.5479 48.3133 -- slow BeatTrackerDegara::BeatTrackerDegara() { diff --git a/src/algorithms/rhythm/beattrackermultifeature.cpp b/src/algorithms/rhythm/beattrackermultifeature.cpp index f195d3d3c..5faeb65d8 100644 --- a/src/algorithms/rhythm/beattrackermultifeature.cpp +++ b/src/algorithms/rhythm/beattrackermultifeature.cpp @@ -26,31 +26,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* BeatTrackerMultiFeature::name = "BeatTrackerMultiFeature"; -const char* BeatTrackerMultiFeature::category = "Rhythm"; -const char* BeatTrackerMultiFeature::description = DOC("This algorithm estimates the beat positions given an input signal. It computes a number of onset detection functions and estimates beat location candidates from them using TempoTapDegara algorithm. Thereafter the best candidates are selected using TempoTapMaxAgreement. The employed detection functions, and the optimal frame/hop sizes used for their computation are:\n" -" - complex spectral difference (see 'complex' method in OnsetDetection algorithm, 2048/1024 with posterior x2 upsample or the detection function)\n" -" - energy flux (see 'rms' method in OnsetDetection algorithm, the same settings)\n" -" - spectral flux in Mel-frequency bands (see 'melflux' method in OnsetDetection algorithm, the same settings)\n" -" - beat emphasis function (see 'beat_emphasis' method in OnsetDetectionGlobal algorithm, 2048/512)\n" -" - spectral flux between histogrammed spectrum frames, measured by the modified information gain (see 'infogain' method in OnsetDetectionGlobal algorithm, 2048/512)\n" -"\n" -"You can follow these guidelines [2] to assess the quality of beats estimation based on the computed confidence value:\n" -" - [0, 1) very low confidence, the input signal is hard for the employed candidate beat trackers\n" -" - [1, 1.5] low confidence\n" -" - (1.5, 3.5] good confidence, accuracy around 80% in AMLt measure\n" -" - (3.5, 5.32] excellent confidence\n" -"\n" -"Note that the algorithm requires the audio input with the 44100 Hz sampling rate in order to function correctly.\n" -"\n" -"References:\n" -" [1] J. Zapata, M. Davies and E. Gómez, \"Multi-feature beat tracker,\"\n" -" IEEE/ACM Transactions on Audio, Speech and Language Processing. 22(4),\n" -" 816-825, 2014\n\n" -" [2] J.R. Zapata, A. Holzapfel, M.E.P. Davies, J.L. Oliveira, F. Gouyon,\n" -" \"Assigning a confidence threshold on automatic beat annotation in large\n" -" datasets\", International Society for Music Information Retrieval Conference\n" -" (ISMIR'12), pp. 157-162, 2012\n"); +const char* BeatTrackerMultiFeature::name = essentia::standard::BeatTrackerMultiFeature::name; +const char* BeatTrackerMultiFeature::category = essentia::standard::BeatTrackerMultiFeature::category; +const char* BeatTrackerMultiFeature::description = essentia::standard::BeatTrackerMultiFeature::description; BeatTrackerMultiFeature::BeatTrackerMultiFeature() : AlgorithmComposite(), @@ -276,9 +254,31 @@ void BeatTrackerMultiFeature::reset() { namespace essentia { namespace standard { -const char* BeatTrackerMultiFeature::name = essentia::streaming::BeatTrackerMultiFeature::name; -const char* BeatTrackerMultiFeature::category = essentia::streaming::BeatTrackerMultiFeature::category; -const char* BeatTrackerMultiFeature::description = essentia::streaming::BeatTrackerMultiFeature::description; +const char* BeatTrackerMultiFeature::name = "BeatTrackerMultiFeature"; +const char* BeatTrackerMultiFeature::category = "Rhythm"; +const char* BeatTrackerMultiFeature::description = DOC("This algorithm estimates the beat positions given an input signal. It computes a number of onset detection functions and estimates beat location candidates from them using TempoTapDegara algorithm. Thereafter the best candidates are selected using TempoTapMaxAgreement. The employed detection functions, and the optimal frame/hop sizes used for their computation are:\n" +" - complex spectral difference (see 'complex' method in OnsetDetection algorithm, 2048/1024 with posterior x2 upsample or the detection function)\n" +" - energy flux (see 'rms' method in OnsetDetection algorithm, the same settings)\n" +" - spectral flux in Mel-frequency bands (see 'melflux' method in OnsetDetection algorithm, the same settings)\n" +" - beat emphasis function (see 'beat_emphasis' method in OnsetDetectionGlobal algorithm, 2048/512)\n" +" - spectral flux between histogrammed spectrum frames, measured by the modified information gain (see 'infogain' method in OnsetDetectionGlobal algorithm, 2048/512)\n" +"\n" +"You can follow these guidelines [2] to assess the quality of beats estimation based on the computed confidence value:\n" +" - [0, 1) very low confidence, the input signal is hard for the employed candidate beat trackers\n" +" - [1, 1.5] low confidence\n" +" - (1.5, 3.5] good confidence, accuracy around 80% in AMLt measure\n" +" - (3.5, 5.32] excellent confidence\n" +"\n" +"Note that the algorithm requires the audio input with the 44100 Hz sampling rate in order to function correctly.\n" +"\n" +"References:\n" +" [1] J. Zapata, M. Davies and E. Gómez, \"Multi-feature beat tracker,\"\n" +" IEEE/ACM Transactions on Audio, Speech and Language Processing. 22(4),\n" +" 816-825, 2014\n\n" +" [2] J.R. Zapata, A. Holzapfel, M.E.P. Davies, J.L. Oliveira, F. Gouyon,\n" +" \"Assigning a confidence threshold on automatic beat annotation in large\n" +" datasets\", International Society for Music Information Retrieval Conference\n" +" (ISMIR'12), pp. 157-162, 2012\n"); BeatTrackerMultiFeature::BeatTrackerMultiFeature() { diff --git a/src/algorithms/rhythm/bpmhistogram.cpp b/src/algorithms/rhythm/bpmhistogram.cpp index 13e431940..0b483455b 100644 --- a/src/algorithms/rhythm/bpmhistogram.cpp +++ b/src/algorithms/rhythm/bpmhistogram.cpp @@ -33,31 +33,9 @@ using namespace essentia; namespace essentia { namespace streaming { -const char* BpmHistogram::name = "BpmHistogram"; -const char* BpmHistogram::category = "Rhythm"; -const char* BpmHistogram::description = DOC("This algorithm analyzes predominant periodicities in a signal given its novelty curve [1] (see NoveltyCurve algorithm) or another onset detection function (see OnsetDetection and OnsetDetectionGlobal). It estimates pulse BPM values and time positions together with a half-wave rectified sinusoid whose peaks represent the pulses present in the audio signal and their magnitudes. The analysis is based on the FFT of the input novelty curve from which salient periodicities are detected by thresholding. Temporal evolution of these periodicities is output in the \"tempogram\". Candidate BPMs are then detected based on a histogram of the observed periodicities weighted by their energy in the tempogram. The sinusoidal model is constructed based on the observed periodicities and their magnitudes with the estimated overall BPM as a reference.\n\n" -"The algorithm outputs: \n" -" - bpm: the mean of the most salient BPM values representing periodicities in the signal (the mean BPM).\n" -" - bpmCandidates and bpmMagnitudes: list of the most salient BPM values and their magnitudes (intensity). These two outputs can be helpful for taking an alternative decision on estimation of the overall BPM.\n" -" - tempogram: spectrogram-like representation of the estimated salient periodicities and their intensities over time (per-frame BPM magnitudes). It is useful for detecting tempo variations and visualization of tempo evolution.\n" -" - frameBpms: list of candidate BPM values at each frame. The candidate values are similar to the mean BPM. If no candidates are found to be similar, the mean value itself is used unless \"tempoChange\" seconds have triggered a variation in tempo.\n" -" - ticks: time positions of ticks in seconds.\n" -" - ticksMagnitude: magnitude of each tick. Higher values correspond to higher probability of correctly identified ticks.\n" -" - sinusoid: a sinusoidal model of the ticks' positions. The previous outputs are based on detecting peaks of this half-wave rectified sinusoid. This model can be used to obtain ticks using alternative peak detection algorithms if necessary. Beware that the last few ticks may exceed the length of the audio signal due to overlap factors. Therefore, this output should be always checked against the length of audio signal.\n" -"\n" -"Note:\n" -" - This algorithm is outdated. For beat tracking it is recommended to use RhythmExtractor2013 algorithm found to perform better than NoveltyCurve with BpmHistogram in evaluations.\n" -" - The \"frameRate\" parameter refers to the frame rate at which the novelty curve has been computed. It is equal to the audio sampling rate divided by the hop size at which the signal was processed.\n" -" - Although the algorithm tries to find beats that fit the mean BPM the best, the tempo is not assumed to be constant unless specified in the corresponding parameter. For this reason and if tempo differs too much from frame to frame, there may be phase discontinuities when constructing the sinusoid which can yield to too many ticks. One can recursively run this algorithm on the sinusoid output until the ticks stabilize. At this point it may be useful to infer a specific BPM and set the constant tempo parameter to true.\n" -" - Another useful trick is to run the algorithm one time to get an estimation of the mean BPM and re-run it again with a \"frameSize\" parameter set to a multiple of the mean BPM.\n" -"\n" -"Quality: outdated (use RhythmExtractor2013 instead, still this algorithm might be useful when working with other onset detection functions apart from NoveltyCurve)\n" -"\n" -"References:\n" -" [1] P. Grosche and M. Müller, \"A mid-level representation for capturing\n" -" dominant tempo and pulse information in music recordings,\" in\n" -" International Society for Music Information Retrieval Conference\n" -" (ISMIR’09), 2009, pp. 189–194."); +const char* BpmHistogram::name = essentia::standard::BpmHistogram::name; +const char* BpmHistogram::category = essentia::standard::BpmHistogram::category; +const char* BpmHistogram::description = essentia::standard::BpmHistogram::description; BpmHistogram::BpmHistogram() : _normalize(false), _weightByMagnitude(false) { @@ -598,9 +576,32 @@ AlgorithmStatus BpmHistogram::process() { namespace essentia { namespace standard { -const char* BpmHistogram::name = essentia::streaming::BpmHistogram::name; -const char* BpmHistogram::category = essentia::streaming::BpmHistogram::category; -const char* BpmHistogram::description = essentia::streaming::BpmHistogram::description; +const char* BpmHistogram::name = "BpmHistogram"; +const char* BpmHistogram::category = "Rhythm"; +const char* BpmHistogram::description = DOC("This algorithm analyzes predominant periodicities in a signal given its novelty curve [1] (see NoveltyCurve algorithm) or another onset detection function (see OnsetDetection and OnsetDetectionGlobal). It estimates pulse BPM values and time positions together with a half-wave rectified sinusoid whose peaks represent the pulses present in the audio signal and their magnitudes. The analysis is based on the FFT of the input novelty curve from which salient periodicities are detected by thresholding. Temporal evolution of these periodicities is output in the \"tempogram\". Candidate BPMs are then detected based on a histogram of the observed periodicities weighted by their energy in the tempogram. The sinusoidal model is constructed based on the observed periodicities and their magnitudes with the estimated overall BPM as a reference.\n\n" +"The algorithm outputs: \n" +" - bpm: the mean of the most salient BPM values representing periodicities in the signal (the mean BPM).\n" +" - bpmCandidates and bpmMagnitudes: list of the most salient BPM values and their magnitudes (intensity). These two outputs can be helpful for taking an alternative decision on estimation of the overall BPM.\n" +" - tempogram: spectrogram-like representation of the estimated salient periodicities and their intensities over time (per-frame BPM magnitudes). It is useful for detecting tempo variations and visualization of tempo evolution.\n" +" - frameBpms: list of candidate BPM values at each frame. The candidate values are similar to the mean BPM. If no candidates are found to be similar, the mean value itself is used unless \"tempoChange\" seconds have triggered a variation in tempo.\n" +" - ticks: time positions of ticks in seconds.\n" +" - ticksMagnitude: magnitude of each tick. Higher values correspond to higher probability of correctly identified ticks.\n" +" - sinusoid: a sinusoidal model of the ticks' positions. The previous outputs are based on detecting peaks of this half-wave rectified sinusoid. This model can be used to obtain ticks using alternative peak detection algorithms if necessary. Beware that the last few ticks may exceed the length of the audio signal due to overlap factors. Therefore, this output should be always checked against the length of audio signal.\n" +"\n" +"Note:\n" +" - This algorithm is outdated. For beat tracking it is recommended to use RhythmExtractor2013 algorithm found to perform better than NoveltyCurve with BpmHistogram in evaluations.\n" +" - The \"frameRate\" parameter refers to the frame rate at which the novelty curve has been computed. It is equal to the audio sampling rate divided by the hop size at which the signal was processed.\n" +" - Although the algorithm tries to find beats that fit the mean BPM the best, the tempo is not assumed to be constant unless specified in the corresponding parameter. For this reason and if tempo differs too much from frame to frame, there may be phase discontinuities when constructing the sinusoid which can yield to too many ticks. One can recursively run this algorithm on the sinusoid output until the ticks stabilize. At this point it may be useful to infer a specific BPM and set the constant tempo parameter to true.\n" +" - Another useful trick is to run the algorithm one time to get an estimation of the mean BPM and re-run it again with a \"frameSize\" parameter set to a multiple of the mean BPM.\n" +"\n" +"Quality: outdated (use RhythmExtractor2013 instead, still this algorithm might be useful when working with other onset detection functions apart from NoveltyCurve)\n" +"\n" +"References:\n" +" [1] P. Grosche and M. Müller, \"A mid-level representation for capturing\n" +" dominant tempo and pulse information in music recordings,\" in\n" +" International Society for Music Information Retrieval Conference\n" +" (ISMIR’09), 2009, pp. 189–194."); + BpmHistogram::BpmHistogram() { declareInput(_signal, "novelty", "the novelty curve"); diff --git a/src/algorithms/rhythm/rhythmextractor2013.cpp b/src/algorithms/rhythm/rhythmextractor2013.cpp index c01bbf7ac..d28df7ff2 100644 --- a/src/algorithms/rhythm/rhythmextractor2013.cpp +++ b/src/algorithms/rhythm/rhythmextractor2013.cpp @@ -29,15 +29,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* RhythmExtractor2013::name = "RhythmExtractor2013"; -const char* RhythmExtractor2013::category = "Rhythm"; -const char* RhythmExtractor2013::description = DOC("This algorithm extracts the beat positions and estimates their confidence as well as tempo in bpm for an audio signal. The beat locations can be computed using:\n" -" - 'multifeature', the BeatTrackerMultiFeature algorithm\n" -" - 'degara', the BeatTrackerDegara algorithm (note that there is no confidence estimation for this method, the output confidence value is always 0)\n" -"\n" -"See BeatTrackerMultiFeature and BeatTrackerDegara algorithms for more details.\n" -"\n" -"Note that the algorithm requires the sample rate of the input signal to be 44100 Hz in order to work correctly.\n"); +const char* RhythmExtractor2013::name = essentia::standard::RhythmExtractor2013::name; +const char* RhythmExtractor2013::category = essentia::standard::RhythmExtractor2013::category; +const char* RhythmExtractor2013::description = essentia::standard::RhythmExtractor2013::description; RhythmExtractor2013::RhythmExtractor2013() : AlgorithmComposite() { @@ -205,9 +199,15 @@ void RhythmExtractor2013::reset() { namespace essentia { namespace standard { -const char* RhythmExtractor2013::name = essentia::streaming::RhythmExtractor2013::name; -const char* RhythmExtractor2013::category = essentia::streaming::RhythmExtractor2013::category; -const char* RhythmExtractor2013::description = essentia::streaming::RhythmExtractor2013::description; +const char* RhythmExtractor2013::name = "RhythmExtractor2013"; +const char* RhythmExtractor2013::category = "Rhythm"; +const char* RhythmExtractor2013::description = DOC("This algorithm extracts the beat positions and estimates their confidence as well as tempo in bpm for an audio signal. The beat locations can be computed using:\n" +" - 'multifeature', the BeatTrackerMultiFeature algorithm\n" +" - 'degara', the BeatTrackerDegara algorithm (note that there is no confidence estimation for this method, the output confidence value is always 0)\n" +"\n" +"See BeatTrackerMultiFeature and BeatTrackerDegara algorithms for more details.\n" +"\n" +"Note that the algorithm requires the sample rate of the input signal to be 44100 Hz in order to work correctly.\n"); RhythmExtractor2013::RhythmExtractor2013() { diff --git a/src/algorithms/rhythm/superfluxextractor.cpp b/src/algorithms/rhythm/superfluxextractor.cpp index 3e8ace4b8..5171e1d08 100644 --- a/src/algorithms/rhythm/superfluxextractor.cpp +++ b/src/algorithms/rhythm/superfluxextractor.cpp @@ -27,15 +27,10 @@ using namespace std; using namespace essentia; using namespace essentia::streaming; -const char* SuperFluxExtractor::name = "SuperFluxExtractor"; -const char* SuperFluxExtractor::category = "Rhythm"; -const char* SuperFluxExtractor::description = DOC("This algorithm detects onsets given an audio signal using SuperFlux algorithm. This implementation is based on the available reference implementation in python [2]. The algorithm computes spectrum of the input signal, summarizes it into triangular band energies, and computes a onset detection function based on spectral flux tracking spectral trajectories with a maximum filter (SuperFluxNovelty). The peaks of the function are then detected (SuperFluxPeaks).\n" -"\n" -"References:\n" -" [1] Böck, S. and Widmer, G., Maximum Filter Vibrato Suppression for Onset\n" -" Detection, Proceedings of the 16th International Conference on Digital\n" -" Audio Effects (DAFx-13), 2013\n" -" [2] https://github.com/CPJKU/SuperFlux"); +const char* SuperFluxExtractor::name = standard::SuperFluxExtractor::name; +const char* SuperFluxExtractor::category = standard::SuperFluxExtractor::category; +const char* SuperFluxExtractor::description = standard::SuperFluxExtractor::description; + SuperFluxExtractor::SuperFluxExtractor() : _configured(false) { @@ -108,9 +103,16 @@ void SuperFluxExtractor::clearAlgos() { namespace essentia { namespace standard { -const char* SuperFluxExtractor::name = streaming::SuperFluxExtractor::name; -const char* SuperFluxExtractor::category = streaming::SuperFluxExtractor::category; -const char* SuperFluxExtractor::description = streaming::SuperFluxExtractor::description; +const char* SuperFluxExtractor::name = "SuperFluxExtractor"; +const char* SuperFluxExtractor::category = "Rhythm"; +const char* SuperFluxExtractor::description = DOC("This algorithm detects onsets given an audio signal using SuperFlux algorithm. This implementation is based on the available reference implementation in python [2]. The algorithm computes spectrum of the input signal, summarizes it into triangular band energies, and computes a onset detection function based on spectral flux tracking spectral trajectories with a maximum filter (SuperFluxNovelty). The peaks of the function are then detected (SuperFluxPeaks).\n" +"\n" +"References:\n" +" [1] Böck, S. and Widmer, G., Maximum Filter Vibrato Suppression for Onset\n" +" Detection, Proceedings of the 16th International Conference on Digital\n" +" Audio Effects (DAFx-13), 2013\n" +" [2] https://github.com/CPJKU/SuperFlux"); + SuperFluxExtractor::SuperFluxExtractor() { declareInput(_signal, "signal", "the audio input signal"); diff --git a/src/algorithms/standard/multiplexer.cpp b/src/algorithms/standard/multiplexer.cpp index 4b4467230..cf15073b2 100644 --- a/src/algorithms/standard/multiplexer.cpp +++ b/src/algorithms/standard/multiplexer.cpp @@ -23,15 +23,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* Multiplexer::name = "Multiplexer"; -const char* Multiplexer::category = "Standard"; -const char* Multiplexer::description = DOC("This algorithm returns a single vector from a given number of real values and/or frames. Frames from different inputs are multiplexed onto a single stream in an alternating fashion.\n" -"\n" -"This algorithm throws an exception if the number of input reals (or vector) is less than the number specified in configuration parameters or if the user tries to acces an input which has not been specified.\n" -"\n" -"References:\n" -" [1] Multiplexer - Wikipedia, the free encyclopedia,\n" -" http://en.wikipedia.org/wiki/Multiplexer\n"); +const char* Multiplexer::name = essentia::standard::Multiplexer::name; +const char* Multiplexer::category = essentia::standard::Multiplexer::category; +const char* Multiplexer::description = essentia::standard::Multiplexer::description; void Multiplexer::clearInputs() { @@ -126,9 +120,16 @@ AlgorithmStatus Multiplexer::process() { namespace essentia { namespace standard { -const char* Multiplexer::name = essentia::streaming::Multiplexer::name; -const char* Multiplexer::category = essentia::streaming::Multiplexer::category; -const char* Multiplexer::description = essentia::streaming::Multiplexer::description; +const char* Multiplexer::name = "Multiplexer"; +const char* Multiplexer::category = "Standard"; +const char* Multiplexer::description = DOC("This algorithm returns a single vector from a given number of real values and/or frames. Frames from different inputs are multiplexed onto a single stream in an alternating fashion.\n" +"\n" +"This algorithm throws an exception if the number of input reals (or vector) is less than the number specified in configuration parameters or if the user tries to acces an input which has not been specified.\n" +"\n" +"References:\n" +" [1] Multiplexer - Wikipedia, the free encyclopedia,\n" +" http://en.wikipedia.org/wiki/Multiplexer\n"); + void Multiplexer::clearInputs() { for (int i=0; iconfigure(INHERIT("sampleRate"), diff --git a/src/algorithms/standard/stereodemuxer.cpp b/src/algorithms/standard/stereodemuxer.cpp index d81ef9927..6e8dcc0e1 100644 --- a/src/algorithms/standard/stereodemuxer.cpp +++ b/src/algorithms/standard/stereodemuxer.cpp @@ -26,9 +26,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* StereoDemuxer::name = "StereoDemuxer"; -const char* StereoDemuxer::category = "Standard"; -const char* StereoDemuxer::description = DOC("This algorithm outputs left and right channel separately given a stereo signal. If the signal is monophonic, it outputs a zero signal on the right channel."); +const char* StereoDemuxer::name = essentia::standard::StereoDemuxer::name; +const char* StereoDemuxer::category = essentia::standard::StereoDemuxer::category; +const char* StereoDemuxer::description = essentia::standard::StereoDemuxer::description; + AlgorithmStatus StereoDemuxer::process() { EXEC_DEBUG("process()"); @@ -79,9 +80,10 @@ AlgorithmStatus StereoDemuxer::process() { namespace essentia { namespace standard { -const char* StereoDemuxer::name = essentia::streaming::StereoDemuxer::name; -const char* StereoDemuxer::category = essentia::streaming::StereoDemuxer::category; -const char* StereoDemuxer::description = essentia::streaming::StereoDemuxer::description; +const char* StereoDemuxer::name = "StereoDemuxer"; +const char* StereoDemuxer::category = "Standard"; +const char* StereoDemuxer::description = DOC("This algorithm outputs left and right channel separately given a stereo signal. If the signal is monophonic, it outputs a zero signal on the right channel."); + void StereoDemuxer::createInnerNetwork() { _demuxer = streaming::AlgorithmFactory::create("StereoDemuxer"); diff --git a/src/algorithms/standard/stereomuxer.cpp b/src/algorithms/standard/stereomuxer.cpp index b3db8dd0b..f1b366344 100644 --- a/src/algorithms/standard/stereomuxer.cpp +++ b/src/algorithms/standard/stereomuxer.cpp @@ -26,9 +26,10 @@ using namespace std; namespace essentia { namespace streaming { -const char* StereoMuxer::name = "StereoMuxer"; -const char* StereoMuxer::category = "Standard"; -const char* StereoMuxer::description = DOC("This algorithm outputs a stereo signal given left and right channel separately."); +const char* StereoMuxer::name = essentia::standard::StereoMuxer::name; +const char* StereoMuxer::category = essentia::standard::StereoMuxer::category; +const char* StereoMuxer::description = essentia::standard::StereoMuxer::description; + AlgorithmStatus StereoMuxer::process() { EXEC_DEBUG("process()"); @@ -81,9 +82,10 @@ AlgorithmStatus StereoMuxer::process() { namespace essentia { namespace standard { -const char* StereoMuxer::name = essentia::streaming::StereoMuxer::name; -const char* StereoMuxer::category = essentia::streaming::StereoMuxer::category; -const char* StereoMuxer::description = essentia::streaming::StereoMuxer::description; +const char* StereoMuxer::name = "StereoMuxer"; +const char* StereoMuxer::category = "Standard"; +const char* StereoMuxer::description = DOC("This algorithm outputs a stereo signal given left and right channel separately."); + void StereoMuxer::createInnerNetwork() { _muxer = streaming::AlgorithmFactory::create("StereoMuxer"); diff --git a/src/algorithms/temporal/loudnessebur128.cpp b/src/algorithms/temporal/loudnessebur128.cpp index 2e609357e..319f35b23 100644 --- a/src/algorithms/temporal/loudnessebur128.cpp +++ b/src/algorithms/temporal/loudnessebur128.cpp @@ -28,28 +28,9 @@ using namespace std; namespace essentia { namespace streaming { -const char* LoudnessEBUR128::name = "LoudnessEBUR128"; -const char* LoudnessEBUR128::category = "Loudness/dynamics"; -const char* LoudnessEBUR128::description = DOC("This algorithm computes the EBU R128 loudness descriptors of an audio signal.\n" -"- The input stereo signal is preprocessed with a K-weighting filter [2] (see LoudnessEBUR128Filter algorithm), composed of two stages: a shelving filter and a high-pass filter (RLB-weighting curve).\n" -"- Momentary loudness is computed by integrating the sum of powers over a sliding rectangular window of 400 ms. The measurement is not gated.\n" -"- Short-term loudness is computed by integrating the sum of powers over a sliding rectangular window of 3 seconds. The measurement is not gated.\n" -"- Integrated loudness is a loudness value averaged over an arbitrary long time interval with gating of 400 ms blocks with two thresholds [2].\n" -" - Absolute 'silence' gating threshold at -70 LUFS for the computation of the absolute-gated loudness level.\n" -" - Relative gating threshold, 10 LU below the absolute-gated loudness level.\n" -"- Loudness range is computed from short-term loudness values. It is defined as the difference between the estimates of the 10th and 95th percentiles of the distribution of the loudness values with applied gating [3].\n" -" - Absolute 'silence' gating threshold at -70 LUFS for the computation of the absolute-gated loudness level.\n" -" - Relative gating threshold, -20 LU below the absolute-gated loudness level.\n" -"\n" -"References:\n" -" [1] EBU Tech 3341-2011. \"Loudness Metering: 'EBU Mode' metering to supplement\n" -" loudness normalisation in accordance with EBU R 128\"\n\n" -" [2] ITU-R BS.1770-2. \"Algorithms to measure audio programme loudness and true-peak audio level\"\n\n" -" [3] EBU Tech Doc 3342-2011. \"Loudness Range: A measure to supplement loudness\n" -" normalisation in accordance with EBU R 128\"\n\n" -" [4] http://tech.ebu.ch/loudness\n\n" -" [5] http://en.wikipedia.org/wiki/LKFS\n" -); +const char* LoudnessEBUR128::name = essentia::standard::LoudnessEBUR128::name; +const char* LoudnessEBUR128::category = essentia::standard::LoudnessEBUR128::category; +const char* LoudnessEBUR128::description = essentia::standard::LoudnessEBUR128::description; LoudnessEBUR128::LoudnessEBUR128() : AlgorithmComposite() { @@ -285,9 +266,28 @@ void LoudnessEBUR128::reset() { namespace essentia { namespace standard { -const char* LoudnessEBUR128::name = essentia::streaming::LoudnessEBUR128::name; -const char* LoudnessEBUR128::category = essentia::streaming::LoudnessEBUR128::category; -const char* LoudnessEBUR128::description = essentia::streaming::LoudnessEBUR128::description; +const char* LoudnessEBUR128::name = "LoudnessEBUR128"; +const char* LoudnessEBUR128::category = "Loudness/dynamics"; +const char* LoudnessEBUR128::description = DOC("This algorithm computes the EBU R128 loudness descriptors of an audio signal.\n" +"- The input stereo signal is preprocessed with a K-weighting filter [2] (see LoudnessEBUR128Filter algorithm), composed of two stages: a shelving filter and a high-pass filter (RLB-weighting curve).\n" +"- Momentary loudness is computed by integrating the sum of powers over a sliding rectangular window of 400 ms. The measurement is not gated.\n" +"- Short-term loudness is computed by integrating the sum of powers over a sliding rectangular window of 3 seconds. The measurement is not gated.\n" +"- Integrated loudness is a loudness value averaged over an arbitrary long time interval with gating of 400 ms blocks with two thresholds [2].\n" +" - Absolute 'silence' gating threshold at -70 LUFS for the computation of the absolute-gated loudness level.\n" +" - Relative gating threshold, 10 LU below the absolute-gated loudness level.\n" +"- Loudness range is computed from short-term loudness values. It is defined as the difference between the estimates of the 10th and 95th percentiles of the distribution of the loudness values with applied gating [3].\n" +" - Absolute 'silence' gating threshold at -70 LUFS for the computation of the absolute-gated loudness level.\n" +" - Relative gating threshold, -20 LU below the absolute-gated loudness level.\n" +"\n" +"References:\n" +" [1] EBU Tech 3341-2011. \"Loudness Metering: 'EBU Mode' metering to supplement\n" +" loudness normalisation in accordance with EBU R 128\"\n\n" +" [2] ITU-R BS.1770-2. \"Algorithms to measure audio programme loudness and true-peak audio level\"\n\n" +" [3] EBU Tech Doc 3342-2011. \"Loudness Range: A measure to supplement loudness\n" +" normalisation in accordance with EBU R 128\"\n\n" +" [4] http://tech.ebu.ch/loudness\n\n" +" [5] http://en.wikipedia.org/wiki/LKFS\n" +); LoudnessEBUR128::LoudnessEBUR128() {