SAF
Loading...
Searching...
No Matches
saf_utility_decor.h
Go to the documentation of this file.
1/*
2 * Copyright 2018 Leo McCormack
3 *
4 * Permission to use, copy, modify, and/or distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
9 * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
10 * AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
11 * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
12 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
13 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
14 * PERFORMANCE OF THIS SOFTWARE.
15 */
16
28#ifndef SAF_DECOR_H_INCLUDED
29#define SAF_DECOR_H_INCLUDED
30
31#ifdef __cplusplus
32extern "C" {
33#endif /* __cplusplus */
34
35#include "saf_utility_complex.h"
36
38extern const float __lattice_coeffs_o20[256][20];
40extern const float __lattice_coeffs_o18[256][18];
42extern const float __lattice_coeffs_o16[256][16];
44extern const float __lattice_coeffs_o15[256][15];
46extern const float __lattice_coeffs_o14[256][14];
48extern const float __lattice_coeffs_o12[256][12];
50extern const float __lattice_coeffs_o10[256][10];
52extern const float __lattice_coeffs_o8[256][8];
54extern const float __lattice_coeffs_o6[256][6];
56extern const float __lattice_coeffs_o4[256][4];
58extern const float __lattice_coeffs_o3[256][3];
60extern const float __lattice_coeffs_o2[256][2];
61
84void getDecorrelationDelays(/* Input Arguments */
85 int nChannels,
86 float* freqs,
87 int nFreqs,
88 float fs,
89 int maxTFdelay,
90 int hopSize,
91 /* Output Arguments */
92 int* delayTF);
93
112void synthesiseNoiseReverb(/* Input Arguments */
113 int nChannels,
114 float fs,
115 float* t60,
116 float* fcen_oct,
117 int nBands,
118 int flattenFLAG,
119 /* Output Arguments */
120 float** rir_filt,
121 int* rir_len);
122
161void latticeDecorrelator_create(/* Input Arguments */
162 void** phDecor,
163 float fs,
164 int hopsize,
165 float* freqVector,
166 int nBands,
167 int nCH,
168 int* orders,
169 float* freqCutoffs,
170 int nCutoffs,
171 int maxDelay,
172 int lookupOffset,
173 float enComp_coeff);
174
181void latticeDecorrelator_destroy(/* Input Arguments */
182 void** phDecor);
183
185void latticeDecorrelator_reset(void* hDecor);
186
195void latticeDecorrelator_apply(/* Input Arguments */
196 void* hDecor,
197 float_complex*** inFrame,
198 int nTimeSlots,
199 /* Output Arguments */
200 float_complex*** decorFrame);
201
209void transientDucker_create(/* Input Arguments */
210 void** phDucker,
211 int nCH,
212 int nBands);
213
219void transientDucker_destroy(/* Input Arguments */
220 void** phDucker);
221
236void transientDucker_apply(/* Input Arguments */
237 void* hDucker,
238 float_complex*** inFrame,
239 int nTimeSlots,
240 float alpha,
241 float beta,
242 /* Output Arguments */
243 float_complex*** residualFrame,
244 float_complex*** transientFrame);
245
246
247#ifdef __cplusplus
248}/* extern "C" */
249#endif /* __cplusplus */
250
251#endif /* SAF_DECOR_H_INCLUDED */
252
253 /* doxygen addtogroup Utilities */
void transientDucker_destroy(void **phDucker)
Destroys an instance of the transient ducker.
const float __lattice_coeffs_o3[256][3]
Lattice all-pass filter coeffs (numerator) for 256 channels, 3rd order.
void transientDucker_apply(void *hDucker, float_complex ***inFrame, int nTimeSlots, float alpha, float beta, float_complex ***residualFrame, float_complex ***transientFrame)
Applies the transient ducker, returning either the "ducked" input frame, or the transient part of the...
const float __lattice_coeffs_o14[256][14]
Lattice all-pass filter coeffs (numerator) for 256 channels, 14th order.
const float __lattice_coeffs_o20[256][20]
Lattice all-pass filter coeffs (numerator) for 256 channels, 20th order.
const float __lattice_coeffs_o8[256][8]
Lattice all-pass filter coeffs (numerator) for 256 channels, 8th order.
const float __lattice_coeffs_o4[256][4]
Lattice all-pass filter coeffs (numerator) for 256 channels, 4th order.
const float __lattice_coeffs_o15[256][15]
Lattice all-pass filter coeffs (numerator) for 256 channels, 15th order.
const float __lattice_coeffs_o16[256][16]
Lattice all-pass filter coeffs (numerator) for 256 channels, 16th order.
void latticeDecorrelator_reset(void *hDecor)
Sets the internal buffers to zero.
void latticeDecorrelator_apply(void *hDecor, float_complex ***inFrame, int nTimeSlots, float_complex ***decorFrame)
Applies the lattice all-pass-filter-based multi-channel signal decorrelator.
const float __lattice_coeffs_o10[256][10]
Lattice all-pass filter coeffs (numerator) for 256 channels, 10th order.
const float __lattice_coeffs_o18[256][18]
Lattice all-pass filter coeffs (numerator) for 256 channels, 18th order.
void latticeDecorrelator_create(void **phDecor, float fs, int hopsize, float *freqVector, int nBands, int nCH, int *orders, float *freqCutoffs, int nCutoffs, int maxDelay, int lookupOffset, float enComp_coeff)
Creates an instance of the lattice all-pass-filter-based multi-channel signal decorrelator.
const float __lattice_coeffs_o2[256][2]
Lattice all-pass filter coeffs (numerator) for 256 channels, 2nd order.
void latticeDecorrelator_destroy(void **phDecor)
Destroys an instance of the lattice all-pass-filter-based multi-channel signal decorrelator.
const float __lattice_coeffs_o12[256][12]
Lattice all-pass filter coeffs (numerator) for 256 channels, 12th order.
void synthesiseNoiseReverb(int nChannels, float fs, float *t60, float *fcen_oct, int nBands, int flattenFLAG, float **rir_filt, int *rir_len)
Returns quick and dirty exponentially decaying noise bursts.
const float __lattice_coeffs_o6[256][6]
Lattice all-pass filter coeffs (numerator) for 256 channels, 6th order.
void transientDucker_create(void **phDucker, int nCH, int nBands)
Creates an instance of the transient ducker/extractor.
void getDecorrelationDelays(int nChannels, float *freqs, int nFreqs, float fs, int maxTFdelay, int hopSize, int *delayTF)
Returns delay values for multiple channels per frequency, such that once applied to an input signal (...
Contains wrappers for handling complex numbers across both C99-compliant compilers and Microsoft Visu...