Access and use code blocks required for notation and audio playback

• Aug 19, 2022 - 15:51

Dear Developers,
is it possible to access code modules in MuseScore that are necessary to create sheet music images and play the tones (both during creation and when playing finished melodies), and incorporate them into an online project being built with HTML + CSS + JavaScript? Could you help me with this? How could I ever learn to navigate the world of such things? What is required to become a MuseScore developer? In addition, is there anyone in your team who can speak Hungarian?
Sincerely, Eupszichiosz


Hello, and welcome! I don't fully understand your first question - sounds like you want to adapt the standalone MuseScore code to somehow use in a web app? - and I don't know about the last, but I can help with #3 and #4: to learn more about development and get started, see the Contribute / Development menu above on this page. There a document there with a list of references and links. Note especially the Discord channel, which is where most discussion takes place. We look forward to your participation!

In reply to by Marc Sabatella

Hello, thanks for your reply! I'm going to see what you recommended me. My first question is about that I would like create a web page, in which it is possible to enter replayable music sheets of melodies and build a database of them. The point of the whole thing would be to make melody search possible like Google search, but online notation and audio playback would be necessary for this - similarly to text input that is required for Google search. However, while the ability to enter text is available to everyone everywhere, not so with notation. So my question is how can I overcome this difficulty. Online music notation application already exists (the one I find is Noteflight), but I don't know yet how to access and use this ability for building a searchable online database. I have already created a working (functional) initiative for this database in Excel, but on the one hand, I think Excel is not suitable for many people to work in it at the same time, on the other hand, its storage capacity is limited, thirdly, it is rather fiddly to import the sheet music examples as screenshots from MuseScore into Excel, plus create mp3 files of each of them and link them to the appropriate place so that they can be listened to. (I tried to attach my Excel database and the mp3 files belonging to it, but this website does not seem to accept them.)
Best regards: Eupszichiosz

In reply to by Eupszichiosz

That helps some, although it's still not 100% clear. I guess the idea is, you want to write code that would maintain database of melodies, and you'd have a web app to display this notation? Right now the way to do that with MuseScore would be, write out your melody as MusicXML, run MsueScore as a command line converted to generate a PNG or SVG file, then display that. Realistically, it would probably be simpler to use a tool more designed for online display of music notation, like VexFlow.

In reply to by Marc Sabatella

Thank you! I have already some .mscx files which appear in MusicXML in VSCode and a simple HTML file with a for music sheet in the same folder. I even copied MuseScore- into this folder. (This folder is on my pendrive and the path to it is: PS F:\Gyula\Kodály Könyvtár\Dallamtár>.) But would you please explain me how to run MuseScore as a command line converted to generate and display an image? What shall I write into the HTML file? Or not into it (since you wrote "command line"), but into something else, e. g. PowerShell or the terminal of VSCode that is also called "PowerShell"? Or how could I find something suitable in WexFlow? (Sorry, I'm probably still very stupid to these things, so thanks for your patience...) Where could I learn such things from?

In reply to by Eupszichiosz

The MISI file is the Windows installer; it is not MuseScore itself. You'd have to install it onto your server. Then run the program itself (the "exe" file) using the command line converter options (see the handbook section on command line options, but basically, "MuseScore.exe foo.mscz -o foo.png").

As I said though, VexFlow is really a better fit, then you wouldn't need to mess with command line execution etc. just do a web search for that name (note, VexFloew, not WexFlow) and you should find the information you need to use it.

In reply to by Marc Sabatella

Thank you very much, it worked! Behold:
But with this, I'm still quite far from fulfilling my dream... I entered some search terms as a comment and tried to search for them with Google, but unfortunately Google did not give the expected results. (Surely, the search engine ignores comments.) In any case, it would be really perfect if if one could - before uploading - enter the melodies directly in the web page, and moreover if any user in the world could enter any part of the melody as a search term - all with musical notes, but without any kind of uploading procedure - and there would be a search mechanism that would find the melody, not only in its original form, but transposed anywhere too. In addition, the possibility of searching for the rhythm should also be created, which should also work if the user enters it in augmented or diminished form, or if, instead of any rest, he holds the previous note longer by the appropriate value, or vice versa: if instead of a held note, he writes a shorter note + a rest that complements it (for example: two staccato quarter notes = eighth note; eighth rest; eighth note; eighth rest = sixteenth note; sixteenth rest; eighth rest; sixteenth note; dotted eighth rest - these should be the same case in terms of search). It is already working in Excel, so it must work also in a web app. How could I get even closer to this goal?

In reply to by Eupszichiosz

It's still not clear what you are asking here, but did you write code in VexFlow yet? This is the way to get music to render in the browser. So all you need to do is write the rest of code the code - the parser for the language you want people to use in entering the music, the the management of the database, the search facility - all of this is programmable. VexFlow makes rendering it in the browser simple, but the hard part is still in how you will generate the database.

If for whatever reason you don't want to use VexFlow, you can look at the various tools for rendering ABC notation instead, like abcjs. Again, the rendering of notation is the easy part, because these libraries already exist. But it's up to you to figure out the database stuff.

In reply to by Marc Sabatella

similar goal? seems like you may want a simpler solution
abc import export plugins

Alternatively, to reach a webpage from within musescore, you could use a plugin and QtWebEngine
plugin dev see

In reply to by msfp

Thank you, @msfp. I checked the Musipedia link where my first search was successful but the next two were not. However, it's a pity that the melody input works silently here. It would be the real thing if all the sounds sounded when I typed, similarly to MuseScore.
The other thing I complain about is that also the audio playback was unsuccessful.
The first search was for the following melody fragment: e'8. f'16 g'4 e'4 a'4 c'4 b4 d'8. e'16
They gave quite a narrow pitch range for searchable melodies, so I subsequently corrected a note that was outside the available pitch range from b'4 to b4 in the text field below the score, and that's how I got the sound I wanted to write there. Then I pressed the button "Search Musipedia", and I got the expected result: the 3rd movement of W. A. Mozart's violin concerto in A major KV.219 begins like this, just of course transposed from C major to A major, so you can calmly write the melody transposed into the search engine. Later I noticed that the program did not recognize the exact transposition, but only the melodic contour.
The second search was for: e''8 f''8 g''8 e''8 f''8 d''8 e''8 c''8 d''8 b'8 c''4 e''4 g'4 (J. Haydn: Rondo in Hungarian style),
and the third one: g'2 f'8 e'8 cis'2 d'8 f'8 c''4 r4 c''4 c''2. (Johann Strauss: Der Fledermaus)
In the two latter cases, the Musipedia search only returned results that did not exactly match the entered search term, and the Web search returned no result in all 3 cases.
According to them, the background database is still in a rather rudimentary state and needs significant expansion.

In reply to by Eupszichiosz

If you have a Google account, (Gmail address), then a web page setup is very easy. You first upload your scores to and then link them on your web page using the embed code which Marc referred to.

With a Google account you have access to Google's free and simple web page maker. You don't need to know any HTML as it's a simple enough for beginners (like myself) and there are no costs involved.

Goto then sign in with your Google account and start designing. Add text captions to your embedded scores so that there is something to search for.

To make your pages available in search engine results, (Google, Bing, Yahoo, Freespoke etc), then checkout this short YouTube video:

Here's Google's help on getting started:

If this is what you are trying to achieve then just have a go. If you get stuck then send me a message thru Musescore's messaging system and I'll try to help you out.

In reply to by msfp

Thanks. The button is deceptively simple and took a fair bit of fiddling around with an iframe and div to get it right. The downside is that the button requires the score to be fetched from in order to function, which can cause a bit of lag in loading the page.

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