How to change the default notation software?

I have a very simple question: How do I change the notation software that opens when I run .show_xml()? The documentation is not clear on this.

Should be, e.g.:

engraving_settings.set_music_xml_application("MuseScore")

Hopefully that works for you; it could be a little bit buggy, especially on Windows, since I test that less. It’s also probably pretty sensitive to getting the name of the application right and escaping any spaces in the name.

If you want it to be changed permanently, run:

engraving_settings.set_music_xml_application("MuseScore")
engraving_settings.make_persistent()

That will modify the settings file, so that when you import SCAMP from then on, it’s the default setting.

Thank you Marc. Indeed it was buggy in Windows. The way I resolved it was:

  1. changing the default musicxml program in Windows configurations to Sibelius
  2. engraving_settings.set_music_xml_application(None)
    engraving_settings.make_persistent()

I wanted to go from Musescore to Sibelius, and this was the solution that worked for me.

I’m curious: what was the bugginess you encountered. Just couldn’t find the program/get the name right?

Anyway, glad that worked. For anyone else encountering this, engraving_settings.set_music_xml_application(None) will cause SCAMP to default to a generic open command, which will mean that your system default for musicxml files will take precedence.

Also, to give a little more detail about what’s going on: set_music_xml_application() is a convenience function that tries to take the name of the application and figure out the correct command-line expression for opening it on your given operating system. It then sets engraving_settings.show_music_xml_command_line, which is what gets run when you try to show an xml file.

You can instead just set engraving_settings.show_music_xml_command_line directly. For instance, if mscore3 opens MuseScore 3 on the command line (as it does in Linux if you install from a package manager), then you could run:

engraving_settings.show_music_xml_command_line = "mscore3"
engraving_settings.make_persistent()

…which would make it open using the mscore3 command from then on by default.

When you ran engraving_settings.set_music_xml_application(None) on windows, that set engraving_settings.show_music_xml_command_line to “cmd.exe /c start”, a generic open command. (I can’t remember why, but just “start” seemed to fail in certain circumstances.)