I am trying to parse tracks of .gp5 files with PyGuitarPro, but i don't understand the meaning beat.start value. My goal is to add the starting time in milliseconds from the beginning of the song for each beat, but when I try to play the track parsed with my current code the time is distorted.
Docs: https://pyguitarpro.readthedocs.io/en/stable/pyguitarpro/format.html#module-guitarpro.gp5
I can get the tempo, time signature info if needed.
def get_track_frets(self,track): #returns array of beats with time and [string, fret]
beats = []
for measure in track.measures:
for voice in measure.voices:
for beat in voice.beats:
new_beat = {"start" : beat.start, "notes": []}
for note in beat.notes:
new_beat["notes"].append([note.string, note.value])
if len(new_beat["notes"]) > 0:
beats.append(new_beat)
return beats