gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
#include <WSOLA.H>
Public Member Functions | |
WSOLA () | |
WSOLA (int chCnt) | |
virtual | ~WSOLA () |
Destructor. More... | |
template<typename Derived > | |
int | process (FP_TYPE timeScale, const DenseBase< Derived > &input) |
void | processInner (void) |
int | getMaxInputSamplesRequired (void) |
int | getSamplesRequired (void) |
int | getOutputSize (void) |
void | reset (int chCnt) |
int | noMoreAudio () |
int | loadInput (int n, int m, FP_TYPE val) |
FP_TYPE | unloadOutput (int n, int m) |
void | setFS (float fsIn) |
Public Attributes | |
Array< FP_TYPE, Dynamic, Dynamic > | output |
The output vector, each row is a channel. More... | |
Array< FP_TYPE, Dynamic, Dynamic > | input |
The input vector, each row is a channel. More... | |
Private Member Functions | |
template<typename Derived > | |
int | findSimilarityInBuffer (const DenseBase< Derived > &buffer) |
template<typename Derived > | |
FP_TYPE | findSimilarity (const ArrayBase< Derived > &outputIn) |
template<typename Derived > | |
FP_TYPE | rms (const ArrayBase< Derived > &s) |
void | OLAWnd (void) |
Generate the overlap add window based on the window size N. More... | |
void | init (void) |
Private Attributes | |
float | fs |
The sample rate in Hz. More... | |
int | N |
The size of the window. More... | |
int | NO2 |
Half the window size. More... | |
int | M |
The number of windows in the search buffer. More... | |
int | m |
The current row index into the buffer. More... | |
double | rem |
The remainder fraction of a sample to remember for next time (can't move on by fractions of a sample). More... | |
Array< FP_TYPE, Dynamic, Dynamic > | buffer |
The buffer of audio, each channel on its own row. More... | |
Array< FP_TYPE, Dynamic, Dynamic > | wnd |
The overlap add window. More... | |
Array< FP_TYPE, Dynamic, Dynamic > | nextOutput |
The output vector to search for, each channel per row. More... | |
Array< FP_TYPE, Dynamic, Dynamic > | simComp |
Temporary vector used for computation. More... | |
int | inputSamplesRequired |
The number of audio samples required for the next call to process. More... | |
Class which implements the Waveform Similarity Overlap Add (Embedded WSOLA).
This class allows you to time scale modify multi-channel audio. It speeds up or slows down audio without changing its pitch.
This Class uses Eigen to compute all vector operations in the aim of ensuring efficient hardware utilisation and speed.
WSOLA::WSOLA | ( | ) |
WSOLA::WSOLA | ( | int | chCnt | ) |
|
inlineprivate |
|
private |
Find the most similar vector in a buffer of vectors to the input reference.
buffer | The matrix of vectors to compare against the reference |
Derived | The CRTP class operated on. |
Definition at line 57 of file WSOLA.C.
|
inline |
|
inline |
|
inline |
|
private |
int WSOLA::loadInput | ( | int | n, |
int | m, | ||
FP_TYPE | val | ||
) |
Load the WSOLA.input Array - for use with languages where Eigen types aren't exposed. Implements WSOLA.input(n,m)=val;
n | The row to load |
m | The column to load |
val | The value to load into the input Array |
Definition at line 145 of file WSOLA.C.
|
inline |
|
private |
|
inline |
Process the input vector and indicate how many samples are required to reload the input vector.
timeScale | The scaling factor for the time, <1 is slower, >1 is faster |
input | The input to load into the buffer for future use. |
Derived | The CRTP class operated on. |
Definition at line 169 of file WSOLA.H.
void WSOLA::processInner | ( | void | ) |
void WSOLA::reset | ( | int | chCnt | ) |
|
inlineprivate |
void WSOLA::setFS | ( | float | fsIn | ) |
FP_TYPE WSOLA::unloadOutput | ( | int | n, |
int | m | ||
) |
Unload the WSOLA.output Array - for use with languages where Eigen types aren't exposed. The value is returned.
n | The row to unload |
m | The column to unload |
Definition at line 154 of file WSOLA.C.
|
private |
|
private |
|
private |
GTK+ IOStream
Beta
|