GuitarPro-to-Midi
GuitarPro-to-Midi copied to clipboard
Error: Unknown enum value. (Parameter 'trip') Actual value was eigth.
I'm not an expert programmer but I suggest that we do the following changes to skip invalid data:
var trip = _barMaster[measureIndex].TripletFeel;
// Check if the value of trip is a valid enum value
if (!Enum.IsDefined(typeof(TripletFeel), trip))
{
// Skip this data and move on to the next iteration
continue;
}
Here's the GP file: Difficult_To_Cure___Live_At_Budokan__Tokyo__Japan__1984 (2).gp.zip
I'm missing a little bit of context here. Does the program abort when it fails to convert trip
to an enum?
That's completely right! You can try it.
I agree the program should continue instead of simply exiting with an error, but usually when we encounter these kinds of errors it's not caused by invalid data. I think it's most likely something that simply isn't implemented yet. We should at least issue a warning here instead of silently skipping over this measure. Feel free to create a PR and I will review it. If you know what the meaning of this unknown value is you could also try to implement that.
Please take a look: https://github.com/rageagainsthepc/GuitarPro-to-Midi/pull/23
I'm facing this error and it causes conversion to abort, warning and continue conversion would have been preferred! Could you have time to take a look at PR @rageagainsthepc ?
That PR was basically finished except for some minor formatting issues when the author simply stopped responding.
@rageagainsthepc, I'm sorry I really got busy and forgot about this, I will take a look.