pyroomacoustics icon indicating copy to clipboard operation
pyroomacoustics copied to clipboard

set_air_absorption question

Open opasquetdotfr opened this issue 5 years ago • 1 comments

Hello !

I am trying to change 'set_air_absorption'. Should I simply use: room.set_air_absorption("0.0001, 0.0003, 0.0006, 0.001, 0.0019, 0.0058, 0.020300000000000002")

If so, I get the error: File "XXX/pyroomacoustics/room.py", line 942, in set_air_absorption self.air_absorption = self.physics().get_air_absorption() TypeError: 'Physics' object is not callable

I instead use: room.air_absorption = [x., x., x., x., x., x., x.] for "center_freqs": [125, 250, 500, 1000, 2000, 4000, 8000]

I am trying to do something that sounds different than a natural air reverb. My dream would be negative air absorption factors. So I am playing with parameters such as extreme speeds of sound etc. If you have an idea of which params I could play with...

Thank you very much !!

O.

opasquetdotfr avatar Oct 16 '20 15:10 opasquetdotfr

Hi @opasquetdotfr , Apologies for the long delay to reply. Thank you so much for reporting this problem!!

There are two problems here.

  1. I did not properly test this function and there is a bug that prevents the coefficients provided to be used 🙄
  2. Once the bug is fixed, the code above will still not work because the coefficients should be provided in a list or array, e.g.
room.set_air_absorption([0.0001, 0.0003, 0.0006, 0.001, 0.0019, 0.0058, 0.020300000000000002])

I will update here when I fix the bug!

fakufaku avatar Nov 05 '20 02:11 fakufaku

Hello,

I am getting the same error in a more simple case, where I am interested in setting a single constant absorption coefficient (to mimic sound waves propagating through shallow water). Was this backend issue ever resolved? Thanks!

jvietorisz avatar Sep 25 '23 16:09 jvietorisz

@opasquetdotfr @jvietorisz sorry this took so long, the bug is now corrected.

fakufaku avatar Nov 24 '23 09:11 fakufaku