How to edit existing plugin in v. 2.0

• Apr 15, 2015 - 03:13

I tried to search the forum on this, entering the keywords "edit plugin," and got only an error message saying:

Access denied

You are not authorized to access this page.

So much for that!

I can load the plugin "walk," run it (nothing happens), but cannot see it in the plugins folder, nor see/edit its code anywhere. If I run the note names plugin, it immediately does its thing, adding the note names to the score, but neither can I see it in the plugins directory, nor edit its source.

I want to create a plugin that will, instead of note names, enter the chord names, for those who play a chord-based instrument (guitar, accordion, etc.). I've never programmed for MuseScore before, so tips will be appreciated. I do have experience with JS programming, and have programmed some complex scripts for fxScript (Final Cut Pro 7.0), so I just need to know the syntax/grammar for MuseScore in identifying the proper elements. This is why I had hoped to find the source for the "walk" script.

Thank you for your help.


Comments

If you're on a Mac, go to Contents/Resources/plugins, rather than Contents/Plugins. The plugins in 2.0 are written in QML, therefore the .qml extension. If you're on Windows, they should be in the MuseScore2/plugins directory.

In reply to by jensm

Thank you for the reply. Yes, I'm on a Mac. I'm going to the MuseScore2/Plugins directory that the software itself opens upon having selected "Plugin Creator..." from the Plugins menu and then clicking on the folder icon to open a plugin. There is nothing in that directory which appears visible, in any format. It appears to be an empty directory, as are the Templates, Styles, Scores, and Images directories alongside of it. There is no Contents directory listed.

UPDATE: You gave me the tip that they are in .qml format, so I searched for all plugins that I could find in that format by entering ".qml" in Finder. I found only one file, in my Downloads folder, which I appear to have downloaded, perhaps for v. 1.3 (which I have used until now), about two months ago. I did not find any others.

In reply to by Tongkam

You'll need to use Finder. Go to the MuseScore2.app in Applications, right-click and choose "Show package contents." Then you should be able to open the Contents/Resources/plugins folder. The Plug-in Creator is using a separate plugins folder in Documents, and you won't be able to open the existing plugins using the Plugin Creator (they aren't stored in that Documents/MuseScore2/plugins folder).

In reply to by jensm

Yes, you're right. I found the files, thank you. Now, having opened the "walk" file, it is very scant on detail, leaving me with little of the help I had hoped for...but that's fit for another topic.

I guess, because the files cannot be opened on a Mac via the software, the only way to edit them is to open them with some other application, copy the code, then paste it back into MuseScore2 in creating a new plugin. That seems rather tedious, but sometimes a workaround is the best one has.

In reply to by Tongkam

Yes, I agree with the others - didn't mean to imply you cannot open the existing plugins at all with the creator, just not from the .app package. The creator is good for running and debugging, but I prefer using a code editor and then just dumping the code into the creator when I want to debug. You might find it helpful to look at the QML documentation: http://doc.qt.io/qt-5/qmltypes.html and also use the help manual in the creator, which provides documentation for the plugin API.

@Tongkam I like to solve the search issue you encountered. Can you remember from which page you initiated the search? If so, please pass me on the url so I can reproduce and fix the issue.

In reply to by Thomas

Yes, I went to the "How to ask for support or report bug." page, being a beginner, and near the top of that page was a link to a search, recommended before posting anything new. The how-to page was this:

https://musescore.org/node/77

and the search link was:

https://musescore.org/en/search

I note that the "Access denied" just appeared there for me again after entering my search terms. Thank you for your willingness to work on this.

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