Skip to content

Commit

Permalink
Merge pull request #3777 from rettinghaus/miditempo
Browse files Browse the repository at this point in the history
fix #3776: set initial tempo only if not default
  • Loading branch information
lpugin authored Sep 18, 2024
2 parents d1d3497 + ac1967f commit 713497d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/doc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,12 @@ void Doc::ExportMIDI(smf::MidiFile *midiFile)
ScoreDef *scoreDef = this->GetFirstVisibleScore()->GetScoreDef();
if (scoreDef->HasMidiBpm()) {
tempo = scoreDef->GetMidiBpm();
midiFile->addTempo(0, 0, tempo);
}
else if (scoreDef->HasMm()) {
tempo = Tempo::CalcTempo(scoreDef);
midiFile->addTempo(0, 0, tempo);
}
midiFile->addTempo(0, 0, tempo);

// Capture information for MIDI generation, i.e. from control elements
InitMIDIFunctor initMIDI;
Expand Down

0 comments on commit 713497d

Please sign in to comment.