Using musescore's sound engine

• Jun 9, 2019 - 03:47

Would it be possible to use musescore's sound engine via plugins?
For example, is there a way, for a plugin, to play the sound of a G?
I guess I could add the G to a score and then start the playback (but how do you even start the playback from within the .qml?), but is there any straightforward way?

Or, would it be possible to use the sound engine completely outside musescore? What in the repository would I need to be able to, let's say, play the sound of a Bb on a guitar?

The idea is the following: if someone wants to make any app which needs a precise playback (like in a metronome, or in an ear training program), could they use part of musescore's sound engine for that?


Comments

They could, musescore is entirely open source, so is the synthesizer we use.

This however reaches far beyond "normal" plugin usage and as such is probably a harder task than actually building your own C++ program with the relevant parts of the MuseScore sources.

And FWIW, "our" sound engine is really just the Fluidsynth library. Well, more to it than that, but really, if you're writing your own app, better to just use a library designed to be used in that way.

> if someone wants to make any app which needs a precise playback (like in a metronome, or in an ear training program), could they use part of musescore's sound engine for that?

You could use MuseScore's batch mode to generate pre-recorded samples as WAV or MP3 files. You'd only need two short percussion clips for a metronome. An ear training program would require one short clip for each note on the piano; you'd play two clips back in sequence to generate melodic intervals, or simultaneously to generate harmonic intervals.

If you are doing anything more complicated then you need to build a sound engine into your app. As Marc said, MuseScore's sound engine is really another program/library called FluidSynth.

Do you still have an unanswered question? Please log in first to post your question.