Music Sheet Viewer WordPress plugin

« Music Sheet Viewer » plugin allows you to display a music sheet written in MEI, MusicXML or PAE, in a WordPress page.

The code is entered directly using the shortcode tag [pn_msv] … and that’s all!!

You do not need to escape HTML entities or anything. Just post your code as-is, even if the code is an XML dialect. The plugin will handle the rest.

With this plugin, never ever upload a music sheet image to your website that is not zoomable and requires a new upload every time a single note must be changed!!!

At last it’s fully responsive!

Example : This same page uses the « Music Sheet Viewer » plugin.

The following PAE code :


displays as :

MusicSheetViewerPlugin 2.1


The plugin can be installed from : Music Sheet Viewer on WordPress plugins directory


The music sheet rendering is powered by the Verovio JavaScript toolkit.

Supported formats

« Music Sheet Viewer » supports code written in MEI, MusicXML or PAE (RISM format).

Supported inputs

The input can be entered either inline inside [pn_msv] and [/pn_msv] shortcode, or for big scores, using the file parameter.

Content displayed

This plugin is not intented for displaying a full score with many pages, but either the first page of a multi-pages score, or music incipts.

Score layout

The score fits automatically to the content in which it’s placed without any specific indication.
If what is displayed is too small to fit to the allowed content it’s possible to justify the rendering, using the layout="justified" parameter.

Shortcode parameters


Format of the music sheet code when passed inline. Has no effect if file parameter is used.

Possible values : mei (MEI), xml (MusicXML) or pae (RISM format).

Default format is pae as it’s compact and convenient for displaying music sheet fragments.

Note that « Music Sheet Viewer » doesn’t check that the code is written in the language passed to format parameter. If they don’t match, the result is unpredictable.


If the code isn’t specified inline, allows to indicate either :

  • a local file previously uploaded on your website
  • In this case, file parameter must start with a ‘/’ and is assumed to be found under your website’s root.

    Example :

    [pn_msv file="/wp-content/uploads/2017/05/DoSerrure.mei"/]
  • a remote file
  • Specify the complete URL of the file.

    Example :

    [pn_msv format="mei" file=""/]

    Warning: Note that remote files can only be accessed on sites enabling Cross-Origin Requests (CORS) (see


Renders the score with the corresponding SMuFL font. Three fonts are available : Leipzig, Bravura and Gootville. By default, Leipzig is used.

A specific font value (« roll ») allows the music fragment to be displayed in a loop, in all available fonts. The font is changed every 2 seconds and the animation lasts 2 minutes. It can allow choosing at preview time which font is best for your score, or just to show it for demonstrating the capabilities of digital scores.


By default the score fits automatically to the content in which it’s placed.

layout="justified" allows to maximize the space used to display a score line too small to fit to the allowed content.
To keep for this specific situation as this option will display every music sheet on a single line.

This is the only possible layout value so far.

Example :
Without justification :

@data:=25//$xFCG @c 2-4.-'8E/{6AGFE}{8A''C}'B''4D{6C'B}/{''DC'BA}{''8EA}
MusicSheetViewerPlugin 2.1

With justification:

[pn_msv layout="justified" font="Gootville"]
@data:=25//$xFCG @c 2-4.-'8E/{6AGFE}{8A''C}'B''4D{6C'B}/{''DC'BA}{''8EA}
MusicSheetViewerPlugin 2.1


Allows you to assign an id to the underlying generated HTML element.
That allows you styling it with a CSS element selector.


Allows you to assign a class to the underlying generated HTML element.
That allows you styling it with a CSS class selector.

NB : CSS styles on a specific page can be added by means of the Per page add to head plugin

Error messages

Error messages can raise at preview time (e.g font parameter with an unknown value), letting you fix the code prior to publishing.
Or they can raise later, for example if the content of a score file previously uploaded is changed and produces a loading error : In this case the error might only be visible in the browser’s console in development mode.


From WordPress 5.0 it is strongly recommended to switch to the Classical editor if you intend to write pn_msv shortcodes with inline MusicXML or MEI code.
Indeed Gutenberg, even under the Code editor, swallows some tags like <body> which is a licit MEI tag.

Known restrictions

No nested shortcodes are allowed within MEI or XML formats.


Gallery of examples using Music Sheet Viewer plugin

Les commentaires sont fermés.