Finding measure number of a segment

• Feb 25, 2023 - 10:44

I am having trouble determining the measure number for a note. It doesn't seem to be a property of note, element or segment. The only link that I can find is the measure object which has properties of first and last segment. Do I need to build a segment to measure number map or have I missed a property somewhere?


Comments

Well it turns out that measure number is not a segment property but by walking through the score in measure order it is possible to build a segment/measure map. I have made a Tab Walk plugin to produce such a map and also an output file of the score in spreadsheet compatible CSV format which is small enough to be practical even for large scores.

TabWalk2.png

In reply to by elsewhere

It's not released yet because I am adding functionality, e.g. displaying the playEvents. It will be released later this week.

It is based on the MS3 walk plugin but is enhanced for guitar TAB output, e.g. string, fret, pitch name, and it generates a CSV file for using in a spreadsheet app. It is really a learning tool to help me to understand the Musescore object model, with the aim of turning my guitar ring plugout, (Excel), into a MS3 plugin.

In reply to by parkingb

I'm simply parsing the measures as found in the object model and not taking into account any changes made for display purposes, such as the user resetting measure number. The tool is intended as a means of inspecting the underlying model. I could rename the column so as to avoid confusion, or possibly add the displayed measure number to the output in addition to the measure-position-number-within-the-score.

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