Skip to content

Clarify that midi_tempo only sets MIDI header tempo, not note timing.#193

Open
candpixie wants to merge 1 commit into
spotify:mainfrom
candpixie:docs-clarify-midi-tempo
Open

Clarify that midi_tempo only sets MIDI header tempo, not note timing.#193
candpixie wants to merge 1 commit into
spotify:mainfrom
candpixie:docs-clarify-midi-tempo

Conversation

@candpixie

Copy link
Copy Markdown

Closes #152.

Changed documentation only. Referenced Issue #152, which reports that midi_tempo doesn't
affect playback speed. It's correct: in note_events_to_midi, midi_tempo
is only passed to pretty_midi.PrettyMIDI(initial_tempo=...), which writes the
tempo into the MIDI header. Note start/end times come from the audio in
absolute seconds and are never rescaled by midi_tempo, so it cannot change
timing or duration but only the header value.

This PR helps clarify that in the --midi-tempo CLI help and in the docstrings for
note_events_to_midi, predict, and predict_and_save (which previously
omitted midi_tempo). Also, no behavior changes have been made.

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

Successfully merging this pull request may close these issues.

Misleading midi_tempo parameter in predict_and_save function

1 participant