Get a chord object out of a segment

• Apr 7, 2021 - 08:47

I have a segment with segmentType == Segment.ChordRest. How can I get a chord object out of it?


Comments

segment.elementAt(tracknumber)

With tracknumber being (staffIndex * 4) + voiceIdx.

Staff Voice Track
0 1 0
0 2 1
0 3 2
0 4 3
1 1 4
1 2 5
8 3 34

The method will either return the element in that position (which you can then test for its type again) or null

Do you still have an unanswered question? Please log in first to post your question.