We released the OSMD MusicXML audio player almost a year ago. Our usual focus is improving OSMD in general (the latest version 1.3.0. just got released), but this time it was the audio player’s turn to upgrade.
New playback function
Our brand new function
playFromMs() starts the playback from a certain time in the sheet (in milliseconds).
For example, osmd.PlaybackManager.playFromMs(5000) starts playback 5 seconds from the start, or at least the next closest timestamp to that.
This upgrade was always on our radar, but after getting a new bunch of member requests, we knew we had to put it further up in our list of priorities. It was time to turn on the development assembly line, and we started to work on it right away. Community feedback is a vital piece of the OSMD development roadmap.
There’s also a new function
getTimestampFromMs() if you just want to turn milliseconds into OSMD’s timing system.
Bugfixing is always a priority, and we found a critical bug where it would play multiple notes on starting the playback from a cursor position (like the end of the sheet): It was playing notes that started before the current cursor position.
This is now fixed:
We also introduced a new option called “PlayAlreadyStartedNotesFromCursorPosition”, to also play notes like the half note chord in the example.
To use it, just set
osmd.EngravingRules.PlayAlreadyStartedNotesFromCursorPosition to true. This plays the notes that should still be continuing at the cursor position like the whole notes in the image below.
Looking back on the OSMD audio player
It’s been almost a year since we released the audio player, and the community response really elevated us. Currently, digital sheet music developers all over the world are using it on their music projects.
We are happy about the progress with the audio player especially with the recent updates, and there are almost no open issues in our audio player repository, which suggests that our users aren’t in high need for specific improvements right now. But of course, there are always things we want to improve, and we will continue fine tuning the player and adding new features.
Let’s stay in touch
Other than new upgrades and plugins we’re very busy with making new content and screencasts about OSMD and sheet music in general. Join our Discord channel to meet other sheet music devs or showcase your projects. You can also become a sponsor to get exclusive goodies and early releases to our builds like the audio player, or just try the OSMD demos.