Best way to write a plugin
sorry for the simple question, I find it hard to get proper docs, I don't even know where I should look.
Using the plugin creator is a joke, it doesn't give any help with syntax, errors, formatting etc.
which editor should I use to write plugins?
thanks
Comments
QtCreator maybe
In reply to QtCreator maybe by Jojo-Schmitz
>> QtCreator maybe
Pretty expensive !!
I'm using Notepad++ with the javascript text-styling.
Here are my sources of info:
* QML 5: https://doc.qt.io/qt-5/qmltypes.html
* MuseScore score elements organisation: https://musescore.org/en/developers-handbook/references/musescore-inter…
* MuseScore API: https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/class…
* Note pitch values: https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/pitch…
* Tonal pitch: https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/tpc.h…
* Everything about tick length: https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/tickl…
* All Known "cmd(xxx)" actions(*): https://raw.githubusercontent.com/musescore/MuseScore/3.x/mscore/shortc…
(*) required when you want to achieve some command not supported by the API (such as "Copy", "Paste", ...)
In reply to >> QtCreator maybe Pretty… by parkingb
> "Pretty expensive !!"
How so? Completely free for open source usage such as MuseScore Development.
In reply to > "Pretty expensive !!" How… by jeetee
This is a good news. I didn't see it :-/
In reply to QtCreator maybe by Jojo-Schmitz
Hi Jojo, Have you already used Qt Creator for writing MuseScore plugin ? How do you configure it (for not complaining about unknown MuseScore & co libraries) ?
In reply to Hi Jojo, Have you already… by parkingb
Not for writing, but for editing existing ones, and from a session/setup suitable to build MuseScore
Docs You can find here https://musescore.github.io/MuseScore_PluginAPI_Docs/plugins/html/index…
New musescore plugin developer here as well, 3 weeks into the game and hope my setup will inspire you:
Syntax & Formatting: I personally use Sublime Text. Install qml syntax highlighting plugin in Sublime Text's package manager. It makes writing qml so much faster and visually comfortable.
Testing: then I use MuseScore's Plugin Creator to test out my code.
Debugging: I add a lot of console.log() in my plugin for debugging purpose (the log will be printed in Plugin Creator's console, that's why plugin creator is very useful). It acts like the breakpoints in other IDE's debugging tools.
Docs: official docs are just like dictionary, it's very informative but it only has few code examples and won't teach you too much methodical things. From my experience, the best way to learn how to write a specific function is by learning other people's code. Try to imagine what kind of existed plugins that potentially has the similar function that you want to write, then search for it, find and study the code excerpts. The community has created plenty of cool tricks so definitely dig into it! I hope this post is helpful for you and have fun!
Another plugin newbie here. Documentation sucks but these helped me to get started: Checking sources from existing plugins, Plugin examples from musescore github or just searching github for musescore QML files. For editing I'm using Atom with javascript syntax checking - which works at least for the javascript parts.