Essentia  2.1-beta5-dev
essentia Namespace Reference

Namespaces

 scheduler
 
 standard
 
 streaming
 
 util
 

Classes

class  AlgorithmInfo
 
class  AsciiBox
 
class  AsciiCanvas
 
class  AsciiDAGParser
 
class  AudioContext
 
struct  case_insensitive_str_cmp
 
class  Configurable
 
class  EssentiaException
 
class  EssentiaFactory
 
class  EssentiaMap
 
class  Everything
 
class  ForcedMutex
 
class  ForcedMutexLocker
 
class  Interval
 
class  JsonConvert
 
class  JsonException
 
class  Logger
 
class  Mutex
 
class  MutexLocker
 
class  OrderedMap
 
class  PairCompare
 
class  Parameter
 
class  ParameterMap
 
class  Pool
 
class  Position
 
class  Range
 
class  RogueVector
 
class  Set
 
class  Stringifier
 
class  Tuple2
 
class  TypeMap
 
class  TypeProxy
 
class  YamlException
 
class  YamlMappingNode
 
class  YamlNode
 
class  YamlScalarNode
 
class  YamlSequenceNode
 

Typedefs

typedef int DebuggingSchedule[][3]
 
typedef std::vector< std::pair< std::pair< int, int >, int > > DebuggingScheduleVector
 
typedef std::string DescriptorName
 
typedef float Real
 
typedef EssentiaMap< std::string, std::string, string_cmp > DescriptionMap
 
typedef int ReaderID
 
typedef Real AudioSample
 
typedef Tuple2< RealStereoSample
 
typedef Position Direction
 

Enumerations

enum  DebuggingModule {
  EAlgorithm = 1 << 0, EConnectors = 1 << 1, EFactory = 1 << 2, ENetwork = 1 << 3,
  EGraph = 1 << 4, EExecution = 1 << 5, EMemory = 1 << 6, EScheduler = 1 << 7,
  EPython = 1 << 20, EPyBindings = 1 << 21, EUnittest = 1 << 22, EUser1 = 1 << 25,
  EUser2 = 1 << 26, ENone = 0, EAll = (1 << 30) - 1
}
 

Functions

template<typename T >
bool compareByName (const T *a, const T *b)
 
const char * debugModuleDescription (DebuggingModule module)
 
void setDebugLevel (int levels)
 
void unsetDebugLevel (int levels)
 
void saveDebugLevels ()
 
void restoreDebugLevels ()
 
void scheduleDebug (DebuggingSchedule schedule, int nentries)
 
void scheduleDebug (const DebuggingScheduleVector &schedule)
 
void setDebugLevelForTimeIndex (int index)
 
void init ()
 
bool isInitialized ()
 
void shutdown ()
 
template<typename T >
bool isPowerTwo (T n)
 
template<typename T >
log2 (T x)
 
template<typename T >
int ilog10 (T n)
 
template<typename T >
nextPowerTwo (T n)
 
template<>
long long int nextPowerTwo (long long int n)
 
template<typename T >
norm (const std::vector< T > &array)
 
template<typename T >
sum (const std::vector< T > &array, int start, int end)
 
template<typename T >
mean (const std::vector< T > &array, int start, int end)
 
template<typename T >
sum (const std::vector< T > &array)
 
template<typename T >
mean (const std::vector< T > &array)
 
template<typename T >
TNT::Array2D< T > meanMatrix (const std::vector< TNT::Array2D< T > * > &array)
 
template<typename T >
TNT::Array2D< T > meanMatrix (const std::vector< TNT::Array2D< T > > &array)
 
template<typename T >
std::vector< T > meanFrames (const std::vector< std::vector< T > > &frames, int beginIdx=0, int endIdx=-1)
 
template<typename T >
std::vector< T > medianFrames (const std::vector< std::vector< T > > &frames, int beginIdx=0, int endIdx=-1)
 
template<typename T >
std::vector< T > varianceFrames (const std::vector< std::vector< T > > &frames)
 
template<typename T >
std::vector< T > skewnessFrames (const std::vector< std::vector< T > > &frames)
 
template<typename T >
std::vector< T > kurtosisFrames (const std::vector< std::vector< T > > &frames)
 
template<typename T >
median (const std::vector< T > &array)
 
template<typename T >
void rectify (std::vector< T > &array)
 
template<typename T >
energy (const std::vector< T > &array)
 
template<typename T >
instantPower (const std::vector< T > &array)
 
template<typename T >
bool isSilent (const std::vector< T > &array)
 
template<typename T >
TNT::Array2D< T > varianceMatrix (const std::vector< TNT::Array2D< T > > &array, const TNT::Array2D< T > &mean)
 
template<typename T >
TNT::Array2D< T > varianceMatrix (const std::vector< TNT::Array2D< T > * > &array, const TNT::Array2D< T > &mean)
 
template<typename T >
variance (const std::vector< T > &array, const T mean)
 
template<typename T >
skewness (const std::vector< T > &array, const T mean)
 
template<typename T >
kurtosis (const std::vector< T > &array, const T mean)
 
template<typename T >
stddev (const std::vector< T > &array, const T mean)
 
template<typename T >
round (const T value)
 
Real lin2db (Real value)
 
Real db2lin (Real value)
 
Real pow2db (Real power)
 
Real db2pow (Real power)
 
Real amp2db (Real amplitude)
 
Real db2amp (Real amplitude)
 
Real linear (Real input)
 
Real hz2bark (Real f)
 
Real bark2hz (Real z)
 
Real barkCriticalBandwidth (Real z)
 
Real mel2hz (Real mel)
 
Real mel102hz (Real mel)
 
Real hz2mel (Real hz)
 
Real hz2mel10 (Real hz)
 
Real hz2hz (Real hz)
 
int argmin (const std::vector< Real > &input)
 
int argmax (const std::vector< Real > &input)
 
template<typename T >
void normalize (std::vector< T > &array)
 
template<typename T >
void normalizeSum (std::vector< T > &array)
 
template<typename T >
std::vector< T > derivative (const std::vector< T > &array)
 
template<typename T , typename U , typename Comparator >
void sortpair (std::vector< T > &v1, std::vector< U > &v2)
 
bool isDenormal (const float &x)
 
template<typename T >
fmod (T a, T b)
 
template<typename T >
princarg (T y)
 
template<typename T >
void hist (const T *array, uint n, int *n_array, T *x_array, uint n_bins)
 
template<typename T >
void bincount (const std::vector< T > &input, std::vector< T > &output)
 
template<typename T >
std::vector< std::vector< T > > transpose (const std::vector< std::vector< T > > &m)
 
template<typename T >
TNT::Array2D< T > transpose (const TNT::Array2D< T > &m)
 
template<typename T , typename Array >
std::vector< T > arrayToVector (const Array &array)
 
template<typename T >
int indexOf (const std::vector< T > &v, const T &elem)
 
template<typename T >
bool contains (const std::vector< T > &v, const T &elem)
 
bool contains (const std::vector< std::string > &v, const char *str)
 
template<typename T , typename U >
bool contains (const std::map< T, U > &m, const T &key)
 
template<typename T >
bool contains (const OrderedMap< T > &m, const std::string &key)
 
template<typename T >
bool contains (const OrderedMap< T > &m, const char *key)
 
template<typename T >
bool isValid (const T &value)
 
template<typename T >
bool isValid (const Tuple2< T > &value)
 
bool isValid (const std::string &s)
 
template<typename T >
bool isValid (const std::vector< T > &v)
 
template<typename T >
bool isValid (const std::vector< std::vector< T > > &mat)
 
template<typename T >
bool isValid (const TNT::Array2D< T > &mat)
 
template<typename T >
void fastcopy (T *dest, const T *src, int n)
 
template<>
void fastcopy< Real > (Real *dest, const Real *src, int n)
 
template<>
void fastcopy< StereoSample > (StereoSample *dest, const StereoSample *src, int n)
 
template<>
void fastcopy< int > (int *dest, const int *src, int n)
 
void fastcopy (std::vector< Real >::iterator dest, std::vector< Real >::const_iterator src, int n)
 
void fastcopy (std::vector< StereoSample >::iterator dest, std::vector< StereoSample >::const_iterator src, int n)
 
std::ostream & operator<< (std::ostream &out, const Parameter &p)
 
std::ostream & operator<< (std::ostream &out, const ParameterMap &m)
 
std::ostream & operator<< (std::ostream &out, const Parameter::ParamType &t)
 
template<typename T , typename U >
std::ostream & operator<< (std::ostream &out, const std::pair< T, U > &p)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const std::vector< T > &v)
 
template<typename T >
std::ostream & operator<< (std::ostream &out, const std::set< T > &v)
 
std::string toLower (const std::string &str)
 
std::string toUpper (const std::string &str)
 
std::vector< std::string > tokenize (const std::string &str, const std::string &delimiters, bool trimEmpty=false)
 
std::string strip (const std::string &str)
 
std::string pad (int n, int size, char paddingChar=' ', bool leftPadded=false)
 
std::string pad (const std::string &str, int size, char paddingChar=' ', bool leftPadded=false)
 
bool case_insensitive_char_cmp (char a, char b)
 
bool sameType (const std::type_info &t1, const std::type_info &t2)
 
std::string nameOfType (const std::type_info &type)
 
std::string nameOfType (const TypeProxy &tproxy)
 
bool sameType (const TypeProxy &lhs, const TypeProxy &rhs)
 
std::ostream & operator<< (std::ostream &out, const Position &pos)
 
std::vector< std::string > makeRectangle (const std::string &network)
 
std::vector< std::string > makeRectangle (const char *const *network, int size)
 
std::ostream & operator<< (std::ostream &out, const AsciiCanvas &canvas)
 
bool isBigEndian ()
 
template<typename T >
void removeEndianness (T &x)
 
template<typename T >
void bewrite (std::ofstream &out, const T &value)
 
template<>
void bewrite (std::ofstream &out, const std::string &str)
 
template<>
void bewrite (std::ofstream &out, const std::vector< std::string > &v)
 
template<typename T >
void beread (std::ifstream &in, T &value)
 
template<>
void beread (std::ifstream &in, std::string &str)
 
template<>
void beread (std::ifstream &in, std::vector< std::string > &v)
 
Real lagToBpm (Real lag, Real sampleRate, Real hopSize)
 
Real bpmToLag (Real bpm, Real sampleRate, Real hopSize)
 
int longestChain (const std::vector< Real > &dticks, int startpos, Real period, Real tolerance)
 
void bpmDistance (Real x, Real y, Real &error, Real &ratio)
 
bool areEqual (Real a, Real b, Real tolerance)
 
bool areHarmonics (Real x, Real y, Real epsilon, bool bPower2)
 
Real greatestCommonDivisor (Real x, Real y, Real epsilon)
 
std::vector< RealroundBpms (const std::vector< Real > &bpms)
 
std::vector< RealpostProcessTicks (const std::vector< Real > &origticks)
 
std::vector< RealpostProcessTicks (const std::vector< Real > &origticks, const std::vector< Real > &ticksAmplitudes, const Real &preferredPeriod)
 
void pcmMetadata (const std::string &filename, int &sr, int &ch, int &bitrate)
 
void outputYAMLArray (std::ostream &out, const std::vector< Real > &v)
 
void outputYAMLMatrix (std::ostream &out, const std::vector< std::vector< Real > > &v)
 
void scaleAudioVector (std::vector< Real > &buffer, const Real scale)
 
void cleaningSineTracks (std::vector< std::vector< Real > > &freqsTotal, const int minFrames)
 
void genSpecSines (std::vector< Real > iploc, std::vector< Real > ipmag, std::vector< Real > ipphase, std::vector< std::complex< Real > > &outfft, const int fftSize)
 
void initializeFFT (std::vector< std::complex< Real > > &fft, int sizeFFT)
 
template<typename T >
TNT::Array2D< T > & operator/= (TNT::Array2D< T > &A, const T &k)
 
template<typename T >
TNT::Array2D< T > operator/ (const TNT::Array2D< T > &A, const T &k)
 
template<typename T >
TNT::Array2D< T > & matinit (TNT::Array2D< T > &A)
 
TNT::Array2D< RealvecvecToArray2D (const std::vector< std::vector< Real > > &v)
 
std::vector< std::vector< Real > > array2DToVecvec (const TNT::Array2D< Real > &v2D)
 
YamlNodeparseYaml (FILE *, const std::string &fileString=std::string())
 

Variables

int activatedDebugLevels
 
bool infoLevelActive
 
bool warningLevelActive
 
bool errorLevelActive
 
int debugIndentLevel
 
Logger loggerInstance
 
const char * version
 
const char * version_git_sha
 

Typedef Documentation

◆ AudioSample

typedef Real AudioSample

Type used to represent a mono audio sample.

◆ DebuggingSchedule

typedef int DebuggingSchedule[][3]

◆ DebuggingScheduleVector

typedef std::vector<std::pair<std::pair<int, int>, int> > DebuggingScheduleVector

◆ DescriptionMap

typedef EssentiaMap<std::string, std::string, string_cmp> DescriptionMap

Type of map used for storing the description of the various fields.

◆ DescriptorName

typedef std::string DescriptorName

◆ Direction

Represents a direction when moving in an integer 2D plane

◆ ReaderID

typedef int ReaderID

typedef used for identifying sinks for a given source.

◆ Real

typedef float Real

The main typedef for real numbers.

◆ StereoSample

Type used to represent a stereo sample.

Enumeration Type Documentation

◆ DebuggingModule

Enumerator
EAlgorithm 
EConnectors 
EFactory 
ENetwork 
EGraph 
EExecution 
EMemory 
EScheduler 
EPython 
EPyBindings 
EUnittest 
EUser1 
EUser2 
ENone 
EAll 

Function Documentation

◆ amp2db()

Real essentia::amp2db ( Real  amplitude)
inline

References lin2db().

◆ areEqual()

bool essentia::areEqual ( Real  a,
Real  b,
Real  tolerance 
)
inline

References bpmDistance().

◆ areHarmonics()

bool essentia::areHarmonics ( Real  x,
Real  y,
Real  epsilon,
bool  bPower2 
)
inline

References bpmDistance(), and isPowerTwo().

◆ argmax()

int essentia::argmax ( const std::vector< Real > &  input)
inline

Referenced by bincount(), and postProcessTicks().

◆ argmin()

int essentia::argmin ( const std::vector< Real > &  input)
inline

◆ array2DToVecvec()

std::vector<std::vector<Real> > essentia::array2DToVecvec ( const TNT::Array2D< Real > &  v2D)
inline

◆ arrayToVector()

std::vector<T> essentia::arrayToVector ( const Array &  array)

Utility function that converts a C-style array into a C++ std::vector.

References ARRAY_SIZE.

◆ bark2hz()

Real essentia::bark2hz ( Real  z)
inline

Converts a Bark value into its corresponding frequency. This formula is deduced from: H. Traunm├╝ller (1990) "Analytical expressions for the tonotopic sensory scale" J. Acoust. Soc. Am. 88: 97-100. and has been independently verified to be the one that best matches the band frequencies defined by Zwicker in 1961.

Parameters
zthe critical band rate, in Bark

◆ barkCriticalBandwidth()

Real essentia::barkCriticalBandwidth ( Real  z)
inline

◆ beread() [1/3]

void essentia::beread ( std::ifstream &  in,
T &  value 
)

References removeEndianness().

Referenced by beread().

◆ beread() [2/3]

void essentia::beread ( std::ifstream &  in,
std::string &  str 
)

References beread().

◆ beread() [3/3]

void essentia::beread ( std::ifstream &  in,
std::vector< std::string > &  v 
)

References beread().

◆ bewrite() [1/3]

void essentia::bewrite ( std::ofstream &  out,
const T &  value 
)

References removeEndianness().

Referenced by bewrite().

◆ bewrite() [2/3]

void essentia::bewrite ( std::ofstream &  out,
const std::string &  str 
)

References bewrite().

◆ bewrite() [3/3]

void essentia::bewrite ( std::ofstream &  out,
const std::vector< std::string > &  v 
)

References bewrite().

◆ bincount()

void essentia::bincount ( const std::vector< T > &  input,
std::vector< T > &  output 
)

returns in output the number of occurence of each value in the input vector

References argmax().

◆ bpmDistance()

void essentia::bpmDistance ( Real  x,
Real  y,
Real error,
Real ratio 
)
inline

References round().

Referenced by areEqual(), areHarmonics(), and greatestCommonDivisor().

◆ bpmToLag()

Real essentia::bpmToLag ( Real  bpm,
Real  sampleRate,
Real  hopSize 
)
inline

References lagToBpm().

◆ case_insensitive_char_cmp()

bool essentia::case_insensitive_char_cmp ( char  a,
char  b 
)
inline

Case-insensitive compare function for characters.

Referenced by case_insensitive_str_cmp::operator()().

◆ cleaningSineTracks()

void essentia::cleaningSineTracks ( std::vector< std::vector< Real > > &  freqsTotal,
const int  minFrames 
)

◆ compareByName()

bool essentia::compareByName ( const T *  a,
const T *  b 
)

◆ contains() [1/5]

bool essentia::contains ( const std::vector< T > &  v,
const T &  elem 
)

Returns whether a vector of a certain type contains an element or not. Comparison is done using the '==' operator, so you can even use it for your own types if you overload this operator.

References indexOf().

Referenced by NetworkNode::addChild(), contains(), Interval::~Interval(), Range::~Range(), and Set::~Set().

◆ contains() [2/5]

bool essentia::contains ( const std::vector< std::string > &  v,
const char *  str 
)
inline

References contains().

◆ contains() [3/5]

bool essentia::contains ( const std::map< T, U > &  m,
const T &  key 
)

Utility function to test whether a key is in a map.

◆ contains() [4/5]

bool essentia::contains ( const OrderedMap< T > &  m,
const std::string &  key 
)

◆ contains() [5/5]

bool essentia::contains ( const OrderedMap< T > &  m,
const char *  key 
)

References contains().

◆ db2amp()

Real essentia::db2amp ( Real  amplitude)
inline

References db2lin().

◆ db2lin()

Real essentia::db2lin ( Real  value)
inline

Referenced by db2amp(), and db2pow().

◆ db2pow()

Real essentia::db2pow ( Real  power)
inline

References db2lin().

◆ debugModuleDescription()

const char* essentia::debugModuleDescription ( DebuggingModule  module)

◆ derivative()

std::vector<T> essentia::derivative ( const std::vector< T > &  array)

◆ energy()

T essentia::energy ( const std::vector< T > &  array)

Referenced by instantPower().

◆ fastcopy() [1/3]

void essentia::fastcopy ( T *  dest,
const T *  src,
int  n 
)
inline

This function, which has the same interface as memcpy, performs either memcpy (fast) for basic types, or does a simple copy element by element (for strings, for instance).

Referenced by fastcopy(), Copy< TokenType >::process(), VectorOutput< TokenType, StorageType >::process(), VectorInput< TokenType, acquireSize >::process(), and PhantomBuffer< T >::releaseForWrite().

◆ fastcopy() [2/3]

void essentia::fastcopy ( std::vector< Real >::iterator  dest,
std::vector< Real >::const_iterator  src,
int  n 
)
inline

References fastcopy().

◆ fastcopy() [3/3]

void essentia::fastcopy ( std::vector< StereoSample >::iterator  dest,
std::vector< StereoSample >::const_iterator  src,
int  n 
)
inline

References fastcopy().

◆ fastcopy< int >()

void essentia::fastcopy< int > ( int *  dest,
const int *  src,
int  n 
)
inline

◆ fastcopy< Real >()

void essentia::fastcopy< Real > ( Real dest,
const Real src,
int  n 
)
inline

◆ fastcopy< StereoSample >()

void essentia::fastcopy< StereoSample > ( StereoSample dest,
const StereoSample src,
int  n 
)
inline

◆ fmod()

T essentia::fmod ( a,
b 
)

Referenced by princarg().

◆ genSpecSines()

void essentia::genSpecSines ( std::vector< Real iploc,
std::vector< Real ipmag,
std::vector< Real ipphase,
std::vector< std::complex< Real > > &  outfft,
const int  fftSize 
)

◆ greatestCommonDivisor()

Real essentia::greatestCommonDivisor ( Real  x,
Real  y,
Real  epsilon 
)
inline

References bpmDistance().

Referenced by roundBpms().

◆ hist()

void essentia::hist ( const T *  array,
uint  n,
int *  n_array,
T *  x_array,
uint  n_bins 
)

Given a set of values, computes the associated histogram. This method is designed to work the same way as in Matlab/Octave. It is based on the algorithms used in Octave rather than Matlab. The result structures (n_arr, x_arr) have to be allocated before calling this function.

Parameters
arraythe input array, containing the data values
nthe number of elements of this array
n_arraythe array where the distribution will be written
x_arraythe array that will contain the centers of each bin
n_binsthe number of desired bins for the distribution

Referenced by postProcessTicks().

◆ hz2bark()

Real essentia::hz2bark ( Real  f)
inline

Converts a given frequency into its Bark value. This formula is taken from: H. Traunm├╝ller (1990) "Analytical expressions for the tonotopic sensory scale" J. Acoust. Soc. Am. 88: 97-100. and has been independently verified to be the one that best matches the band frequencies defined by Zwicker in 1961.

Parameters
fthe input frequency, in Hz

◆ hz2hz()

Real essentia::hz2hz ( Real  hz)
inline

◆ hz2mel()

Real essentia::hz2mel ( Real  hz)
inline

◆ hz2mel10()

Real essentia::hz2mel10 ( Real  hz)
inline

◆ ilog10()

int essentia::ilog10 ( n)

◆ indexOf()

int essentia::indexOf ( const std::vector< T > &  v,
const T &  elem 
)

Return the index of the given element inside the vector. If elem was not found in v, return -1.

Referenced by contains().

◆ init()

void essentia::init ( )

This function registers the algorithms in the factory, so that they are ready for use. It also builds a list of available types and their "human-readable" representations. You need to call this function before doing anything with essentia.

◆ initializeFFT()

void essentia::initializeFFT ( std::vector< std::complex< Real > > &  fft,
int  sizeFFT 
)

◆ instantPower()

T essentia::instantPower ( const std::vector< T > &  array)

References energy().

Referenced by isSilent().

◆ isBigEndian()

bool essentia::isBigEndian ( )
inline

Referenced by removeEndianness().

◆ isDenormal()

bool essentia::isDenormal ( const float &  x)
inline

◆ isInitialized()

bool essentia::isInitialized ( )

◆ isPowerTwo()

bool essentia::isPowerTwo ( n)

Referenced by areHarmonics().

◆ isSilent()

bool essentia::isSilent ( const std::vector< T > &  array)

References instantPower(), and silenceCutoff.

◆ isValid() [1/6]

bool essentia::isValid ( const T &  value)
inline

Return whether a value is valid or not, ie: is not Inf nor NaN.

Referenced by isValid().

◆ isValid() [2/6]

bool essentia::isValid ( const Tuple2< T > &  value)
inline

◆ isValid() [3/6]

bool essentia::isValid ( const std::string &  s)
inline

◆ isValid() [4/6]

bool essentia::isValid ( const std::vector< T > &  v)
inline

References isValid().

◆ isValid() [5/6]

bool essentia::isValid ( const std::vector< std::vector< T > > &  mat)
inline

References isValid().

◆ isValid() [6/6]

bool essentia::isValid ( const TNT::Array2D< T > &  mat)
inline

◆ kurtosis()

T essentia::kurtosis ( const std::vector< T > &  array,
const T  mean 
)

References mean().

◆ kurtosisFrames()

std::vector<T> essentia::kurtosisFrames ( const std::vector< std::vector< T > > &  frames)

References meanFrames().

◆ lagToBpm()

Real essentia::lagToBpm ( Real  lag,
Real  sampleRate,
Real  hopSize 
)
inline

Referenced by bpmToLag().

◆ lin2db()

Real essentia::lin2db ( Real  value)
inline

References dbSilenceCutoff, and silenceCutoff.

Referenced by amp2db(), and pow2db().

◆ linear()

Real essentia::linear ( Real  input)
inline

◆ log2()

T essentia::log2 ( x)

◆ longestChain()

int essentia::longestChain ( const std::vector< Real > &  dticks,
int  startpos,
Real  period,
Real  tolerance 
)
inline

Referenced by postProcessTicks().

◆ makeRectangle() [1/2]

std::vector<std::string> essentia::makeRectangle ( const std::string &  network)

Take a string representing the network in ASCII art form and turn it into a rectangle, which is a vector of string rows where each row has the same length. This will allow us to navigate in it with rect[x][y], for instance.

Referenced by AsciiCanvas::AsciiCanvas().

◆ makeRectangle() [2/2]

std::vector<std::string> essentia::makeRectangle ( const char *const *  network,
int  size 
)

Take an array of C strings representing the network in ASCII art form and turn it into a rectangle, which is a vector of string rows where each row has the same length. This will allow us to navigate in it with rect[x][y], for instance.

◆ matinit()

TNT::Array2D<T>& essentia::matinit ( TNT::Array2D< T > &  A)

◆ mean() [1/2]

T essentia::mean ( const std::vector< T > &  array,
int  start,
int  end 
)

returns the mean of an array, unrolled version.

References sum().

Referenced by kurtosis(), mean(), meanMatrix(), MTRand::operator()(), postProcessTicks(), skewness(), variance(), and varianceMatrix().

◆ mean() [2/2]

T essentia::mean ( const std::vector< T > &  array)

returns the mean of an array.

References mean().

◆ meanFrames()

std::vector<T> essentia::meanFrames ( const std::vector< std::vector< T > > &  frames,
int  beginIdx = 0,
int  endIdx = -1 
)

◆ meanMatrix() [1/2]

TNT::Array2D<T> essentia::meanMatrix ( const std::vector< TNT::Array2D< T > * > &  array)

returns the mean of an array of TNT::Array2D*

References matinit(), and mean().

◆ meanMatrix() [2/2]

TNT::Array2D<T> essentia::meanMatrix ( const std::vector< TNT::Array2D< T > > &  array)

returns the mean of an array of TNT::Array2D

References matinit(), and mean().

◆ median()

T essentia::median ( const std::vector< T > &  array)

◆ medianFrames()

std::vector<T> essentia::medianFrames ( const std::vector< std::vector< T > > &  frames,
int  beginIdx = 0,
int  endIdx = -1 
)

◆ mel102hz()

Real essentia::mel102hz ( Real  mel)
inline

◆ mel2hz()

Real essentia::mel2hz ( Real  mel)
inline

◆ nameOfType() [1/2]

◆ nameOfType() [2/2]

std::string essentia::nameOfType ( const TypeProxy tproxy)
inline

Commodity function to return the name of the type used in a TypeProxy.

References nameOfType(), and TypeProxy::typeInfo().

◆ nextPowerTwo() [1/2]

T essentia::nextPowerTwo ( n)

Return the next power of two after the given number n. If n is already a power of two, return n.

◆ nextPowerTwo() [2/2]

long long int essentia::nextPowerTwo ( long long int  n)
inline

◆ norm()

T essentia::norm ( const std::vector< T > &  array)

References sum().

Referenced by Eigenvalue< Real >::hqr2().

◆ normalize()

void essentia::normalize ( std::vector< T > &  array)

◆ normalizeSum()

void essentia::normalizeSum ( std::vector< T > &  array)

◆ operator/()

TNT::Array2D<T> essentia::operator/ ( const TNT::Array2D< T > &  A,
const T &  k 
)

◆ operator/=()

TNT::Array2D<T>& essentia::operator/= ( TNT::Array2D< T > &  A,
const T &  k 
)

◆ operator<<() [1/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const Position pos 
)
inline

References Position::x, and Position::y.

◆ operator<<() [2/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const std::pair< T, U > &  p 
)

Output a std::complex into an output stream. Output a std::pair into an output stream.

◆ operator<<() [3/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const std::vector< T > &  v 
)

Output a std::vector into an output stream.

◆ operator<<() [4/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const std::set< T > &  v 
)

Output a std::set into an output stream.

◆ operator<<() [5/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const AsciiCanvas canvas 
)
inline

◆ operator<<() [6/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const Parameter p 
)

◆ operator<<() [7/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const ParameterMap m 
)

◆ operator<<() [8/8]

std::ostream& essentia::operator<< ( std::ostream &  out,
const Parameter::ParamType t 
)

◆ outputYAMLArray()

void essentia::outputYAMLArray ( std::ostream &  out,
const std::vector< Real > &  v 
)

◆ outputYAMLMatrix()

void essentia::outputYAMLMatrix ( std::ostream &  out,
const std::vector< std::vector< Real > > &  v 
)

◆ pad() [1/2]

std::string essentia::pad ( int  n,
int  size,
char  paddingChar = ' ',
bool  leftPadded = false 
)

Referenced by Stringifier::str().

◆ pad() [2/2]

std::string essentia::pad ( const std::string &  str,
int  size,
char  paddingChar = ' ',
bool  leftPadded = false 
)

◆ parseYaml()

YamlNode* essentia::parseYaml ( FILE *  ,
const std::string &  fileString = std::string() 
)

◆ pcmMetadata()

void essentia::pcmMetadata ( const std::string &  filename,
int &  sr,
int &  ch,
int &  bitrate 
)

◆ postProcessTicks() [1/2]

std::vector<Real> essentia::postProcessTicks ( const std::vector< Real > &  origticks)
inline

References hist(), longestChain(), and mean().

◆ postProcessTicks() [2/2]

std::vector<Real> essentia::postProcessTicks ( const std::vector< Real > &  origticks,
const std::vector< Real > &  ticksAmplitudes,
const Real preferredPeriod 
)
inline

References argmax(), hist(), longestChain(), and mean().

◆ pow2db()

Real essentia::pow2db ( Real  power)
inline

References lin2db().

◆ princarg()

T essentia::princarg ( y)

References fmod(), and M_2PI.

◆ rectify()

void essentia::rectify ( std::vector< T > &  array)

◆ removeEndianness()

void essentia::removeEndianness ( T &  x)

References isBigEndian().

Referenced by beread(), and bewrite().

◆ restoreDebugLevels()

void essentia::restoreDebugLevels ( )

◆ round()

T essentia::round ( const T  value)

Referenced by bpmDistance(), and roundBpms().

◆ roundBpms()

std::vector<Real> essentia::roundBpms ( const std::vector< Real > &  bpms)
inline

References greatestCommonDivisor(), and round().

◆ sameType() [1/2]

bool essentia::sameType ( const std::type_info &  t1,
const std::type_info &  t2 
)
inline

Return true if the two given types are the same.

References nameOfType().

Referenced by essentia::streaming::attach(), TypeProxy::checkType(), and sameType().

◆ sameType() [2/2]

bool essentia::sameType ( const TypeProxy lhs,
const TypeProxy rhs 
)
inline

Commodity function to compare two TypeProxy using their respective type.

References sameType(), and TypeProxy::typeInfo().

◆ saveDebugLevels()

void essentia::saveDebugLevels ( )

◆ scaleAudioVector()

void essentia::scaleAudioVector ( std::vector< Real > &  buffer,
const Real  scale 
)

◆ scheduleDebug() [1/2]

void essentia::scheduleDebug ( DebuggingSchedule  schedule,
int  nentries 
)

the given schedule variable is a vector of pair of ints representing the range of indices for which to activate the given debugging module.

Example:

DebuggingSchedule s = { {0, INT_MAX, EAlgorithm}, // always active {500, INT_MAX, ENetwork | EMemory}, // from time index 500 until the end {782, 782, EScheduler}; // only for time index 782 scheduleDebug(s, ARRAY_SIZE(s));

◆ scheduleDebug() [2/2]

void essentia::scheduleDebug ( const DebuggingScheduleVector schedule)

◆ setDebugLevel()

void essentia::setDebugLevel ( int  levels)

◆ setDebugLevelForTimeIndex()

void essentia::setDebugLevelForTimeIndex ( int  index)

Set the debugging modules for the given time index as specified by the scheduleDebug() function call.

◆ shutdown()

void essentia::shutdown ( )

◆ skewness()

T essentia::skewness ( const std::vector< T > &  array,
const T  mean 
)

References mean().

◆ skewnessFrames()

std::vector<T> essentia::skewnessFrames ( const std::vector< std::vector< T > > &  frames)

References meanFrames().

◆ sortpair()

void essentia::sortpair ( std::vector< T > &  v1,
std::vector< U > &  v2 
)

◆ stddev()

T essentia::stddev ( const std::vector< T > &  array,
const T  mean 
)

References variance().

◆ strip()

std::string essentia::strip ( const std::string &  str)

Strip the given string of its leading and trailing whitespace characters.

◆ sum() [1/2]

T essentia::sum ( const std::vector< T > &  array,
int  start,
int  end 
)

returns the sum of an array, unrolled version.

Referenced by TNT::dot_prod(), TNT::matmult(), mean(), norm(), and sum().

◆ sum() [2/2]

T essentia::sum ( const std::vector< T > &  array)

returns the sum of an array.

References sum().

◆ tokenize()

std::vector<std::string> essentia::tokenize ( const std::string &  str,
const std::string &  delimiters,
bool  trimEmpty = false 
)

Return a string split whenever there is a char contained in the given delimiters argument.

◆ toLower()

std::string essentia::toLower ( const std::string &  str)

Return a new string with the characters of str in lower-case.

Referenced by Parameter::isConfigured().

◆ toUpper()

std::string essentia::toUpper ( const std::string &  str)

Return a new string with the characters of str in upper-case.

◆ transpose() [1/2]

std::vector<std::vector<T> > essentia::transpose ( const std::vector< std::vector< T > > &  m)

Transpose the given matrix. This function throws an exception if all the rows do not have the same size.

◆ transpose() [2/2]

TNT::Array2D<T> essentia::transpose ( const TNT::Array2D< T > &  m)

◆ unsetDebugLevel()

void essentia::unsetDebugLevel ( int  levels)

◆ variance()

T essentia::variance ( const std::vector< T > &  array,
const T  mean 
)

◆ varianceFrames()

std::vector<T> essentia::varianceFrames ( const std::vector< std::vector< T > > &  frames)

References meanFrames().

◆ varianceMatrix() [1/2]

TNT::Array2D<T> essentia::varianceMatrix ( const std::vector< TNT::Array2D< T > > &  array,
const TNT::Array2D< T > &  mean 
)

References matinit(), mean(), and variance().

◆ varianceMatrix() [2/2]

TNT::Array2D<T> essentia::varianceMatrix ( const std::vector< TNT::Array2D< T > * > &  array,
const TNT::Array2D< T > &  mean 
)

References matinit(), mean(), and variance().

◆ vecvecToArray2D()

TNT::Array2D<Real> essentia::vecvecToArray2D ( const std::vector< std::vector< Real > > &  v)
inline

Variable Documentation

◆ activatedDebugLevels

int activatedDebugLevels

A bitmask representing which debug levels are currently activated.

◆ debugIndentLevel

int debugIndentLevel

An integer representing the indentation with which to print the debug messages

◆ errorLevelActive

bool errorLevelActive

◆ infoLevelActive

bool infoLevelActive

◆ loggerInstance

Logger loggerInstance

Referenced by Logger::Logger().

◆ version

const char* version

◆ version_git_sha

const char* version_git_sha

◆ warningLevelActive

bool warningLevelActive