Skip to content

(Optional) non-blocking calls of MuseScore to show/play musicxml output #1764

@dvrehen

Description

@dvrehen

Would be great if score.show('xml') wouldn't block the execution of a script until the MuseScore instance displaying the musicxml-file is closed down. Similar request as this:

https://stackoverflow.com/questions/64949701/stream-show-without-interrupting-code-in-music21-similar-to-matplotlib-pyploy

But subprocess.run is a blocking call, subprocress.Popen is the non-blocking call

Motivation
Improve usability in a scripting environment like PyCharm

Proposed implementation

I fixed it locally in subConverters.py, line 205:

        #subprocess.run(cmd, check=False, shell=shell)
        subprocess.Popen(cmd, shell=shell)

But don't know enough about the code structure to know if this will cause problems with other converters.

Intent

[X ] I plan on implementing this myself.
[ ] I am willing to pay to have this feature added.
[X ] I am starting a discussion with the hope that community members will volunteer their time to create this. I understand that individuals work on features of interest to them and that this feature may never be implemented.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions