claritychallenge / clarity

Clarity Challenge toolkit - software for building Clarity Challenge systems
https://claritychallenge.github.io/clarity
MIT License
129 stars 54 forks source link

Cleaning MSBG code #360

Open groadabike opened 9 months ago

groadabike commented 9 months ago

@jonbarker68:

Do you know what is the point of all these level variables? https://github.com/claritychallenge/clarity/blob/6b98a25bb13e75458fb58fdc2b76be0059a5a9cb/clarity/evaluator/msbg/msbg.py#L210-L217

I am not sure if I am reding it correctly but there are some variables that are added and substracted making some variables useless.

for example, if we try to join all these operations in one line we get:

ref_rms_db = calib_db_spl - equiv_0db_spl 

repacing calib_db_spl

ref_rms_db = level_db_spl - equiv_0db_spl 

repacing level_db_spl

ref_rms_db = equiv_0db_spl + signal_rms_level_db - equiv_0db_spl 

obtaining

ref_rms_db = signal_rms_level_db