Skip to content

Commit

Permalink
bugfix release 0.229.1: correct FIR speaker correction
Browse files Browse the repository at this point in the history
  • Loading branch information
gisogrimm committed Feb 1, 2023
1 parent f736666 commit a2fd4f9
Show file tree
Hide file tree
Showing 11 changed files with 68 additions and 5 deletions.
1 change: 1 addition & 0 deletions changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
0.229.1: Correct speaker correction filter length
0.229: Added transportramp plugin, bugfixes in FIR speaker correction and LSL handling in Qualisys interface
0.228.3: Bugfix and documentation of Matlab/Octave tools
0.228.2: Add additional mode to pos2osc
Expand Down
2 changes: 1 addition & 1 deletion config.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# variables:
VERSION=0.229.0
VERSION=0.229.1

ARCH=$(shell uname -m)

Expand Down
4 changes: 4 additions & 0 deletions doc/news/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@ <h2>Toolbox for acoustic scene creation and rendering</h2>

<h2>Latest news</h2><br/>

<time>February 1, 2023</time>
<h3>TASCAR 0.229.1 released</h3>
<p>Correct FIR filter length in speaker correction (affects FIR speaker correction only, not related to calibration wizard).</p> <br/>

<time>January 27, 2023</time>
<h3>TASCAR 0.229 released</h3>
<p>Added plugin to generate ramps on changes of transport state, bugfix of FIR loudspeaker frequency correction, bugfix and improvement of LSL handling in the interface to Qualisys track manager, many minor bugfixes and improvements.</p> <br/>
Expand Down
38 changes: 37 additions & 1 deletion libtascar/src/ola_unit_tests.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ TEST(overlap_save_t, filter)
ASSERT_NEAR( 0.0f, d[3], 1e-7f );
}


TEST(partitioned_conv_t, filter)
{
TASCAR::partitioned_conv_t ola(50,4);
Expand Down Expand Up @@ -70,6 +69,43 @@ TEST(partitioned_conv_t, filter)
ASSERT_NEAR( 0.0f, d[3], 1e-7f );
}

TEST(partitioned_conv_t, filterlong)
{
TASCAR::partitioned_conv_t ola(50,4);
EXPECT_EQ(13u,ola.get_partitions());
TASCAR::wave_t irs(14);
irs[1] = 0.5;
irs[2] = 0.5;
irs[12] = 0.5;
irs[13] = 0.5;
ola.set_irs( irs );
TASCAR::wave_t d(4);
d[0] = 1.0;
ola.process( d, d, false );
ASSERT_NEAR( 0.0f, d[0], 1e-9f );
ASSERT_NEAR( 0.5f, d[1], 1e-9f );
ASSERT_NEAR( 0.5f, d[2], 1e-9f );
ASSERT_NEAR( 0.0f, d[3], 1e-7f );
d.clear();
ola.process( d, d, false );
ASSERT_NEAR( 0.0f, d[0], 1e-9f );
ASSERT_NEAR( 0.0f, d[1], 1e-9f );
ASSERT_NEAR( 0.0f, d[2], 1e-9f );
ASSERT_NEAR( 0.0f, d[3], 1e-7f );
d.clear();
ola.process( d, d, false );
ASSERT_NEAR( 0.0f, d[0], 1e-9f );
ASSERT_NEAR( 0.0f, d[1], 1e-9f );
ASSERT_NEAR( 0.0f, d[2], 1e-9f );
ASSERT_NEAR( 0.0f, d[3], 1e-7f );
d.clear();
ola.process( d, d, false );
ASSERT_NEAR( 0.5f, d[0], 1e-9f );
ASSERT_NEAR( 0.5f, d[1], 1e-9f );
ASSERT_NEAR( 0.0f, d[2], 1e-9f );
ASSERT_NEAR( 0.0f, d[3], 1e-7f );
}

// Local Variables:
// compile-command: "make -C ../.. unit-tests"
// coding: utf-8-unix
Expand Down
4 changes: 2 additions & 2 deletions libtascar/src/speakerarray.cc
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ void spk_array_t::configure()
// speaker correction filter:
for(auto& spk : *this) {
if(spk.compB.size() > 0) {
spk.comp = new TASCAR::partitioned_conv_t(n_fragment + 1, n_fragment);
spk.comp->set_irs(spk.compB);
spk.comp = new TASCAR::partitioned_conv_t(spk.compB.size(), n_fragment);
spk.comp->set_irs(TASCAR::wave_t(spk.compB));
}
if(spk.eqstages > 0) {
float fmin = 1.0f;
Expand Down
2 changes: 1 addition & 1 deletion test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ TESTS = test_snd_pink_diffuse test_ir1 test_ir2 test_ir3 test_ir4 \
test_ir_apfilter_lowpass test_snd_hoa2d_fuma_hos \
test_ir_material_carpet test_ir_material_window \
test_ir1_spkcalib test_snd_spkcorr0 test_snd_spkcorr70 \
test_snd_nospkcorr
test_snd_nospkcorr test_snd_spkcorr_long

#test_ir_simplefdn_optimt60

Expand Down
Binary file added test/dirac.wav
Binary file not shown.
1 change: 1 addition & 0 deletions test/dirac.wav.license
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CC0
Binary file added test/expected_snd_spkcorr_long.wav
Binary file not shown.
5 changes: 5 additions & 0 deletions test/spkcal_long.spk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<layout calibfor="type:nsp">
<speaker compB="0.00234498 0.00616021 0.00163136 0.00845384 0.00249319 0.00686109 0.00178612 0.0126013 -0.00321857 0.0141924 -0.00159564 0.014379 -0.00189624 0.0126871 0.00306029 0.00969714 0.00306046 0.0113047 0.00350337 0.011224 0.00265131 0.0113605 0.00781876 0.00372464 0.0129071 0.00386095 0.0125542 0.00228185 0.0138104 0.00477937 0.0119151 0.00138497 0.018594 -0.000386543 0.0148249 0.00118671 0.0202633 -0.00313187 0.0130541 0.0135896 1.20332e-05 0.0149015 0.00593115 0.00903231 0.0105195 0.00440259 0.0115005 0.0104226 0.00238958 0.0141937 0.00359398 0.0154152 -0.00364489 0.0205253 -0.000673266 0.0131084 0.00205094 0.0133668 0.00443352 0.00888196 -0.000435656 0.0249145 -0.016197 0.0252764 -0.00409158 0.0127124 -0.000667757 0.0151267 -0.00725669 0.0235117 -0.014015 0.0179762 0.00190233 0.00459337 -0.00130642 0.0143729 0.000514912 -0.00621567 0.0202049 -0.00723582 0.000721241 0.0147852 -0.0123761 0.0131578 0.000415199 -0.00768392 0.0152598 -0.00721357 -0.000187575 0.00426557 0.00120314 -0.00470654 0.00118159 0.00243318 -0.00328355 -0.0034217 0.00107737 -0.000256492 -0.00607881 -0.00260692 0.00210762 -0.00685106 -0.00651457 0.00571338 -0.0160962 0.00679274 -0.0108416 -0.0083379 0.00777042 -0.0204588 0.00161251 -0.0051893 -0.00865275 -0.00938645 -0.000486276 -0.0148549 0.0011078 -0.0190378 0.00286146 -0.0159073 -0.00316994 -0.0177559 0.00335543 -0.0191936 -0.00774588 -0.00755207 -0.0093687 -0.0154654 -0.00665679 -0.00947423 -0.0151293 -0.00752217 -0.015433 -0.00420497 -0.0214237 -0.00305197 -0.0192717 -0.00373192 -0.0222897 -0.00418036 -0.0164564 -0.0103965 -0.0170199 -0.00628658 -0.0182271 -0.010008 -0.015222 -0.0101094 -0.0151539 -0.0133516 -0.0107198 -0.0165491 -0.0083797 -0.0192784 -0.00679446 -0.017392 -0.010404 -0.0150596 -0.0108885 -0.0137127 -0.0124734 -0.0133758 -0.0115598 -0.00955663 -0.0215047 0.00186654 -0.0249363 -0.00200836 -0.0200522 -0.000180129 -0.0244568 0.00198216 -0.0211671 -0.00110651 -0.0179607 -0.00520254 -0.00903297 -0.0132213 -0.00408033 -0.0135435 -0.0012639 -0.0179888 0.00465436 -0.0199906 0.00595333 -0.018909 0.00491603 -0.0145553 0.00250074 -0.0133102 0.00464979 -0.0120965 0.00162923 -0.00517715 -0.0030143 -0.000976745 -0.00260507 -0.00100368 -0.00242736 0.00524172 -0.00999363 0.0132173 -0.0107432 0.0112996 -0.00521711 0.00823748 -0.00117128 0.00820422 -0.00158671 0.0116174 -0.000731991 0.00904827 0.00676814 0.00313547 0.0129521 0.00276109 0.0119555 0.00614989 0.0135959 0.0050974 0.0134168 0.0122758 0.00856103 0.0131599 0.014615 0.0108206 0.0141936 0.0143131 0.0157682 0.0129889 0.0163452 0.0180564 0.0120413 0.0228802 0.010891 0.0231379 0.015826 0.0184318 0.0188449 0.0226211 0.0143852 0.0252852 0.0164661 0.0260912 0.0132523 0.0315615 0.0114511 0.0327805 0.0116492 0.0326436 0.014953 0.030389 0.0155922 0.0313176 0.0193749 0.0235529 0.0277723 0.0199781 0.0283423 0.0201726 0.0286111 0.0224487 0.0233807 0.0283122 0.0205911 0.0270815 0.0247895 0.021084 0.0297447 0.0210007 0.021529 0.0326002 0.0140142 0.0314097 0.0165798 0.0322873 0.0134829 0.0277728 0.0228756 0.0219291 0.0159223 0.0323825 0.00965842 0.0310994 0.00730997 0.0362167 0.00279607 0.0303425 0.0123391 0.0189806 0.0199955 0.00896931 0.025797 0.00631442 0.0213229 0.00734384 0.0209289 0.00501223 0.0170477 0.00758672 0.0138109 0.00460513 0.0146741 0.000848714 0.0140823 0.00149378 0.003823 0.0129763 -0.00989185 0.0165739 -0.011515 0.0131994 -0.013478 0.0117727 -0.0151191 0.00840137 -0.0155644 0.00456549 -0.016386 0.00267784 -0.0202051 0.000397851 -0.0171673 -0.0112407 -0.0112196 -0.0165 -0.0132061 -0.0214247 -0.00976571 -0.027738 -0.0126358 -0.0277673 -0.0146068 -0.0326688 -0.0155613 -0.0335537 -0.0201282 -0.0331239 -0.0272565 -0.0279685 -0.0352854 -0.0287846 -0.0377119 -0.0252957 -0.0517188 -0.0164125 -0.0578163 -0.019801 -0.059303 -0.0205441 -0.0604745 -0.027914 -0.0565548 -0.0310316 -0.0617515 -0.0297584 -0.0636288 -0.0334017 -0.0631301 -0.0388655 -0.0575748 -0.0505208 -0.0483771 -0.0634488 -0.0372495 -0.0753233 -0.0373216 -0.0658985 -0.053483 -0.0605845 -0.0482673 -0.0721908 -0.0451924 -0.0692846 -0.0511178 -0.0666305 -0.0572216 -0.058298 -0.0634262 -0.0628999 -0.0542947 -0.0658904 -0.0628939 -0.0555276 -0.0640659 -0.0635312 -0.0554925 -0.065232 -0.0595096 -0.0559371 -0.0705101 -0.0460927 -0.0699749 -0.053844 -0.0616737 -0.0501985 -0.0710248 -0.0392766 -0.0749422 -0.0349916 -0.0742953 -0.0372154 -0.0652714 -0.0402938 -0.0623275 -0.0422852 -0.0486279 -0.0526908 -0.0426153 -0.0455677 -0.0432026 -0.0462497 -0.0361933 -0.0439258 -0.0310618 -0.0518061 -0.0117037 -0.0582094 -0.0112033 -0.0440688 -0.0185638 -0.0329379 -0.0163826 -0.0351929 -0.0036718 -0.0300607 -0.0162911 -0.00506585 -0.0186943 -0.0100033 -0.0045164 -0.00433444 -0.00276472 -0.00882062 0.0192285 -0.00970542 0.0102956 0.0143161 0.0111954 0.00615711 0.0354647 -0.00367331 0.0507465 -0.00107487 0.048088 0.0205313 0.0424939 0.0248055 0.0525301 0.0414271 0.0273224 0.0828964 0.014444 0.080047 0.0514504 0.0478886 0.0833329 0.0542061 0.0632826 0.0942454 0.0484726 0.0984525 0.0738904 0.0761982 0.108269 0.0649795 0.108049 0.0979703 0.0893584 0.0997893 0.12681 0.0778565 0.125032 0.123788 0.0904556 0.140028 0.112954 0.123687 0.127361 0.130355 0.125186 0.156301 0.0817921 0.227873 0.0396353 0.219695 0.112478 0.149899 0.144917 0.172922 0.12367 0.174743 0.14358 0.17768 0.128891 0.181141 0.175437 0.112996 0.224331 0.12426 0.177482 0.162887 0.191225 0.109222 0.241454 0.107049 0.202206 0.139516 0.21633 0.0897996 0.244 0.119692 0.159932 0.212853 0.0780164 0.260853 0.0679022 0.206497 0.155815 0.125258 0.162052 0.172637 0.0929541 0.195791 0.0934703 0.174296 0.0922823 0.163551 0.0943178 0.141618 0.0917139 0.137881 0.0658177 0.154638 0.0117484 0.194834 -0.0250456 0.134833 0.0849209 -0.000157133 0.0837415 0.100175 -0.0527097 0.0624691 0.0900449 -0.0625773 -0.0352227 0.175746 -0.215176 0.0732602 -0.0118535 -0.096451 -0.0409515 -0.0338066 -0.154493 0.0766578 -0.384305 0.235572 -0.442823 0.110857 -0.392651 0.113774 -0.467932 0.0447906 -0.451568 0.168367 -0.898473 0.612676 -1.19033 0.524557 -0.962623 0.175702 -0.749983 0.101265 -1.12751 0.770944 -1.89084 0.961817 -1.43206 -0.0556382 -0.49113 -0.827785 -0.075981 -0.984231 -0.572597 -0.0943698 -1.33906 -0.396958 -0.486371 -0.436754 -2.2649 1.77535 -2.79842 0.232878 -2.71599 3.97936 -1.39968 -3.68617 6.6975 -2.87064 -0.350935 2.10996 0.849126 -1.0632 1.03994 -0.583161 0.799666 -0.418887 0.240859 -0.372026 0.952631 -1.46485 0.153858 0.703562 -0.960706 0.494453 -0.648609 0.475566 -0.311606 -0.363529 0.111835 0.35018 -0.911365 0.331455 -0.493805 0.384642 -0.480851 0.159248 0.186337 -0.178299 0.017001 0.00246391 0.209753 -0.166711 0.108915 0.07724 0.0382574 -0.0874692 0.394628 -0.195193 0.50841 -0.145086 0.326094 0.110995 0.140292 0.280304 0.167648 0.154515 0.338052 0.0618037 0.177037 0.292488 0.0779285 0.170549 0.126853 0.287625 -0.0896333 0.426705 -0.00755146 0.292562 0.126001 0.117062 0.180215 0.191563 0.0120041 0.222073 0.13227 0.071221 0.164429 0.0837963 0.243089 -0.00928511 0.245305 0.0373377 0.194342 0.05251 0.139475 0.163228 0.0938879 0.054366 0.218038 -0.0130915 0.163472 0.0424489 0.125848 0.0700096 0.0608891 0.127118 0.0661457 0.113114 0.0695045 0.118636 0.0413039 0.0971217 0.0896213 0.0415464 0.065775 0.144522 -0.0629785 0.165837 0.0236497 0.0412819 0.0772326 0.0447508 0.026962 0.0775844 -0.0128173 0.11515 -0.0340456 0.0802462 0.012308 0.00475107 0.0530451 -0.0168247 0.0395547 0.0116357 0.0183338 0.015797 0.0347533 -0.00391419 0.0278486 -0.00162638 0.0323019 -0.0538102 0.0482525 -0.0313514 0.00652032 -0.022522 0.0055409 0.00336929 -0.0502177 0.0147967 -0.0215952 -0.0355758 -0.0031082 -0.0238363 -0.0216029 0.0185424 -0.0767017 0.0668503 -0.0832199 0.0221555 -0.0515232 -0.0123844 -0.0246469 -0.0427687 -0.026912 -0.0212615 -0.0267428 -0.059218 -0.00543819 -0.0564389 -0.0310543 -0.073535 -0.00568745 -0.0891475 0.00272826 -0.104275 0.0292779 -0.0811534 -0.0373445 -0.0257585 -0.0436125 -0.059342 -0.0352951 -0.0480107 -0.0434716 -0.0461396 -0.0477782 -0.0290098 -0.0642871 -0.023997 -0.0748308 -0.0214521 -0.0780756 -0.034508 -0.0574093 -0.0419042 -0.0567182 -0.0295591 -0.0556255 -0.0348025 -0.0471421 -0.040089 -0.0431277 -0.0457412 -0.0274295 -0.0551471 -0.0223284 -0.0393677 -0.0368734 -0.0367778 -0.0342097 -0.0406046 -0.0381373 -0.0441304 -0.0238831 -0.0539571 -0.0206125 -0.0428907 -0.0247703 -0.0426717 -0.0235947 -0.0401747 -0.0205981 -0.0493883 -0.00551518 -0.0474925 -0.00926098 -0.0360364 -0.00658965 -0.0405438 -0.0107675 -0.0264755 -0.02829 -0.020672 -0.0232531 -0.0239516 -0.0162301 -0.0252394 -0.0158602 -0.0101129 -0.0303658 -0.00363699 -0.0185456 -0.0148264 -0.00531189 -0.0127033 -0.00195839 -0.00365408 -0.00817986 0.00550785 -0.00836798 0.00197504 -0.00493071 0.00212406 -0.00239617 0.000370131 0.00573011 -0.00787314 0.015612 -0.00829669 0.00109581 0.00931979 -0.00818413 0.00592208 0.00367537 0.00116492 0.0141251 -0.00362173 0.0217372 0.00265819 0.0134457 0.00730554 0.0160191 0.00710137 0.0145687 0.00739916 0.0223355 0.00266125 0.0222347 0.00533929 0.0204291 0.00461088 0.0149428 0.0137284 0.006993 0.0154985 0.0132972 0.00976062 0.0162184 0.0104187 0.0115016 0.0143258 0.00923118 0.0149257 0.00777454 0.0145379 0.00880658 0.0131367 0.00645448 0.0091759 0.00947605 0.00248856 0.00822522 0.00366547 0.0132113 -0.00144906 0.0217884 0.00232299 0.0200884 0.00911246 0.0229193 0.00591643 0.0288389 -0.000185214 0.0379679 -0.00213685 0.0344693 0.00458506 0.031074 0.00838564 0.0194197 0.0211266 0.00751307 0.0242639 0.00473509 0.0253265 0.00831125 0.0185055 0.0106093 0.0228927 0.00232598 0.0239887 0.00880664 0.0177549 0.00714462 0.022209 0.0100053 0.0162597 0.0193155 0.00683876 0.0225352 0.00240934 0.0190801 0.00339923 0.0169398 0.00722078 0.0134021 0.00899561 0.0225294 -0.00099934 0.029309 0.000105809 0.023626 0.00509941 0.0176102 0.0116679 0.0121003 0.019636 0.0037646 0.0247184 0.00337218 0.0191776 0.000489547 0.0195681 -0.00497158 0.0169582 -0.00777548 0.0150727 -0.00657899 0.00771146 -0.00158433 0.00416275 -0.0020426 -0.00148008 0.00490901 -0.00409718 0.0012487 -0.00142161 0.00970909 -0.01132 0.0112737 -0.010121 0.0108714 -0.00936445 0.000574184 -0.000559479 0.000515132 -0.00558496 -0.00152131 0.0035789 -0.0045722 -0.00283723 -0.000138631 -0.00329468 -0.00334967 -0.00280762 -0.00518359 0.00166211 -0.00886934 0.00040048 -0.00720415 0.00043137 -0.00477749 -0.00773447 6.1921e-05 -0.00580656 -0.0102819 -0.0017493 -0.0103463 -0.00716393 -0.00773683 -0.0129257 -0.00238501 -0.0184986 -0.00349447 -0.015144 -0.00498402 -0.0160298 -0.00626652 -0.0153673 -0.00609831 -0.0184338 -0.00643399 -0.019002 -0.00133287 -0.0255792 -0.00319294 -0.0167976 -0.00698742 -0.0169461 -0.00711403 -0.0135747 -0.0071837 -0.0179069 -0.00974702 -0.0057023 -0.0227398 -0.00139008 -0.021056 -3.82894e-05 -0.0262185 0.00266739 "/>

</layout>
16 changes: 16 additions & 0 deletions test/test_snd_spkcorr_long.tsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0"?>
<!--
basic test: sound propagation, 1m
-->
<session license="CC-0">
<scene>
<source>
<sound x="1" delayline="false" airabsorption="false">
<plugins>
<sndfile name="dirac.wav" levelmode="calib" level="94"/>
</plugins>
</sound>
</source>
<receiver type="nsp" layout="spkcal_long.spk"/>
</scene>
</session>

0 comments on commit a2fd4f9

Please sign in to comment.