Skip to main content

Module db_profile

Module db_profile 

Source
Expand description

xil db-profile β€” peak, average and minimum dBFS per MP3. Port of XILU010_db_profile.py.

StructsΒ§

Args πŸ”’
Record πŸ”’
One file’s measurements, in the key order the JSON and CSV use.

ConstantsΒ§

CHUNK_MS πŸ”’
DEFAULT_PATH πŸ”’
SILENCE_FLOOR_DB πŸ”’
Below this a chunk counts as silence or dead air and is not a candidate for the quietest-window measurement.

FunctionsΒ§

command
The clap definition behind --help, for man pages.
execute πŸ”’
fmt_fixed πŸ”’
%10.2f on a value that may be infinite β€” Python prints -inf.
num πŸ”’
A silent file profiles as -inf, which json.dumps writes as the bare token -Infinity; py_float carries that through.
pad πŸ”’
Pad to width by character count (f"{s:<*}").
profile_file
Peak, RMS and quietest-500ms-window for one file.
round2 πŸ”’
Python’s round(x, 2): round-half-to-even on the decimal value.
run
scan_mp3s πŸ”’
os.walk order: this directory’s files sorted, then subdirectories.
walk πŸ”’