SAF
Loading...
Searching...
No Matches
afSTFT_internal.c File Reference

A modified version of afSTFTlib. More...

Go to the source code of this file.

Functions

void afSTFTlib_init (void **handle, int hopSize, int inChannels, int outChannels, int LDmode, int hybridMode)
 Initialises an instance of afSTFTlib [1].
 
void afSTFTlib_channelChange (void *handle, int new_inChannels, int new_outChannels)
 Re-allocates memory to support a change in the number of input/output channels.
 
void afSTFTlib_clearBuffers (void *handle)
 Flushes time-domain buffers with zeros.
 
void afSTFTlib_forward (void *handle, float **inTD, complexVector *outFD)
 Applies the forward afSTFT transform.
 
void afSTFTlib_inverse (void *handle, complexVector *inFD, float **outTD)
 Applies the backward afSTFT transform.
 
void afSTFTlib_free (void *handle)
 Destroys an instance of afSTFTlib.
 
void afHybridInit (void **handle, int hopSize, int inChannels, int outChannels)
 Creates and initialises an instance of the afHybrid filtering structure.
 
void afHybridForward (void *handle, complexVector *FD)
 Forward hybrid-filtering transform.
 
void afHybridInverse (void *handle, complexVector *FD)
 Inverse hybrid-filtering transform.
 
void afHybridFree (void *handle)
 Frees an instnce of the afHybrid filtering structure.
 

Detailed Description

A modified version of afSTFTlib.

The original afSTFT code (by Juha Vilkamo) can be found here: https://github.com/jvilkamo/afSTFT This version is slightly modified to be more in-line with how the rest of SAF is structured. The files afSTFTlib.h/.c act as the interface to afSTFT, which is then implemented in afSTFT_internal.h/.c.

This version also adds functionality to change the number of channels on the fly, flush the run-time buffers with zeros, return the current frequency vector and the current processing delay. It also incorporates SAF utilities (for the vectorisation and FFT).

The afSTFT design is also described in more detail in [1]

See also
[1] Vilkamo, J., & Ba"ckstro"m, T. (2018). Time–Frequency Processing: Methods and Tools. In Parametric Time–Frequency Domain Spatial Audio. John Wiley & Sons.
Author
Juha Vilkamo
Date
08.04.2015
License
MIT

Definition in file afSTFT_internal.c.

Function Documentation

◆ afHybridForward()

void afHybridForward ( void * handle,
complexVector * FD )

Forward hybrid-filtering transform.

Definition at line 523 of file afSTFT_internal.c.

◆ afHybridFree()

void afHybridFree ( void * handle)

Frees an instnce of the afHybrid filtering structure.

Definition at line 655 of file afSTFT_internal.c.

◆ afHybridInit()

void afHybridInit ( void ** handle,
int hopSize,
int inChannels,
int outChannels )

Creates and initialises an instance of the afHybrid filtering structure.

Definition at line 495 of file afSTFT_internal.c.

◆ afHybridInverse()

void afHybridInverse ( void * handle,
complexVector * FD )

Inverse hybrid-filtering transform.

Definition at line 625 of file afSTFT_internal.c.

◆ afSTFTlib_channelChange()

void afSTFTlib_channelChange ( void * handle,
int new_inChannels,
int new_outChannels )

Re-allocates memory to support a change in the number of input/output channels.

Definition at line 158 of file afSTFT_internal.c.

◆ afSTFTlib_clearBuffers()

void afSTFTlib_clearBuffers ( void * handle)

Flushes time-domain buffers with zeros.

Definition at line 213 of file afSTFT_internal.c.

◆ afSTFTlib_forward()

void afSTFTlib_forward ( void * handle,
float ** inTD,
complexVector * outFD )

Applies the forward afSTFT transform.

Definition at line 237 of file afSTFT_internal.c.

◆ afSTFTlib_free()

void afSTFTlib_free ( void * handle)

Destroys an instance of afSTFTlib.

Definition at line 455 of file afSTFT_internal.c.

◆ afSTFTlib_init()

void afSTFTlib_init ( void ** handle,
int hopSize,
int inChannels,
int outChannels,
int LDmode,
int hybridMode )

Initialises an instance of afSTFTlib [1].

Parameters
[in]handle(&) afSTFTlib handle
[in]hopSizeHop size, in samples
[in]inChannelsNumber of input channels
[in]outChannelsNumber of output channels
[in]LDmode'0' disable low-delay mode, '1' enable
[in]hybridMode'0' disable hybrid-mode, '1' enable
See also
[1] Vilkamo, J., & Backstrom, T. (2018). Time–Frequency Processing: Methods and Tools. In Parametric Time-Frequency Domain Spatial Audio. John Wiley & Sons.

Definition at line 57 of file afSTFT_internal.c.

◆ afSTFTlib_inverse()

void afSTFTlib_inverse ( void * handle,
complexVector * inFD,
float ** outTD )

Applies the backward afSTFT transform.

Definition at line 335 of file afSTFT_internal.c.