Loudia is specially targeted for researchers. The algorithms are not necessarily tuned for performance but rather for: Ease of use Flexibility and clarity of the algorithms Variety of algorithms
The following algorithms are implemented:
Numerous examples which can also be used for testing in some cases can be found in python/ Some of the examples require an audio WAVE filename as input argument.
The C++ library Libaudio requires:
The Python bindings Libaudio require:
Libaudio uses a template library called Eigen (http://eigen.tuxfamily.org).
In C++ all algorithms use Eigen::Matrix types as inputs and outputs.
In the Python bindings use Numpy arrays as inputs and outputs.
To build and install Loudia run:
./waf configure --prefix=/some/install/dir ./waf build sudo ./waf install
To uninstall it run:
sudo ./waf uninstall
Several options allow different building modes.
To build without Python bindings run:
./waf configure --no-python-bindings ./waf build
To build the documentation run:
./waf configure --doc ./waf build
To build in debug mode run:
./waf configure --debug ./waf build
All the above options can be combined.
The library is composed by algorithms. Algorithms are classes that represent a processing unit.
All algorithms share two methods:
Additionally a method called process() is also always present. Depending on the algorithm the method will take different number and types of arguments.
The algorithms return the results in a C-style way. The process() method also takes as input arguments pointers to matrices where the results will be written.
All inputs and outputs to the process() methods are of type Eigen::Matrix.
From Python you may create algorithm, change its parameters and call the process method:
import numpy import pylab import loudia
data_frame = numpy.arange( 128 )
fft = loudia.FFT() fft.setFftSize( 128 )
result = fft.process( data_frame ) pylab.plot( result[0,:] ) # Note that the results of the FFT algorithm are stacked in rows (we only plot the first)
# When setting several parameters we might not want the algorithm to reconfigure itself # method after each parameter setting, and we will call the setup() manually fft.setFftSize( 256, False ) fft.setZeroPhase( True, False ) fft.setup()
result = fft.process( data_frame ) pylab.plot( abs( result[0,:] ) ) # Note that the results of the FFT algorithm are stacked in rows (we only plot the first)
pylab.show()
A few assumptions are used when using the library: