Global Variables

Atnaujinta prieš 4 years

This documentation applies to plugins for 1.x only!


Documentation for 2.x+ is built into the Plugin Creator of Musescore.

( ⇒ In Musescore press Ctrl+Shift+P, then F1 to bring it up. )


Click here for Documentation for 3.x



The following variables are directly available to any plugin.

Name Type Description
curScore Score Object the score currently active in MuseScore, if any, see also below (read-only).
division integer number of MIDI ticks for 1/4 note (read-only).
localeName ? ? (currently disabled)
mscore ? ?
mscoreDPI integer ?
mscoreMajorVersion integer the first part of the MuseScore version (read-only).
mscoreMinorVersion integer the second part of the MuseScore version (read-only).
mscoreUpdateVersion integer the third part of the MuseScore version (read-only).
mscoreVersion integer the complete version number of MuseScore in the form: MMmmuu (Major / minor / update; read-only).
pluginPath string the complete path of the running plugin, without file name (read-only).

in MuseScore 1.2+ you can (and should, before accessing curScore in any other form or shape!) test, if at least one score is open with the following code.

if (typeof curScore === 'undefined')
   //no score