web-audio-peak-meter icon indicating copy to clipboard operation
web-audio-peak-meter copied to clipboard

Feature/calculate performance

Open jordicenzano opened this issue 4 years ago • 2 comments
trafficstars

  • Added performance meter
  • Fixed cross channel interference (example: try to measure just L channel)

jordicenzano avatar Jan 17 '21 21:01 jordicenzano

Hi @jordicenzano ! Your addition last week of the true-peak metering option inspired me to do some maintenance and refactoring :)

I split things apart into separate files and also removed reliance on global variables that was preventing multiple meters from displaying on the same page. Hopefully you agree that this is easier to read and reason about now? Unfortunately that means this PR would have to be reworked to fit into the new code structure.

I want to make sure I understand the nature of the cross-channel bug, though. Should lpfBuffer be an array of arrays, where the outer array has a length of channelCount and the inner array has the same length as lpfCoefficients? I will hopefully spend some time this week porting that change over to the new structure, and then can I have you take a look at it to make sure I got the logic right?

Also, do you happen to know if there are any test fixtures for the ITU-R BS.1770 algorithm? I think it would be great if we could have some unit tests that say "given the following buffer, we expect calculateTPValues to return the following true peak values"

esonderegger avatar Jan 18 '21 16:01 esonderegger

Should lpfBuffer be an array of arrays, where the outer array has a length of channelCount and the inner array has the same length as lpfCoefficients?

Correct!

I will hopefully spend some time this week porting that change over to the new structure, and then can I have you take a look at it to make sure I got the logic right?

Happy to do it!

Also, do you happen to know if there are any test fixtures for the ITU-R BS.1770 algorithm?

Just today I added a test file and added to my fork of the repo, see link Also here you can find a lot of test signals

jordicenzano avatar Jan 18 '21 18:01 jordicenzano