CPJKU / partitura

A python package for handling modern staff notation of music
https://partitura.readthedocs.io
Apache License 2.0
227 stars 15 forks source link

Make a Tempo Value Default for Export Midi #340

Closed manoskary closed 1 month ago

manoskary commented 8 months ago

Midi export should have a default value for Tempo if the tempo is not available or not specified on the score then, for completeness, when it is imported in a DAW, I propose 120bpm. However, this addition is not strictly necessary.

sildater commented 8 months ago

I think there is a default for performance export (it's 120 bpm or 500000 mpq). for score export, we have

for tp in part.iter_all(score.Tempo):
            tempos[to_ppq(tp.start.t)] = MetaMessage(
                "set_tempo", tempo=tp.microseconds_per_quarter
            )

is this what we need to extend by a default value?

manoskary commented 8 months ago

I think so, then when there are no tempo values in iter_all then set to 120bpm.