-
Notifications
You must be signed in to change notification settings - Fork 39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NFC-HOA orders for time-domain driving functions #56
Comments
That is another good point. It would be a very good idea as we would have a big problem otherwise.
>> conf = SFS_config;
>> sound_field_imp_nfchoa([-2 2],[-2 2],0,[0 -1 0],'pw',300,conf)
Error using driving_function_imp_nfchoa (line 157)
DRIVING_FUNCTION_IMP_NFCHOA: the given number of secondary sources (64) cannot be subsampled to 62 driving signals. Choose a NFC-HOA order that is a multiple of 30.
Error in sound_field_imp_nfchoa (line 94)
d = driving_function_imp_nfchoa(x0,xs,src,conf); As you can see the numbers in the error message are now also broken, but the more important thing is that for band-limited NFC-HOA we cannot met the desired multiple condition. We have 64 secondary sources, which corresponds to an order of 31 (instead of 32 as it was before we corrected If you have an idea how to fix this, it would be great if you could push a new branch and create a pull request for this. |
I created a branch conf = SFS_config;
conf.secondary_sources.number = 64;
conf.driving_functions = 'default';
conf.plot.usenormalisation = false;
conf.plot.usedb = false;
x0 = secondary_source_positions(conf);
X = [-2 2];
Y = [-2 2];
Z = 0;
xs = [0,-1,0];
src = 'pw';
t = 200;
pulse = transpose(hann_window(5,5,10));
conf.nfchoa.order = [];
d = driving_function_imp_nfchoa(x0,xs,src,conf);
d = convolution(d,pulse);
sound_field_imp(X,Y,Z,x0,'ps',d,t,conf);
caxis([-1 1]/4) conf.nfchoa.order = 8;
d = driving_function_imp_nfchoa(x0,xs,src,conf);
d = convolution(d,pulse);
sound_field_imp(X,Y,Z,x0,'ps',d,t,conf);
caxis([-1 1]/4) conf.nfchoa.order = 200;
d = driving_function_imp_nfchoa(x0,xs,src,conf);
d = convolution(d,pulse);
sound_field_imp(X,Y,Z,x0,'ps',d,t,conf);
caxis([-1 1]/4) In the above examples, the bilinear transform was used to convert the poles and zeros in the Laplace domain to the z-domain. When the matched z-transform is used for orders greater than 84, there are some noise-like components in the synthesized field. conf.driving_functions = 'matchedz';
conf.nfchoa.order = 85;
d = driving_function_imp_nfchoa(x0,xs,src,conf);
d = convolution(d,pulse);
sound_field_imp(X,Y,Z,x0,'ps',d,t,conf);
caxis([-1 1]/4) |
Interesting, it looks a little bit similar to https://github.com/hagenw/phd-thesis/tree/master/03_sound_field_errors_and_their_perceptual_relevance/fig3_13 |
You are right. The maximum order in you simulation (256) is also much greater than the anti-alliasing order (31), the results are supposed to be similar to mine (order of 200). In fact, the result is nearly identical even if the order is increased up to 500. At this point, I am not sure if the simulation results are correct for very high orders (above 85). As mentioned in #57, there are some suspicious behavior in the driving functions. I think we first have to check the zeros of the spherical Hankel functions. |
I included your changes regarding the arbitrary orders into |
I have looked again at the NFC-HOA simulations and the new behavior of using arbritrary orders. The interpolation we are doing now introduces some artifacts and I was wondering if this is natural and cannot be avoided or if we could change something. Here is the result as it was before with version 2.0.0 (it uses 64 loudspeakers and uses order 32, which can be done without interpolation, by just using every second loudspeaker): $ git checkout 2.0.0 conf = SFS_config_example;
conf.plot.usedb = 1;
sound_field_imp_nfchoa([-2 2],[-2 2],0,[0 2 0],'ps',200,conf); And here is the result as it implemented now, which has the advantage to use arbritry orders ( it uses 64 loudspeakers and an order of 31): $ git checkout master conf = SFS_config;
conf.plot.usedb = 1;
sound_field_imp_nfchoa([-2 2],[-2 2],0,[0 2 0],'ps',200,conf); |
I think the difference comes from the relation of the number of secondary sources ( In the earlier version of Still, the simulation result of the current version looks a bit strange, because of the small wavelets. But you get a similar result in version 2.0.0 if you slightly move the virtual source.
sound_field_imp_nfchoa([-2 2],[-2 2],0,[0.1 2 0],'ps',200,conf); |
That is interesting, I never shifted the point source away from To conclude: the new behavior is normal and not a bug as it is inherent to the implementation? |
I think it is normal. By the way, in certain cases, we also get "clean" results with the current version. conf.secondary_sources.number = 63;
conf.nfchoa.order = 31;
sound_field_imp_nfchoa([-2 2],[-2 2],0,[2,0,0],'ps',200,conf); conf.secondary_sources.number = 63;
conf.nfchoa.order = 31;
sound_field_imp_nfchoa([-2 2],[-2 2],0,[-1,0,0],'pw',200,conf); |
Unlike for monochromatic cases, it seems that the Ambisonic order cannot be freely chosen for time-domain NFC-HOA driving function. It only works if the order is an integer multiple of the number of secondary sources, of vice versa. I started to implement for arbitrary integer orders. Would it be worth doing this?
The text was updated successfully, but these errors were encountered: