gtkIOStream
1.7.0
GTK+ << C++ IOStream operators for GTK+. Now with ORBing, numerical computation, audio client and more ...
|
#include <OverlapAdd.H>
Public Member Functions | |
OverlapAdd (void) | |
Empty constructor defaults to OVERLAP_DEFAULT. More... | |
OverlapAdd (float factor) | |
virtual | ~OverlapAdd () |
Destructor. More... | |
int | loadData (Sox< float > &sox, uint windowSize, uint sampleCount, int whichCh=0) |
int | unloadData (Sox< float > &sox) |
float | getOverlapFactor () |
float | getWindowSize () |
float | getWindowCount () |
void | dump (void) |
TYPE | getMaxVal () |
Protected Attributes | |
Eigen::Matrix< TYPE, Eigen::Dynamic, Eigen::Dynamic > | data |
Private Member Functions | |
void | init (float factor) |
Private Attributes | |
float | overlapFactor |
Overlap factor, 0.5 for half. More... | |
Generates an overlap matrix for an arbitrary 1D waveform.
Allows specification of the overlap factor <1.
The audio is read in from any audio file supported by Sox. The loadData method will read in the number of samples specified and pad out the rest of the window with extra samples. The actual number of samples read in may be windowSize*getOverlapFactor() larger then requested.
TYPE | Specifies the type of the data held in the matrix, e.g. float, double |
Definition at line 60 of file OverlapAdd.H.
|
inline |
Empty constructor defaults to OVERLAP_DEFAULT.
Definition at line 84 of file OverlapAdd.H.
|
inline |
Constructor specifying an overlap factor.
factor | the factor to overlap by. |
Definition at line 91 of file OverlapAdd.H.
|
inlinevirtual |
Destructor.
Definition at line 96 of file OverlapAdd.H.
|
inline |
Method to print the contents window by window to stdout.
Definition at line 274 of file OverlapAdd.H.
|
inline |
Get the absolute maximum value from the data.
Definition at line 281 of file OverlapAdd.H.
|
inline |
find out by how much the windows are overlapping, 0.5 implies half window overlap.
Definition at line 254 of file OverlapAdd.H.
|
inline |
Find how many windows of getWindowSize() samples are in memory.
Definition at line 268 of file OverlapAdd.H.
|
inline |
Find how many samples in each window of data.
Definition at line 261 of file OverlapAdd.H.
|
inlineprivate |
Initialise this class, specifying an overlap factor.
factor | the factor to overlap by. |
Definition at line 66 of file OverlapAdd.H.
|
inline |
load data into the data matrix, with each column containing windowSize samples and overlapping by windowSize*getOverlapFactor() samples. Note : this method will try to read an extra windowSize*getOverlapFactor() samples to fill the last window.
sox | An open sox audiofile, positioned to the point to start reading from. |
windowSize | The size of the audio window including the overlapped region |
sampleCount | The total number of samples to read from the input file. |
whichCh | Which channel to read from the input audio file. |
Definition at line 121 of file OverlapAdd.H.
|
inline |
unload data from the data matrix to the Sox output file, with each column is windowed using windowSize*getOverlapFactor() samples.
sox | An open sox audiofile, positioned to the point to start writing to. |
Definition at line 182 of file OverlapAdd.H.
|
protected |
The overlapping data is held in this matrix.
TYPE | The Matrix types to input and return |
Definition at line 79 of file OverlapAdd.H.
|
private |
Overlap factor, 0.5 for half.
Definition at line 61 of file OverlapAdd.H.
GTK+ IOStream
Beta
|