1function p = eq_defaults 2 3%% 4% Copyright (c) 2016, Intel Corporation 5% All rights reserved. 6% 7% Redistribution and use in source and binary forms, with or without 8% modification, are permitted provided that the following conditions are met: 9% * Redistributions of source code must retain the above copyright 10% notice, this list of conditions and the following disclaimer. 11% * Redistributions in binary form must reproduce the above copyright 12% notice, this list of conditions and the following disclaimer in the 13% documentation and/or other materials provided with the distribution. 14% * Neither the name of the Intel Corporation nor the 15% names of its contributors may be used to endorse or promote products 16% derived from this software without specific prior written permission. 17% 18% THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 19% AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 20% IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 21% ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 22% LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 23% CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 24% SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 25% INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 26% CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 27% ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 28% POSSIBILITY OF SUCH DAMAGE. 29% 30% Author: Seppo Ingalsuo <seppo.ingalsuo@linux.intel.com> 31% 32 33% Misc 34p.plot_figs = 0; 35p.fn = 'configuration.txt'; 36p.fs = 48e3; 37p.f_align = 997; 38p.db_align = 0; 39p.logsmooth_plot = 1/3; % Smooth over 1/3 octaves 40p.logsmooth_eq = 1/3; % Smooth over 1/3 octaves 41p.np_fine = 5000; % 5000 point design grid 42 43% Parametric EQ IDs 44p.PEQ_HP1 = 1; p.PEQ_HP2 = 2; p.PEQ_LP1 = 3; p.PEQ_LP2 = 4; 45p.PEQ_LS1 = 5; p.PEQ_LS2 = 6; p.PEQ_HS1 = 7; p.PEQ_HS2 = 8; 46p.PEQ_PN2 = 9; p.PEQ_LP4 = 10; p.PEQ_HP4 = 11; p.PEQ_LP2G = 12; 47p.PEQ_HP2G = 13; p.PEQ_BP2 = 14; p.PEQ_NC2 = 15; p.PEQ_LS2G = 16; 48p.PEQ_HS2G = 17; 49 50% FIR constraints 51p.fmin_fir = 200; % 52p.fmax_fir = 15e3; % 53p.amax_fir = 20; 54p.amin_fir = -20; 55p.fir_beta = 8; 56p.fir_length = 63; 57p.fir_minph = 0; % 0 = linear phase, 1 = minimum phase 58% Adjust fmin_fir, fmax_fir automatically for least gain loss in FIR 59p.fir_autoband = 1; 60p.enable_fir = 0; 61 62% IIR conf 63p.iir_biquads_max = 8; 64p.enable_iir = 0; 65 66% Initialize other fields those are computed later to allow use of struct 67% arrays 68p.raw_f = [10 100e3]; 69p.raw_m_db = [0 0]; 70p.raw_gd_s = []; 71p.f = []; 72p.m_db = []; 73p.gd_s = []; 74p.num_responses = 0; 75p.m_db_s = []; 76p.gd_s_s = []; 77p.logsmooth_noct = 0; 78p.t_z = []; 79p.t_p = []; 80p.t_k = []; 81p.t_db = []; 82p.m_db_abs = 0; 83p.m_db_offs = 0; 84p.raw_m_noalign_db = []; 85p.err_db = []; 86p.p_z = []; 87p.p_p = []; 88p.p_k = []; 89p.iir_eq_db = []; 90p.iir_eq_ph = []; 91p.iir_eq_gd = []; 92p.err2_db = []; 93p.t_fir_db = []; 94p.b_fir = []; 95p.fir_eq_db = []; 96p.fir_eq_ph = []; 97p.fir_eq_gd = []; 98p.tot_eq_db = []; 99p.tot_eq_gd = []; 100p.m_eqd = []; 101p.gd_eqd = []; 102p.m_eq_loss = 0; 103p.m_eqd_abs = 0; 104p.sim_m_db = []; 105p.parametric_target_response = []; 106p.target_f = [10 100e3]; 107p.target_m_db = [0 0]; 108p.fir_compensate_iir = 1; 109p.p_fmin = 10; 110p.p_fmax = 30e3; 111p.name = ''; 112p.norm_type = 'loudness'; % loudness/peak/1k 113p.norm_offs_db = 0; 114 115end 116