MuseScore for image rendering

• Sep 13, 2010 - 07:38

Hi,

I really like the quality and flexibility of the MuseScore renderer, and I would like to use it to render snippets of music (3-4 measures at a time) on the fly for viewing in a browser. I'm happy to convert the input to the .mscx format. I am familiar with the "-o" command-line option, and creating PNG's this way works. However, when I execute this command from a Ubuntu shell, it takes > 10 seconds to complete even for tiny excerpts. I suspect this has to do with starting up (connecting to the X server etc.), and not with the conversion itself. Ideally I would like to be able to support a throughput of several excerpts per second in an on-demand fashion.

Is there a way of starting up MuseScore once and then feeding it files to render? Alternatively, is there a suitable way of invoking just the renderer rather than the full application (connecting to an X server seems unnecessary, for example)? I'm happy to dive into the code if this requirement requires extensions, however at the moment I have no idea where to start.

Ideas / pointers would be greatly appreciated. Thanks.


Comments

There is not way to launch MuseScore once and pass commands to a running instance.
Not sure what you mean by "converting the input to mscx format", but be aware that this format might change.

In reply to by [DELETED] 5

lasconic, thank you for your reply.

By "converting the input to mscx format" I mean that I have music in a different format, and I am not intending to rely on MuseScore for conversion into mscx.

Is there an inherent reason why it is not possible to have a running MuseScore instance render mscx input on demand, or could that functionality be developed? Perhaps it would be possible to isolate the rendering component of the application and build a framework around it to render on demand?

Could you guide me to the part of the source code that deals with the rendering? I have checked out the project, but having trouble finding my way around it.

Thanks again.

In reply to by romming

There is currently no "rendering library" in MuseScore and so it's not an easy job to extract a part of it. MuseScore is a complex piece of software with a lot of code, as you can see. Each Element has some code for layouting and drawing.

If you have your music in a different format, I would advise not trying to write it automatically to mscx but use MusicXML instead. I did it for ABC and noteworthy format.

There is no reason why MuseScore could not work as a server but it's just not there. There is currently an experimental support for OSC in the trunk. It could be an entry point. If you fill like doing it yourself, your patch is welcome.

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