35 *phBeam = (
void*)pData;
81 pData->
fs = sampleRate;
98 const float *
const * inputs,
99 float*
const*
const outputs,
106 int ch, i, bi, nSH, mixWithPreviousFLAG;
110 int nBeams, beamOrder;
122 for(i=0; i <
SAF_MIN(nSH, nInputs); i++)
141 mixWithPreviousFLAG = 0;
142 for(bi=0; bi<nBeams; bi++){
153 mixWithPreviousFLAG = 1;
164 if(mixWithPreviousFLAG){
171 for (i=0; i < nBeams; i++){
186 for(ch = 0; ch <
SAF_MIN(nBeams, nOutputs); ch++)
188 for (; ch < nOutputs; ch++)
192 for (ch=0; ch < nOutputs; ch++)
224 if(newAzi_deg>180.0f)
225 newAzi_deg = -360.0f + newAzi_deg;
226 newAzi_deg =
SAF_MAX(newAzi_deg, -180.0f);
227 newAzi_deg =
SAF_MIN(newAzi_deg, 180.0f);
235 newElev_deg =
SAF_MAX(newElev_deg, -90.0f);
236 newElev_deg =
SAF_MIN(newElev_deg, 90.0f);
245 if(pData->
nBeams != new_nBeams){
246 pData->
nBeams = new_nBeams;
326 return (
int)pData->
norm;
#define MAX_SH_ORDER
Maximum supported Ambisonic order.
@ STATIC_BEAM_TYPE_MAX_EV
hyper-cardioid with max_rE weighting
@ STATIC_BEAM_TYPE_HYPERCARDIOID
hyper-cardioid
@ STATIC_BEAM_TYPE_CARDIOID
cardioid
NORM_TYPES
Available Ambisonic normalisation conventions.
@ NORM_SN3D
Schmidt semi-normalisation (SN3D)
@ NORM_FUMA
(Legacy) Furse-Malham scaling
@ NORM_N3D
orthonormalised (N3D)
CH_ORDER
Available Ambisonic channel ordering conventions.
@ CH_ACN
Ambisonic Channel Numbering (ACN)
@ CH_FUMA
(Legacy) Furse-Malham/B-format (WXYZ)
#define MAX_NUM_SH_SIGNALS
Maximum number of spherical harmonic components/signals supported.
@ SH_ORDER_FIRST
First-order (4 channels)
void convertHOAChannelConvention(float *insig, int order, int signalLength, HOA_CH_ORDER inConvention, HOA_CH_ORDER outConvention)
Converts an Ambisonic signal from one channel ordering convention to another.
void convertHOANormConvention(float *insig, int order, int signalLength, HOA_NORM inConvention, HOA_NORM outConvention)
Converts an Ambisonic signal from one normalisation convention to another.
@ HOA_CH_ORDER_FUMA
Furse-Malham (FuMa) convention, often used by older recordings.
@ HOA_CH_ORDER_ACN
Ambisonic Channel numbering (ACN) convention, which is employed by all spherical harmonic related fun...
@ HOA_NORM_FUMA
Furse-Malham (FuMa) convention.
@ HOA_NORM_SN3D
Schmidt semi-normalisation (SN3D) convention, as used by the AmbiX standard.
@ HOA_NORM_N3D
Orthonormalised (N3D) convention, which is the default convention used by SAF.
#define ORDER2NSH(order)
Converts spherical harmonic order to number of spherical harmonic components i.e: (order+1)^2.
void beamWeightsCardioid2Spherical(int N, float *b_n)
Generates spherical coefficients for generating cardioid beampatterns.
void beamWeightsMaxEV(int N, float *b_n)
Generates beamweights in the SHD for maximum energy-vector beampatterns.
void rotateAxisCoeffsReal(int order, float *c_n, float theta_0, float phi_0, float *c_nm)
Generates spherical coefficients for a rotated axisymmetric pattern (REAL)
void beamWeightsHypercardioid2Spherical(int N, float *b_n)
Generates beamweights in the SHD for hypercardioid beampatterns.
#define SAF_PI
pi constant (single precision)
void utility_svvmul(const float *a, const float *b, const int len, float *c)
Single-precision, element-wise vector-vector multiplication i.e.
#define SAF_MAX(a, b)
Returns the maximum of the two values.
const float __default_LScoords128_deg[128][2]
Default Loudspeaker directions [azimuth, Elevation] - to replace above!
void utility_svvcopy(const float *a, const int len, float *c)
Single-precision, vector-vector copy, i.e.
#define SAF_MIN(a, b)
Returns the minimum of the two values.
void * malloc1d(size_t dim1_data_size)
1-D malloc (same as malloc, but with error checking)