Skip to content
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

set_air_absorption question #191

Closed
opasquetdotfr opened this issue Oct 16, 2020 · 3 comments · Fixed by #330
Closed

set_air_absorption question #191

opasquetdotfr opened this issue Oct 16, 2020 · 3 comments · Fixed by #330

Comments

@opasquetdotfr
Copy link

opasquetdotfr commented Oct 16, 2020

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.

@fakufaku
Copy link
Collaborator

fakufaku commented Nov 5, 2020

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!

@jvietorisz
Copy link

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!

fakufaku added a commit that referenced this issue Nov 22, 2023
fakufaku added a commit that referenced this issue Nov 24, 2023
)

* Fixes #191, a bug when setting air abosrption coefficients manually

* Improves the doc.

* isort
@fakufaku
Copy link
Collaborator

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants