helge17 / tuxguitar

Improve TuxGuitar and provide builds
Other
303 stars 29 forks source link

Exported audio is not complete in a SPECIFIC case mentioned #431

Closed SerjSX closed 5 days ago

SerjSX commented 1 week ago

Today I wrote a sheet, and it basically starts with a slow tempo (like 40) and then there is repetition, then at some point I changed the tempo to 100. The problem showed up when I exported the audio file, and part of the sheet from the end was not included in the export! I went on to create another sheet, but with random notes though a similar structure with the repetitions and tempo changes, and it did the same.

I attached the file here below, also the audio file. As you can see, it cuts in the end rather than including the entire sheet. This happens more with long sheets that have such structure, because when I tried to do something similar with a couple of measures and no repeitions : it wasn't being cut.

Here is the TuxGuitar file of the test sheet I used to test with similar tempos and repetitions with the exported audio file: test.zip The issue is spotted in the end. I'm using MID export until this issue has been fixed, because MID does not have this issue.

Thanks in advance!

guiv42 commented 1 week ago

reproduced on TuxGuitar v1.6.3 / Linux (openSuse tumbleweed) with provided test file

guiv42 commented 6 days ago

Root cause: erroneous computation of song duration. A simpler method to reproduce: just create a song with 1 bar at tempo 40bpm. Fill the bar with 16ths, and export to wav -> output was truncated.

That should be OK now

guiv42 commented 6 days ago

@SerjSX could you please have a try with latest pre-release (>= 2024-06-23) and close issue if it's OK?

SerjSX commented 5 days ago

Fixed, thank you!