Skip to content
Get it free

PremiumPremium

Embed Code block

The OSMD Embed Code block makes an HTML code that shows one of your scores on another website. The score keeps living on your WordPress site: the other site shows it in an iframe that loads from yours.

Make an embed code

  1. In the block editor, click + and search for OSMD Embed Code.
  2. Under Basic Options, click Select Media and choose a MusicXML file from your Media Library.
  3. Under OSMD Render Options, set up the score: width, aspect ratio, zoom, drawing options, Scrollable Sheet Pane, transposition, playback, follow cursor, performance mode, the visitor controls (transpose, zoom, PDF, PDF format) and copyright text.
  4. Click the clipboard icon (Copy Code) next to the code.
  5. Paste the code into the HTML of the other site.

The block shows the code itself, in the editor and on the published page, with the copy button next to it. Publish it where people may copy it, for example on a page for partners, or keep it in a draft and only copy the code from there.

What the code does

It’s an iframe, full width and at least 750 pixels high, whose address points to your site’s home URL with a signed token and the settings. Your site checks the token before it shows the score.

When an embed stops working

  • Your site’s address changed. The token is tied to the home URL it was made on. Make a new code after a move to a new domain, or from http to https.
  • The file is gone. The token points to the file in your Media Library. Deleting the file breaks the embed.
  • Premium isn’t active. The embed is served by premium on your site, so it stops when you deactivate premium or its license on that site. Your WordPress site has to stay online for embeds to show.

The signing key

Premium creates a random key for the tokens. It’s under OSMD Settings → Embedded OpenSheetMusicDisplay Settings → Private Key for Embed Code Authorization, masked, with an eye icon to show it. Keep it secret: anyone with the key can make valid tokens for any MusicXML file in your Media Library.

Updated 27 November 2026, checked against premium 1.5.0. Something wrong or missing? Write to support@opensheetmusicdisplay.org.