CPJKU / madmom

Python audio and music signal processing library
https://madmom.readthedocs.io
Other
1.35k stars 206 forks source link

OnsetDetect precision: Third decimal place is always rounded to 0. #506

Closed jie-chen closed 2 years ago

jie-chen commented 2 years ago

Hi, when running binary of OnsetDetector, OnsetDetectorLL or CNNOnsetDetector. The third decimal place is always rounded to zero. Anyway to disable it?

superbock commented 2 years ago

The reason is that the resolution of those methods is 100 frames per second, thus when printing with 3 decimals, the last one will always be 0. The reason we're printing 3 decimals is that some other methods use a higher frame rate and hence produce results with a higher precision.

You can change the fmt argument of madmom.io.write_events to change the behaviour.