Finding measure number of a segment
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
A problem like this I find exhaustively print out useful sometimes
edit: https://musescore.org/en/project/objectexplorer-v20
In reply to A problem like this I find… by msfp
Thanks. Looks like a handy tool.
In reply to A problem like this I find… by msfp
Very handy - and I heeded the warning about selecting elements before generating.
A single selected note generated over 1700 lines of output.
In reply to Very handy - and I heeded… by yonah_ag
Yea, and I use code folding (Ctrl+K+number in Sublimetext) to transverse the output.
In reply to Yea, and I use code folding … by msfp
I've been using Notepad++ for many years but I'll take a look at Sublime Text.
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.
In reply to Well it turns out that… by yonah_ag
@yonah_ag Is the walk method valid for all kinds of common time signature? I'm thinking of getting the 3rd beat of 4/4's etc
In reply to @yonah_ag Is the walk method… by msfp
The walk method is valid for any time signature at all, common or rare, because it steps through the score segment-by-segment.
In reply to Well it turns out that… by yonah_ag
Where can I find the Tab Walk plugin?
In reply to Where can I find the Tab… by elsewhere
I think it's still not released by yonah_ag yet.
I assumed it'd be based on the builtin ms3 walk.qml
https://github.com/fp22june/MuseScoreTag362/blob/master/share/plugins/w…
In reply to Where can I find the Tab… 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 Where can I find the Tab… by elsewhere
Plugin is now ready
https://musescore.org/en/project/tab-walk
In reply to Plugin is now ready https:/… by yonah_ag
Are you taking into account the offset in the numbering of the measures that can be defined at the measure level ? I couldn't locate that in your code.
It is the measure's property
noOffset
:In reply to Are you taking into account… 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.