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>
pytta.iso3382.late_lateral_level(omni, eight, p10) gives the late lateral sound level LJ of ISO 3382-1:2009, A.2.5, Equation (A.16), by band: the energy of the figure-of-eight response from 80 ms to the end over the energy of the free-field response of the same source at 10 m. The time origin is the direct sound found on the omnidirectional response, as in lateral_fraction. A free-field response at another distance d can be used with distance=d, which applies LpE,10 = LpE,d + 20 lg(d/10) of A.4. pytta.iso3382.late_lateral_average(LJ) gives LJ,avg of Equation (A.17), the energy mean over the octave bands from 125 Hz to 1000 Hz, which Table A.1 asks for in place of the arithmetic mean used for the other measures. 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.
Builds on #66, so until #66 is merged this pull request also shows its commit.
Adds the late lateral sound level L_J of ISO 3382-1:2009, A.2.5, to
pytta.iso3382, next to JLF, JLFC and IACC from #66:late_lateral_level(omni, eight, p10, distance=10., nthOct=1, minFreq=125., maxFreq=4000.): Equation (A.16), L_J = 10 lg(∫ from 80 ms to ∞ of p_L² dt / ∫ from 0 to ∞ of p_10² dt), with t = 0 at the start of the direct sound. The direct sound is found on the omnidirectional response, aslateral_fractiondoes, because the figure of eight has its null in that direction. Withdistance, the free field reference may be measured at another distance d, as A.4 allows, through L_pE,10 = L_pE,d + 20 lg(d/10).late_lateral_average(LJ): Equation (A.17), the energy mean over the four octaves from 125 Hz to 1000 Hz, as Table A.1 asks.The definition and the limits of the integrals were checked against the text of ISO 3382-1:2009.
The tests in
tests/test_iso3382_lj.py: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