|
@@ -1,21 +1,35 @@
|
|
|
%%
|
|
%%
|
|
|
%% *SpHEAR Project
|
|
%% *SpHEAR Project
|
|
|
%%
|
|
%%
|
|
|
-%% sphear_a_power: return array of power for all capsules in a range of frequencies
|
|
|
|
|
|
|
+%% sphear_bf_power_fons: return array of power for all capsules in a range of frequencies
|
|
|
%%
|
|
%%
|
|
|
%% usage:
|
|
%% usage:
|
|
|
-%% [R] = sphear_a_power(fmin, fmax, N, Npre)
|
|
|
|
|
|
|
+%% [R] = sphear_a_power_fons(fmin, fmax, N, Fs, plotz)
|
|
|
%%
|
|
%%
|
|
|
%% fmin, fmax: range of frequencies to consider
|
|
%% fmin, fmax: range of frequencies to consider
|
|
|
-%% Npre: number of samples before the main impulse
|
|
|
|
|
-%% N: total number of samples to analyze
|
|
|
|
|
|
|
+%% N: fft size
|
|
|
|
|
+%% Fs: sampling rate
|
|
|
|
|
+%% plotz: 0 -> calculate cardioid, 1 -> calculate Z
|
|
|
%%
|
|
%%
|
|
|
%% The names of reference microphone impulse response and capsule measurements are
|
|
%% The names of reference microphone impulse response and capsule measurements are
|
|
|
%% currently hardwired into this file, this needs to be fixed and turned into
|
|
%% currently hardwired into this file, this needs to be fixed and turned into
|
|
|
%% input parameters
|
|
%% input parameters
|
|
|
%%
|
|
%%
|
|
|
-%% Copyright Fernando Lopez-Lezcano 2016
|
|
|
|
|
-%%
|
|
|
|
|
|
|
+%% Copyright 2016, Fernando Lopez-Lezcano, All Rights Reserved
|
|
|
|
|
+%% nando@ccrma.stanford.edu
|
|
|
|
|
+%%
|
|
|
|
|
+%% This program is free software: you can redistribute it and/or modify
|
|
|
|
|
+%% it under the terms of the GNU General Public License as published by
|
|
|
|
|
+%% the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
+%% (at your option) any later version.
|
|
|
|
|
+%%
|
|
|
|
|
+%% This program is distributed in the hope that it will be useful,
|
|
|
|
|
+%% but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
+%% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
+%% GNU General Public License for more details.
|
|
|
|
|
+%%
|
|
|
|
|
+%% You should have received a copy of the GNU General Public License
|
|
|
|
|
+%% along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
|
|
|
|
function [B] = sphear_bf_power_fons(fmin, fmax, N, Fs, plotz)
|
|
function [B] = sphear_bf_power_fons(fmin, fmax, N, Fs, plotz)
|
|
|
pkg load signal;
|
|
pkg load signal;
|