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

Tempo changes not loaded properly #204

Open
lucasnfe opened this issue Nov 12, 2021 · 0 comments
Open

Tempo changes not loaded properly #204

lucasnfe opened this issue Nov 12, 2021 · 0 comments

Comments

@lucasnfe
Copy link

I think there is a bug with the get_tempo_changes() function. It is not loading the tempo changes properly. Here is an example:

mid = pretty_midi.PrettyMIDI(midi_file="Undertale_PC_Undertale_Snowy.mid")
mid.get_tempo_changes() 

output:
(array([ 0.        , 15.73798337, 15.73894393]), array([60.99519764, 60.99966247, 60.99519764]))

But when I open the midi file on a midi player (e.g. GarageBand), the first ~60bpm tempo change only happens around the 5th bar. Here is a screenshot:

Screen Shot 2021-11-12 at 3 01 21 PM

If I save the midi file with pretty_midi (mid.write("Undertale_PC_Undertale_Snowy._copy.mid")) and open it with the same midi player, this is the output:

Screen Shot 2021-11-12 at 3 09 14 PM

Here are the midi file and the screenshots for reproduction:
reproduce.zip

pretty_midi 0.2.9 and python 3.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant