what is split staff based on?
Hi guys,
I just came across the split staff function in musescore. I find that there is no document for the code. Wondering if some one can point out what algorithm the code is based on. I am thinking of developing code fto improve it.
Comments
If you mean the command that appears in the right-click menu for a staff, it's totally simplistic, based on a fixed point (all notes above that split point stay on that staff, all notes below moved to the staff below). If you mean the code that tries to assign notes to staves for piano tracks on MIDI import, that code is much more sophisticated, looking in some way at what might actually be playable given the intervals involved etc. I believe most of the work was done as part of this Google Summer of Code project:
https://musescore.org/en/developers-handbook/google-summer-code/google-…
In reply to If you mean the command that… by Marc Sabatella
The later one is what I'm looking for. I find an example of the "Left/right hand separation of piano track" with your link but it only gives two pictures of split result. Could you please show me the related code or referred algorithms or paper? I would be very grateful.
In reply to The later one is what I'm… by davidtao
I believe the code is in "importmidi_lrhand.cpp".
splitIntoLeftRightHands is probably the entry point.