Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose floating-point BPM in MediaFile or normalize floats to ints in database #762

Open
Julf opened this issue May 14, 2014 · 3 comments

Comments

Projects
None yet
2 participants
@Julf
Copy link

commented May 14, 2014

Running "beet write" causes updates of bpm values from integer to float (bpm: 113 -> 113.145) despite multiple runs of "beet write". "beet update -p" suggests same changes the other way around (bpm: 113.145 -> 113).

@sampsyo sampsyo added needinfo and removed needinfo labels May 14, 2014

@sampsyo sampsyo changed the title Synchronisation issues - bpm int->float? Expose floating-point BPM in MediaFile or normalize floats to ints in database May 14, 2014

@sampsyo

This comment has been minimized.

Copy link
Member

commented May 14, 2014

Currently, MediaFile exposes the bpm field as an integer. We could consider trying to expose a floating-point value instead. In this case, we would also want to change the field in library.py accordingly. If we do this, we'd have to live with some formats being unable to store non-integer numbers, but that's probably fine.

Alternatively, we could ensure that the database always stores integers. Currently, the field (via the Integer type in dbcore.types) does not attempt to round fractional numbers to integers in the normalize method.

@Julf

This comment has been minimized.

Copy link
Author

commented Dec 11, 2014

Hi!

I guess this was never resolved? It is somewhat annoying that "beet update"
and "beet write" keep updating every single file that has a bpm field,
as "beet update" insists on converting floats to ints, and "beet write"
on converting ints to floats...

Is there any way to tell "write" and "update" to ignore the bpm field?

Julf
@sampsyo

This comment has been minimized.

Copy link
Member

commented Dec 11, 2014

Is there any way to tell "write" and "update" to ignore the bpm field?

Not currently; sorry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.