auto-beam musicxml import
I would like "auto-beam" when I import musicXML in MuseScore, using the command line.
I do not have "beam" information in my musicXML file, so, by default, there is no beam in MuseScore import.
Is there :
- a flag in MusicXML file, readable by MuseScore, which can set "auto-beam" in MuseScore import ?
- a "function" in the museScore-plugins , to reset the beams ( like "CTRL-A/Reset beams" in the GUI ) ?
I use this command-line :
musescore.exe -s -m myMusicXML.xml -o myPng.png -p myMuseScoreScript
Thank you for your help
Franck
Comments
I've found one way to make auto-beam in script, using beamMode property in a chord :
var cursor = curScore.newCursor();
cursor.rewind(0);
cursor.voice = 0;
cursor.staffIdx = curScore.nstaves - 1;
while (cursor.segment) {
if (cursor.element && cursor.element.type == Element.CHORD) {
cursor.element.beamMode = 0 ;
....
FWIW, a property on the beam is how MuseScore handles auto beam, so your plugin solution may be the best method. That is, if your MusicXML contains information that explicitly says - or implies, through lack of information to the contrary - that there is to be no beaming, then MuseScore honors that and sets the "no beam" property. In order to get auto beaming, you'd need to *remove* that property. From the GUI, that's easy enough - select all notes, double click the Auto beam in the Beam Properties palette. Your plugin does the same thing I guess.