---
url: https://flat.io/developers/docs/embed/api.md
description: Complete reference for the Flat Embed JavaScript SDK
---

# API Reference

The Flat Embed SDK provides 66 methods to control and interact with embedded sheet music.

## Quick Navigation

Press `⌘ + K` (Mac) or `Ctrl + K` (Windows/Linux) to search for specific methods.

## Browse by Category

### [Core Methods](./core.md)

Essential methods for embed initialization and configuration (3 methods)

| Method | Description |
|--------|-------------|
| [`ready()`](./core.md#ready) | Wait for the embed to be ready |
| [`getEmbedConfig()`](./core.md#getembedconfig) | Get the embed configuration |
| [`setEditorConfig()`](./core.md#seteditorconfig) | Set the editor configuration |

### [Event System](./events.md)

Subscribe to and handle embed events (2 methods)

| Method | Description |
|--------|-------------|
| [`on()`](./events.md#on) | Subscribe to a specific event |
| [`off()`](./events.md#off) | Unsubscribe to a specific event |

### [Score Management](./score-management.md)

Methods for loading and exporting scores in various formats (14 methods)

| Method | Description |
|--------|-------------|
| [`loadFlatScore()`](./score-management.md#loadflatscore) | Load a score hosted on Flat |
| [`loadMusicXML()`](./score-management.md#loadmusicxml) | Load a MusicXML score |
| [`loadMIDI()`](./score-management.md#loadmidi) | Load a MIDI score |
| [`loadJSON()`](./score-management.md#loadjson) | Load a Flat JSON score |
| [`loadABC()`](./score-management.md#loadabc) | Load an ABC notation score |
| [`getJSON()`](./score-management.md#getjson) | Get the score in Flat JSON format |
| [`getMusicXML()`](./score-management.md#getmusicxml) | Convert the displayed score to MusicXML |
| [`getPNG()`](./score-management.md#getpng) | Convert the displayed score to PNG image |
| [`getMIDI()`](./score-management.md#getmidi) | Convert the displayed score to MIDI |
| [`getMP3()`](./score-management.md#getmp3) | Convert the displayed score to MP3 audio |
| [`getWAV()`](./score-management.md#getwav) | Convert the displayed score to WAV audio |
| [`getPDF()`](./score-management.md#getpdf) | Convert the displayed score to PDF |
| [`getSVG()`](./score-management.md#getsvg) | Convert the displayed score to SVG |
| [`getFlatScoreMetadata()`](./score-management.md#getflatscoremetadata) | Get the metadata of the score (for scores hosted on Flat) |

### [Display & View](./display.md)

Control the visual presentation of the score (6 methods)

| Method | Description |
|--------|-------------|
| [`fullscreen()`](./display.md#fullscreen) | Toggle fullscreen mode |
| [`print()`](./display.md#print) | Print the score |
| [`getZoom()`](./display.md#getzoom) | Get the current zoom ratio |
| [`setZoom()`](./display.md#setzoom) | Set the zoom ratio |
| [`getAutoZoom()`](./display.md#getautozoom) | Get the auto-zoom status |
| [`setAutoZoom()`](./display.md#setautozoom) | Enable or disable auto-zoom |

### [Playback Control](./playback.md)

Control playback, volume, speed, and metronome settings (10 methods)

| Method | Description |
|--------|-------------|
| [`play()`](./playback.md#play) | Start playback |
| [`pause()`](./playback.md#pause) | Pause playback |
| [`stop()`](./playback.md#stop) | Stop playback |
| [`mute()`](./playback.md#mute) | Mute playback |
| [`getMasterVolume()`](./playback.md#getmastervolume) | Get the current master volume |
| [`setMasterVolume()`](./playback.md#setmastervolume) | Set the master volume |
| [`getMetronomeMode()`](./playback.md#getmetronomemode) | Get the metronome mode |
| [`setMetronomeMode()`](./playback.md#setmetronomemode) | Set the metronome mode |
| [`getPlaybackSpeed()`](./playback.md#getplaybackspeed) | Get the playback speed |
| [`setPlaybackSpeed()`](./playback.md#setplaybackspeed) | Set the playback speed |

### [Parts & Instruments](./parts.md)

Manage individual parts, instruments, and their audio settings (12 methods)

| Method | Description |
|--------|-------------|
| [`getPartVolume()`](./parts.md#getpartvolume) | Get the volume of a specific part |
| [`setPartVolume()`](./parts.md#setpartvolume) | Set the volume of a specific part |
| [`mutePart()`](./parts.md#mutepart) | Mute a specific part |
| [`unmutePart()`](./parts.md#unmutepart) | Unmute a specific part |
| [`setPartSoloMode()`](./parts.md#setpartsolomode) | Enable solo mode for a part |
| [`unsetPartSoloMode()`](./parts.md#unsetpartsolomode) | Disable solo mode for a part |
| [`getPartSoloMode()`](./parts.md#getpartsolomode) | Get the solo mode status of a part |
| [`getPartReverb()`](./parts.md#getpartreverb) | Get the reverb level of a part |
| [`setPartReverb()`](./parts.md#setpartreverb) | Set the reverb level of a part |
| [`getParts()`](./parts.md#getparts) | Get information about all parts |
| [`getDisplayedParts()`](./parts.md#getdisplayedparts) | Get the currently displayed parts |
| [`setDisplayedParts()`](./parts.md#setdisplayedparts) | Set which parts to display |

### [Audio/Video Tracks](./tracks.md)

Synchronize external audio or video with the score (3 methods)

| Method | Description |
|--------|-------------|
| [`setTrack()`](./tracks.md#settrack) | Configure an audio or video track |
| [`useTrack()`](./tracks.md#usetrack) | Enable a previously configured track |
| [`seekTrackTo()`](./tracks.md#seektrackto) | Seek to a position in the audio track |

### [Navigation & Cursor](./navigation.md)

Navigate through the score and control cursor position (6 methods)

| Method | Description |
|--------|-------------|
| [`focusScore()`](./navigation.md#focusscore) | Set focus to the score |
| [`getCursorPosition()`](./navigation.md#getcursorposition) | Get the cursor position |
| [`setCursorPosition()`](./navigation.md#setcursorposition) | Set the cursor position |
| [`goLeft()`](./navigation.md#goleft) | Move cursor left |
| [`goRight()`](./navigation.md#goright) | Move cursor right |
| [`scrollToCursor()`](./navigation.md#scrolltocursor) | Scroll to cursor position |

### [Score Data & Structure](./data.md)

Access and query score structure, measures, notes, and metadata (10 methods)

| Method | Description |
|--------|-------------|
| [`getNbMeasures()`](./data.md#getnbmeasures) | Get the number of measures in the score |
| [`getMeasuresUuids()`](./data.md#getmeasuresuuids) | Get the measure UUIDs of the score |
| [`getMeasureDetails()`](./data.md#getmeasuredetails) | Get detailed measure information |
| [`getNbParts()`](./data.md#getnbparts) | Get the number of parts in the score |
| [`getPartsUuids()`](./data.md#getpartsuuids) | Get the part UUIDs of the score |
| [`getMeasureVoicesUuids()`](./data.md#getmeasurevoicesuuids) | Get voice UUIDs for a specific measure |
| [`getMeasureNbNotes()`](./data.md#getmeasurenbnotes) | Get the number of notes in a voice |
| [`getNoteData()`](./data.md#getnotedata) | Get information about a specific note |
| [`playbackPositionToNoteIdx()`](./data.md#playbackpositiontonoteidx) | Convert playback position to note index |
| [`getNoteDetails()`](./data.md#getnotedetails) | Get note details at cursor position |

## All Methods

| Method | Description |
|--------|-------------|
| [`focusScore()`](./navigation.md#focusscore) | Set focus to the score |
| [`fullscreen()`](./display.md#fullscreen) | Toggle fullscreen mode |
| [`getAutoZoom()`](./display.md#getautozoom) | Get the auto-zoom status |
| [`getCursorPosition()`](./navigation.md#getcursorposition) | Get the cursor position |
| [`getDisplayedParts()`](./parts.md#getdisplayedparts) | Get the currently displayed parts |
| [`getEmbedConfig()`](./core.md#getembedconfig) | Get the embed configuration |
| [`getFlatScoreMetadata()`](./score-management.md#getflatscoremetadata) | Get the metadata of the score (for scores hosted on Flat) |
| [`getJSON()`](./score-management.md#getjson) | Get the score in Flat JSON format |
| [`getMasterVolume()`](./playback.md#getmastervolume) | Get the current master volume |
| [`getMeasureDetails()`](./data.md#getmeasuredetails) | Get detailed measure information |
| [`getMeasureNbNotes()`](./data.md#getmeasurenbnotes) | Get the number of notes in a voice |
| [`getMeasuresUuids()`](./data.md#getmeasuresuuids) | Get the measure UUIDs of the score |
| [`getMeasureVoicesUuids()`](./data.md#getmeasurevoicesuuids) | Get voice UUIDs for a specific measure |
| [`getMetronomeMode()`](./playback.md#getmetronomemode) | Get the metronome mode |
| [`getMIDI()`](./score-management.md#getmidi) | Convert the displayed score to MIDI |
| [`getMP3()`](./score-management.md#getmp3) | Convert the displayed score to MP3 audio |
| [`getMusicXML()`](./score-management.md#getmusicxml) | Convert the displayed score to MusicXML |
| [`getNbMeasures()`](./data.md#getnbmeasures) | Get the number of measures in the score |
| [`getNbParts()`](./data.md#getnbparts) | Get the number of parts in the score |
| [`getNoteData()`](./data.md#getnotedata) | Get information about a specific note |
| [`getNoteDetails()`](./data.md#getnotedetails) | Get note details at cursor position |
| [`getPartReverb()`](./parts.md#getpartreverb) | Get the reverb level of a part |
| [`getParts()`](./parts.md#getparts) | Get information about all parts |
| [`getPartSoloMode()`](./parts.md#getpartsolomode) | Get the solo mode status of a part |
| [`getPartsUuids()`](./data.md#getpartsuuids) | Get the part UUIDs of the score |
| [`getPartVolume()`](./parts.md#getpartvolume) | Get the volume of a specific part |
| [`getPDF()`](./score-management.md#getpdf) | Convert the displayed score to PDF |
| [`getPlaybackSpeed()`](./playback.md#getplaybackspeed) | Get the playback speed |
| [`getPNG()`](./score-management.md#getpng) | Convert the displayed score to PNG image |
| [`getSVG()`](./score-management.md#getsvg) | Convert the displayed score to SVG |
| [`getWAV()`](./score-management.md#getwav) | Convert the displayed score to WAV audio |
| [`getZoom()`](./display.md#getzoom) | Get the current zoom ratio |
| [`goLeft()`](./navigation.md#goleft) | Move cursor left |
| [`goRight()`](./navigation.md#goright) | Move cursor right |
| [`loadABC()`](./score-management.md#loadabc) | Load an ABC notation score |
| [`loadFlatScore()`](./score-management.md#loadflatscore) | Load a score hosted on Flat |
| [`loadJSON()`](./score-management.md#loadjson) | Load a Flat JSON score |
| [`loadMIDI()`](./score-management.md#loadmidi) | Load a MIDI score |
| [`loadMusicXML()`](./score-management.md#loadmusicxml) | Load a MusicXML score |
| [`mute()`](./playback.md#mute) | Mute playback |
| [`mutePart()`](./parts.md#mutepart) | Mute a specific part |
| [`off()`](./events.md#off) | Unsubscribe to a specific event |
| [`on()`](./events.md#on) | Subscribe to a specific event |
| [`pause()`](./playback.md#pause) | Pause playback |
| [`play()`](./playback.md#play) | Start playback |
| [`playbackPositionToNoteIdx()`](./data.md#playbackpositiontonoteidx) | Convert playback position to note index |
| [`print()`](./display.md#print) | Print the score |
| [`ready()`](./core.md#ready) | Wait for the embed to be ready |
| [`scrollToCursor()`](./navigation.md#scrolltocursor) | Scroll to cursor position |
| [`seekTrackTo()`](./tracks.md#seektrackto) | Seek to a position in the audio track |
| [`setAutoZoom()`](./display.md#setautozoom) | Enable or disable auto-zoom |
| [`setCursorPosition()`](./navigation.md#setcursorposition) | Set the cursor position |
| [`setDisplayedParts()`](./parts.md#setdisplayedparts) | Set which parts to display |
| [`setEditorConfig()`](./core.md#seteditorconfig) | Set the editor configuration |
| [`setMasterVolume()`](./playback.md#setmastervolume) | Set the master volume |
| [`setMetronomeMode()`](./playback.md#setmetronomemode) | Set the metronome mode |
| [`setPartReverb()`](./parts.md#setpartreverb) | Set the reverb level of a part |
| [`setPartSoloMode()`](./parts.md#setpartsolomode) | Enable solo mode for a part |
| [`setPartVolume()`](./parts.md#setpartvolume) | Set the volume of a specific part |
| [`setPlaybackSpeed()`](./playback.md#setplaybackspeed) | Set the playback speed |
| [`setTrack()`](./tracks.md#settrack) | Configure an audio or video track |
| [`setZoom()`](./display.md#setzoom) | Set the zoom ratio |
| [`stop()`](./playback.md#stop) | Stop playback |
| [`unmutePart()`](./parts.md#unmutepart) | Unmute a specific part |
| [`unsetPartSoloMode()`](./parts.md#unsetpartsolomode) | Disable solo mode for a part |
| [`useTrack()`](./tracks.md#usetrack) | Enable a previously configured track |
