Switch to using QPM instead of BPM

230 views
Skip to first unread message

Curtis "Fjord" Hawthorne

unread,
Sep 1, 2016, 6:46:59 PM9/1/16
to Magenta Discuss
Hi all,

As of #190, we've switched all of our internal representations of tempo to use QPM (quarter notes per minute) instead of BPM (beats per minute).

The only visible result of this change is that the --bpm flags in our generators and the midi interface are now --qpm. Everything else should work the same.

Also, if you happened to serialize any NoteSequence protos to a text file, the bpm field was renamed to qpm and the ticks_per_beat field was renamed to ticks_per_quarter and your text files will need to be updated. We expect this use case to be very rare.

If you're curious, we made this change to make our internal representations of tempo more clear. QPM (quarter notes per minute) is much less ambiguous than BPM (beats per minute). Quarter notes are a clearly defined entity, whereas the meaning of "beat" could change based on the time signature (e.g., in 2/2, the half note gets the beat) or could even be considered to be based on the listener's perception of where the beat happens. QPM also matches how MIDI and MusicXML files are encoded.

Our existing code was actually written assuming the tempo was indicated in QPM, this rename just makes it more clear.

Let us know if you have any questions.

-Fjord
Reply all
Reply to author
Forward
0 new messages