Accessing fingering info during play event
Is there a way I can access fingering information (number and offset) defined on a note during play? I found some hints from Seq::playEvent, where the data structure elements are being accessed in the following manner. However, I could not find any specific instance in the entire codebase that access fingering numbers.
Staff* staff = note->staff(); Instrument* instr = staff->part()->instrument(note->chord()->tick()); const Channel* a = instr->channel(note->subchannel());
From the XML structure, I can see that the Fingering element is defined within the Note datastructure.
<Chord> <durationType>quarter</durationType> <Note> <Fingering> <offset x="2.54236" y="0.508471"/> <text>1</text> </Fingering> <pitch>60</pitch> <tpc>14</tpc> </Note> </Chord>
I tried to access the fingering info using note()->fingering()->text() - but obviously it did not work. I also see that fingering element has a public method note() to get the parent note, but not the other way around. That is, given a note, find the fingering element associated with it. Any pointers will be greatly appreciated.