Repository navigation
Conversation
pytta.iso3382.lateral_fraction gives the early lateral energy fractions JLF and JLFC of ISO 3382-1:2009 (A.14, A.15) from the impulse responses of an omnidirectional and a figure-of-eight microphone, and pytta.iso3382.iacc the interaural cross correlation coefficient (B.1, B.2) of a binaural response over any time window. Both work by octave or fractional octave band, or broadband. The time origin is the start of the response, the first sample within 20 dB of the maximum. Tests use responses made of single reflections, so JLF, JLFC and IACC are exact, and pin the 5 ms and 80 ms limits, the lags below 1 ms, the early and late windows and the band output. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This was referenced Oct 31, 2026
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 module
pytta.iso3382with two spatial measures of ISO 3382-1:2009 thatRoomAnalysisdoes not have:lateral_fraction(omni, eight, nthOct=1, minFreq=125, maxFreq=4000)gives the early lateral energy fractions JLF (A.14) and JLFC (A.15) from the impulse responses of an omnidirectional and a figure-of-eight microphone at the same point. JLF sums pL² and JLFC sums pL·p from 5 ms to 80 ms, both over the sum of p² from 0 to 80 ms.iacc(binaural, t1=0, t2=None, nthOct=1, minFreq=125, maxFreq=4000)gives the interaural cross correlation coefficient (B.1, B.2): the largest magnitude of the normalized cross correlation of the left and right ear responses over t1 to t2, for lags shorter than 1 ms.t1=0, t2=0.08gives the early IACC andt1=0.08the late one.Both work by octave or fractional octave band through
OctFilter, or broadband withnthOct=None. The time origin is the start of the impulse response, the first sample whose squared value is within 20 dB of the maximum, found on the broadband responses and kept for every band. The late lateral sound level LJ (A.16) is not included, since it needs the response of the source at 10 m in a free field.The tests in
tests/test_iso3382_spatial.pybuild responses from single reflections, so the expected values are exact:Checked with Python 3.12, numpy 1.26 and scipy 1.17. The existing tests behave as on
development: the 7 failures there (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