rageagainsthepc / GuitarPro-to-Midi

Convert all GuitarPro formats (3 to 7) to Midi simulating bending, overtones etc.
65 stars 7 forks source link

Section repeates dont export as expected #32

Open Motanum opened 2 months ago

Motanum commented 2 months ago

I have been noticing that repeats don't work as expected in either GP5 or GPX. It seems GuitarProToMidi is not properly duplicating the simple measures before the alternative endings.

I did a basic example to test this with the following riff. image

You can find the GPX here https://drive.google.com/file/d/1L_y0YF0s_Jm-RmcOMYLzOgivnjtyYjyI/view?usp=sharing

This is the midi I would expect to see. (Using Guitar Pro 6's midi export) image

And this is what I get when I use GuitarProToMidi either a gp5 or gpx. image

I am a bit lost on what I should change in the code to fix it in my version. There is a switch case for repeat last measure in format.cs and also some references to repeat under GP5File.cs and GP6File.cs, but I its a bit hard for me to understand.

Does anyone know of a fix?