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

Closed
Julf opened this issue May 14, 2014 · 3 comments · Fixed by #3508
Closed

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

Julf opened this issue May 14, 2014 · 3 comments · Fixed by #3508
Labels
feature features we would like to implement

Comments

@Julf
Copy link

Julf 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
Copy link
Member

sampsyo 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
Copy link
Author

Julf 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
Copy link
Member

sampsyo 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
Labels
feature features we would like to implement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants