Skip to content

Commit

Permalink
Fix bug in lyric MIDI output. Fixes rism-digital#3546
Browse files Browse the repository at this point in the history
* Use TextListInterface getter
  • Loading branch information
lpugin committed Nov 14, 2023
1 parent 5d50ac4 commit c189ec0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/midifunctor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -799,8 +799,7 @@ FunctorCode GenerateMIDIFunctor::VisitStaffDef(const StaffDef *staffDef)
FunctorCode GenerateMIDIFunctor::VisitSyl(const Syl *syl)
{
const int startTime = m_totalTime + m_lastNote->GetScoreTimeOnset();
const Text *text = vrv_cast<const Text *>(syl->GetChild(0, TEXT));
const std::string sylText = UTF32to8(text->GetText());
const std::string sylText = UTF32to8(syl->GetText());

m_midiFile->addLyric(m_midiTrack, startTime * m_midiFile->getTPQ(), sylText);

Expand Down

0 comments on commit c189ec0

Please sign in to comment.