Commit Graph

4 Commits

Author SHA1 Message Date
Seppo Ingalsuo deb7849f76 Tools: Fixes to TDFB tune and test scripts
Matlab does not support isfile(), so another command is used to
check if a file exists. The new way works both in Octave and Matlab.

The bf_defaults.m is fixed to properly initialize empty strings
to cell arrays. It's needed with minimal command like usage
as shown in SOF Docs examples.

In bf_design.m the num_filters determination is moved after array
helpers because other than line and circle do not use mic_n parameter.
The bug resulted to zero num_filters.

In bf_merge.m the unused bf3 and bf4 are removed.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 46d52efdd8 Tools: Tune: Add multiple angles and beam off settings add to TDFB blob
This patch essentially adds support for steer_az/steer_el to be
vector instead of scalar. The beam off preset is added by default
automatically for N-channel in N-channel out configurations. Microphone
(x,y,z) coordinates are passed in to blob for direction of arrival
reporting.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2021-07-14 15:59:24 +01:00
Seppo Ingalsuo 0963d88ba3 Tools: Tune: TDFB: Simplify typical usage of bf_design(), bf_export()
The bf_defaults() now sets the default directory locations for
for bf_export() so it does not need to be set in every script.

Also the defaults for input channels and output mixing are set to
that in typical design they do not need to be set.

The default distance for look direction is set to 5.0m so it is better
guaranteed in far field for even relatively large arrays. The far field
assumes planar sound waves. The design equations do not fully support
near field with spherical waves.

The FFT length is changed to 1024 to enable design of longer filter bank
filters. There's no compromise in performance for for e.g. length 64.

The incorrect use of mic_n (number of microphones) is replaced by
num_filters. It's possible define beamformer that ignores some mic
channels so these are not the same.

The automatic systematic design file names are now created for all array
types, not just line.

The script is made more flexible to run without need to export data and
clutter just to quickly interactively check from plots what kind of
beam pattern and other characteristic some array, e.g. circular with
some radius and mic count gives.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-10-30 13:45:29 +00:00
Seppo Ingalsuo d9de74b231 Tools: Tune: Add TDFB configuration tool
This patch adds the tool for creating beamformer configurations. The
microphone array geometry and beam angle (azimuth, elevation) need
to be specified. See the example scripts and sample array helper
functions.

The FIR blob quantize function needed a minor change to prevent strip
of trailing zero coefficients. The beamformer filter bank needs to use
equal length filters.

Signed-off-by: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com>
2020-09-13 15:52:24 +01:00