Embed: New API methods, Only display TABs and Transparent backgrounds
Hi everyone,
We added several new features in our Embed product, discover them today:
- New JavaScript methods to control our playback options
- New JavaScript methods and events to get information about the current measure and note/rest
- New option to only display tablatures
- New option to have a transparent background
JavaScript methods to control our playback
Our embed already had several APIs methods to control basic playback features, such as play
, pause
, stop
and mute
, and events like playbackPosition
to get the current playback position.
We added new methods to control more advanced options of our playback:
getMasterVolume
andsetMasterVolume
to control the global ("master") volume of the playback-
getPartVolume
andsetPartVolume
to control the volume of one instrument -
mutePart
andunmutePart
to mute and unmute the volume of one instrument -
setPartSoloMode
,unsetPartSoloMode
andgetPartSoloMode
to make an instrument playing solo getPartReverb
andsetPartReverb
to change the reverberation of an instrument
The complete documentation of our JavaScript is available on our website and on GitHub with our SDK.
JavaScript methods to get the current measure and note/rest information
We also added two new methods and two new JavaScript events to get information about the current measure and note/rest.
Our API methods can be called anytime to retrieve information about the current cursor context. You can also subscribe to the corresponding events to receive the details as soon they change, either because the score is being edited or the cursor moved.
For the measures: you can now call getMeasureDetails
and subscribe to the measureDetails
event to get information about the current measure attributes: clef, key signature, time signature, transpositions, etc.
For the notes/rests: you can now call getNoteDetails
and subscribe to the noteDetails
event to get information about the current chord or rest: its duration, pitches/lines, articulations, ornaments, etc.
The complete documentation of our JavaScript is available on our website and on GitHub with our SDK.
Option to only display tablatures
We added a new option to only display TABs and hide notation staves. This one is called hideNonTab
and is available as an URL Parameter. You can use our embed generator to quickly build your custom embed code that will only display your tablatures. Here is an example below using this new option:
Transparent backgrounds
If you want to use our embed on a page with a non-white background, you can now use our transparent background option. Just set themeScoreBackground
to transparent
as a theme option.
Flat is the first user of our embed product and we are already using this feature for our Microsoft Teams App we launched a few weeks ago. This option makes the score page rendering beautifully on their beige background:
Have any feedback?
Like any of our product updates, these features were requested by our community and customers. If you have any feedback or requests regarding our Embed or APIs, please contact our team at developers@flat.io.
Thank you,
Vincent