Audio_blocks

1 DOC++ generated API

API

2 Defined nodes

Class names in italic are abstract classes. Input, Output and Parameter names in italic are inherited from base class.
 
 

FrameOperation (BufferedNode)

Abstract class for an operation performed on frame(s)
 
NAME TYPE MEANING
Inputs none
Outputs none
Parameters OUTPUTLENGTH
LENGTH
Int
Int
Sets the length of the output vector(s)
Same as OUTPUTLENGTH but can also affect input lengths

 

AudioFile (Node)

This node is deprecated, you should use AudioStream instead
Uses the input stream to produce frames of the right length (also converts raw audio to float)
 
NAME TYPE MEANING
Inputs STREAM IFStream An open stream to read from
Outputs OUTPUT Vector<float> A frame from the stream converted into float
Parameters OUTPUTLENGTH
FRAMEADVANCE
ENCODING
Int
Int
String
The frame size
The frame advance 
valid encodings are: "ULAW", "ALAW", "LIN16", "LIN8"

AudioStream (FrameOperation)

Uses the input stream to produce frames of the right length (also converts raw audio to float). Unlike AudioFile, AudioStream doesn't seek on the stream, so it can be used with pipes and character devices.
 
NAME TYPE MEANING
Inputs STREAM IFStream, FILE* or fd An open stream to read from
Outputs OUTPUT Vector<float> A frame from the stream converted into float
Parameters OUTPUTLENGTH
FRAMEADVANCE
ENCODING
STREAM_TYPE
Int
Int
String
String
The frame size
The frame advance 
valid encodings are: "ULAW", "ALAW", "LIN16", "LIN8"
either STREAM, FILE or fd (defaults to STREAM)

FrameAccumulator (FrameOperation)

Accumulates all valid input frames and adds it to the output buffer
 
NAME TYPE MEANING
Inputs INPUT Vector<float> or not valid Vectors to accumulate
Outputs OUTPUT Buffer<Vector<float> > A buffer containing all valid input vectors
Parameters LENGTH
(CACHEALL)
Int
Int
The length of the frames to accumulate
If specified means to use a growing buffer (instead of a rotating buffer)

Concat (FrameOperation)

Concatenates two vectors together
 
NAME TYPE MEANING
Inputs INPUT1
INPUT2
Vector<float>
Vector<float>
The first vector to concatenate
The second vector to concatenate
Outputs OUTPUT Vector<float> The result of concatenation
Parameters INPUT1LENGTH
INPUT2LENGTH
OUTPUTLENGTH
Int
Int
Int
The length of the first input vector
The length of the second input vector
The length of the output vector

Abs (FrameOperation)

Calculates the absolute value of a vector
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

Add (FrameOperation)

Calculates the sum of two vectors
 
NAME TYPE MEANING
Inputs INPUT1
INPUT2
Vector<float>
Vector<float>
The first input vector
The second input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

Div (FrameOperation)

Divides two vectors
 
NAME TYPE MEANING
Inputs NUM
DEN
Vector<float>
Vector<float>
The first input vector (numerator)
The second input vector (denominator)
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

CMS (FrameOperation)

Perform cepstral mean subtraction using a rectangular window of length (LOKAHEAD+LOOKBACK)
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH
LOOKBACK
LOOKAHEAD
Int
Int
Int
The length of the input and output vectors
Window lag (in frames)
Window look-ahead (in frames)

DCT (FrameOperation)

Calculates the real DCT of a vector
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

Exp (FrameOperation)

Calculates the exponential of a vector
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

FFT (FrameOperation)

Calculates the real FFT of a vector (the real part is stored in the first half of the output and the imaginary part is reversed in the second part)
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

Log (FrameOperation)

Calculates the natural log of a vector
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters LENGTH Int The length of the input and output vectors

Mel (FrameOperation)

Calculates the Mel filter banks from a power spectrum
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters INPUTLENGTH
OUTPUTLENGTH
Int
Int
The length of the input power spectrum
The number of Mel filters

PS (FrameOperation)

Calculates the power spectrum from the result of the (real) FFT. The output length must be half the size of the input length.
 
NAME TYPE MEANING
Inputs INPUT Vector<float> The input vector
Outputs OUTPUT Vector<float> The result
Parameters INPUTLENGTH
OUTPUTLENGTH
Int
Int
The length of the input vector
The lengths of the output vector



Jean-Marc Valin, Université de Sherbrooke
$Date: 2000/03/27 06:34:34 $