In order to run the MEI Snippet Viewer on your web page, you need the file meisnippetviewer.min.js and jQuery. If you use Bower, add the following line to your dependencies in bower.json

"meisnippetviewer": "git://"

and run bower update from the root of your project. This will install the MEI Snippet Viewer and jQuery.

If you don't use Bower, you can download jQuery and meisnippetviewer.min.js manually (for the MEI Snippet Viewer, see

Basic usage

Include both scripts in your HTML page:

<script type="text/JavaScript" src="js/jquery.min.js"></script>
<script type="text/JavaScript" src="js/meisnippetviewer.min.js"></script>

and create an MEI.Viewer object:

var viewer = new MSV.Viewer({ 
      data   : myMEIData,
      target : $('#my-music-span')

Rendering of the music is triggered automatically on object creation.

See Data for ways of adding MEI code to your web page.

For a list of available options see the section Available options.