Functions | |
int | rtisila_init (const LTFAT_REAL g[], ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, rtisila_state **p) |
int | rtisila_init_win (LTFAT_FIRWIN win, ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, rtisila_state **p) |
int | rtisila_set_lookahead (rtisila_state *p, ltfat_int lookahead) |
int | rtisila_execute (rtisila_state *p, const LTFAT_REAL s[], LTFAT_COMPLEX c[]) |
int | rtisila_reset (rtisila_state *p) |
int | rtisila_done (rtisila_state **p) |
int | rtisilaoffline (const LTFAT_REAL s[], const LTFAT_REAL g[], ltfat_int L, ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, LTFAT_COMPLEX c[]) |
The implementation follows paper [8].
int rtisila_done | ( | rtisila_state ** | p | ) |
Destroy a RTISILA Plan.
[in] | p | RTISILA Plan |
phaseret_rtisila_done_d(phaseret_rtisila_state_d** p);
phaseret_rtisila_done_s(phaseret_rtisila_state_s** p);
Status code | Description |
---|---|
LTFATERR_SUCCESS | Indicates no error |
LTFATERR_NULLPOINTER | p or *p was NULL. |
int rtisila_execute | ( | rtisila_state * | p, |
const LTFAT_REAL | s[], | ||
LTFAT_COMPLEX | c[] | ||
) |
Execute RTISILA plan for a single time frame
The function is intedned to be called for consecutive stream of frames as it reuses some data from the previous frames stored in the state.
c is lagging behind s by lookahead frames.
M2=M/2+1
[in] | p | RTISILA plan |
[in] | s | Target magnitude, size M2 x W |
[out] | c | Reconstructed coefficients, size M2 x W |
phaseret_rtisila_execute_d(phaseret_rtisila_state_d* p, const double s[], ltfat_complex_d c[]);
phaseret_rtisila_execute_s(phaseret_rtisila_state_s* p, const float s[], ltfat_complex_s c[]);
Status code | Description |
---|---|
LTFATERR_SUCCESS | Indicates no error |
LTFATERR_NULLPOINTER | At least one of the following was NULL: p, s and c |
int rtisila_init | ( | const LTFAT_REAL | g[], |
ltfat_int | gl, | ||
ltfat_int | W, | ||
ltfat_int | a, | ||
ltfat_int | M, | ||
ltfat_int | lookahead, | ||
ltfat_int | maxit, | ||
rtisila_state ** | p | ||
) |
Create a RTISILA state.
[in] | g | Analysis window |
[in] | gl | Window length |
[in] | W | Number of signal channels |
[in] | a | Hop size |
[in] | M | Number of frequency channels (FFT length) |
[in] | lookahead | (Maximum) number of lookahead frames |
[in] | maxit | Number of iterations. The number of per-frame iterations is (lookahead+1) * maxit. |
[out] | p | RTISILA state |
phaseret_rtisila_init_d(const double g[], ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, phaseret_rtisila_state_d** p);
phaseret_rtisila_init_s(const float g[], ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, phaseret_rtisila_state_s** p);
Status code | Description |
---|---|
LTFATERR_SUCCESS | Indicates no error |
LTFATERR_NULLPOINTER | p or g was NULL |
LTFATERR_BADARG | lookahead was a negative number |
LTFATERR_BADSIZE | gl was not positive |
LTFATERR_NOTPOSARG | One of the following was not positive: W, a, M, maxit |
LTFATERR_NOTAFRAME | System is not a frame. |
LTFATERR_NOTPAINLESS | System is not painless. |
LTFATERR_INITFAILED | FFTW plan creation failed |
LTFATERR_NOMEM | Indentifies that heap allocation failed |
int rtisila_init_win | ( | LTFAT_FIRWIN | win, |
ltfat_int | gl, | ||
ltfat_int | W, | ||
ltfat_int | a, | ||
ltfat_int | M, | ||
ltfat_int | lookahead, | ||
ltfat_int | maxit, | ||
rtisila_state ** | p | ||
) |
Create a RTISILA Plan from a window.
[in] | win | Analysis window |
[in] | gl | Window length |
[in] | W | Number of signal channels |
[in] | a | Hop size |
[in] | M | Number of frequency channels (FFT length) |
[in] | lookahead | (Maximum) number of lookahead frames |
[in] | maxit | Number of iterations. The number of per-frame iterations is (lookahead+1) * maxit. |
[out] | p | RTISILA state |
phaseret_rtisila_init_win_d(LTFAT_FIRWIN win, ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, phaseret_rtisila_state_d** p);
phaseret_rtisila_init_win_s(LTFAT_FIRWIN win, ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, phaseret_rtisila_state_s** p);
Status code | Description |
---|---|
LTFATERR_SUCCESS | Indicates no error |
LTFATERR_CANNOTHAPPEN | win is not a valid value from the LTFAT_FIRWIN enum |
LTFATERR_NULLPOINTER | p or g was NULL |
LTFATERR_BADARG | lookahead was a negative number |
LTFATERR_BADSIZE | gl was not positive |
LTFATERR_NOTPOSARG | One of the following was not positive: W, a, M, maxit |
LTFATERR_NOTAFRAME | System is not a frame. |
LTFATERR_NOTPAINLESS | System is not painless. |
LTFATERR_INITFAILED | FFTW plan creation failed |
LTFATERR_NOMEM | Indentifies that heap allocation failed |
int rtisila_reset | ( | rtisila_state * | p | ) |
Reset buffers of rtisila_state
phaseret_rtisila_reset_d(phaseret_rtisila_state_d* p);
phaseret_rtisila_reset_s(phaseret_rtisila_state_s* p);
Status code | Description |
---|---|
LTFATERR_SUCCESS | Indicates no error |
LTFATERR_NULLPOINTER | p or *p was NULL. |
int rtisila_set_lookahead | ( | rtisila_state * | p, |
ltfat_int | lookahead | ||
) |
Change number of lookahead frames
The number of frames can only be less or equal to the number of lookahead frames specified in the init function.
[in] | p | RTISILA Plan |
[in] | lookahead | Number of lookahead frame |
phaseret_rtisila_set_lookahead_d(phaseret_rtisila_state_d* p, ltfat_int lookahead);
phaseret_rtisila_set_lookahead_s(phaseret_rtisila_state_s* p, ltfat_int lookahead);
Status code | Description |
---|---|
LTFATERR_SUCCESS | Indicates no error |
LTFATERR_NULLPOINTER | p was NULL |
LTFATERR_BADARG | lookahead was a negative number or greater than max lookahead |
int rtisilaoffline | ( | const LTFAT_REAL | s[], |
const LTFAT_REAL | g[], | ||
ltfat_int | L, | ||
ltfat_int | gl, | ||
ltfat_int | W, | ||
ltfat_int | a, | ||
ltfat_int | M, | ||
ltfat_int | lookahead, | ||
ltfat_int | maxit, | ||
LTFAT_COMPLEX | c[] | ||
) |
Do RTISI-LA for a complete magnitude spectrogram and compensate delay
This function just creates a plan, executes it for each col in s and c and destroys it.
M2 = M/2 + 1, N = L/a The total number of per-frame iterations is: maxit x (lookahead + 1)
[in] | s | Magnitude spectrogram, size M2 x N x W |
[in] | g | Analysis window, size gl x 1 |
[in] | L | Transform length |
[in] | gl | Window length |
[in] | W | Number of signal channels |
[in] | a | Hop size |
[in] | M | Number of frequency channels (FFT length) |
[in] | lookahead | Number of lookahead frames |
[in] | maxit | Number of per-frame iterations |
[out] | c | Reconstructed coefficients M2 x N array |
phaseret_rtisilaoffline_d(const double s[], const double g[], ltfat_int L, ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, ltfat_complex_d c[]);
phaseret_rtisilaoffline_s(const float s[], const float g[], ltfat_int L, ltfat_int gl, ltfat_int W, ltfat_int a, ltfat_int M, ltfat_int lookahead, ltfat_int maxit, ltfat_complex_s c[]);