Command Line Option -M doesn't work in Windows 10 (MuseScore3)

• Nov 4, 2019 - 17:14

Hello. I've been attempting to change my default settings on midi import. I've looked at the command line documentation here:
https://musescore.org/en/handbook/3/command-line-options#MIDI_import_op…
I want to edit the midi_import_options.xml file and turn clef changes to false. However, when I try to do this, nothing happens. When I try to open a .mid file, the program will default "clef changes" to enabled. I've given more details below.

I can successfully run MuseScore3 through the command line; however, when I try to use the -M command and then place my file location of the .xml file (I used the sample given in the link above), nothing happens. Please note that I've already edited the .xml file and changed the appropriate location to "false" (the clef changes location).
I input into my command prompt: MuseScore3.exe -M "file_path\midi_import_options.xml". I then open my .mid file to see if the clef changes options are unchecked, but it is not. Basically, I want to use the batch converter plugin to mass convert .mid files to .pdf files but need the "clef changes" option to be automatically disabled.

I'd appreciate any help on this issue.


Comments

Is that file_path fully qualified, startinf with driveletter and colon etc?
Also I beliebe this is for batchmode only, so you'd need to run it together with the -o pontion

MuseScore3.exe -M file_path\midi_import_options.xml score.mid -o soure.mscz

In reply to by Jojo-Schmitz

Yes. I believe that the file path is working fine. It begins with ;C:...MuseScore 3\bin; This is where my MuseScore3.exe is located. In the command prompt, I can simply type MuseScore3.exe and it will open the application.

I've tried your method and it partially works. I can now generate a pdf file (shown below); however, the -M command does not seem to be working since the exported file (.mid to .pdf) is not affected by the -M file.
Perhaps there is an error with my options file, but I used the exact .xml file that was given for the command line documentation (the sample file given for the -M command). I only changed the option: clef changes from true to false because I don't want mid measure clefs to changes.

Here is the general solution so far which generates the pdf, but seems to not apply the -M .xml file option changes.
MuseScore3.exe -M "C:\Program Files (x86)\MuseScore 3\styles\midi_import_options_2.xml";MuseScore3.exe -o "C:\Users[path to put .pdf file]\test.pdf" "C:\Users[path to .mid file]\a_Major4.mid"

Thanks for the help. If I find the solution, I'll post it here for others having the same issue. If you have any opinion on why the -M .xml file not working, it'd be really helpful.

Edit: Solution below
I've figured it out again by looking at your solution. Thank You!
It appears that the semicolon runs the code above separately so I removed it and followed your format more closely. File paths are indicated in the parentheses.

MuseScore3.exe -M "midi-import-options.xml file path " ".mid file goes here" -o "output format (.pdf) goes here"

Attachment Size
test2.pdf 27 KB
midi_import_options_2.xml 1.73 KB

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