Repository navigation
Conversation
…ooms rectangular_room_frf gives the transfer function from a point source of volume velocity to a receiver in a rectangular room with rigid walls and uniform modal damping, by modal superposition (Fahy, Foundations of Engineering Acoustics, 9.8), as ita_roomacoustics_analytic_FRF of the ITA-Toolbox. The uniform mode is computed in closed form, so the response is finite at 0 Hz. rectangular_room_ir gives its impulse response, band-limited with a raised-cosine fade below the Nyquist frequency. Tests check the frequency and half-power bandwidth of an isolated mode (2.2 / T), reciprocity, the nodal plane of a mode, and that the impulse response decays with the reverberation time of the model with no floor. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the modal model of a rectangular room of
ita_roomacoustics_analytic_FRF(ITA-Toolbox) topytta.rooms:rectangular_room_frf(dimensions, source, receiver, frequencies, T=2, f_max=None): the transfer function p / Q (Pa per m³/s) from a point source of volume velocity Q to a receiver, in a room with rigid walls and uniform modal damping, by modal superposition (Fahy, Foundations of Engineering Acoustics, 9.8):H = jω ρ c² Σ ψ_N(r) ψ_N(r0) / (Λ_N (ω_N² - ω² + 2 j δ ω)),
with cosine eigenfunctions, Λ_N = V Π (1 for n = 0, 1/2 otherwise), and δ = 3 ln(10) / T for every mode. The time dependence is exp(jωt), the convention of
numpy.fft, so the impulse response is causal. The uniform mode (0, 0, 0) is computed in closed form, ρ c² / (V (2δ + jω)), so that the response is finite at 0 Hz, where it is the compression of the whole volume.rectangular_room_ir(dimensions, source, receiver, samplingRate, numSamples, T=2, f_max=None): its impulse response as a SignalObj. The modes go up to 0.4 times the sampling rate by default, and a raised-cosine fade takes the response to zero at the Nyquist frequency. Cutting it where it is large would ring through the whole circular response.The model was written from Fahy and checked by the rules below. The ITA function returns a pole-residue object, and its own code notes that a correction factor in it is not totally correct, so it was not used as the oracle.
The tests in
tests/test_room_modes.pyprint the measured values:Checked with Python 3.12, numpy 1.26 and scipy 1.17. The 7 failures of
development(3 intest_h5io.py, 4 intest_pyttasave.py) are the same with and without this change.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com