musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.14k stars 2.63k forks source link

Support real-time performance/playback (sound preview) #23422

Open wizofaus opened 3 months ago

wizofaus commented 3 months ago

Your idea

MuseScore studio could have an "real-time performance" or "real-time playback" mode, suitable for trying out musical ideas before performing note entry.

Problem to be solved

Currently MuseScore does not seem to have the ability to simply allow you to use a MIDI keyboard for real-time playback, honouring note on/note off/velocity signals/sustain pedal/expression controllers etc., with no limits on simultaneously sustained pitches in chords and driving either the MS Basic synth or ideally the Muse Sampler/Muse Sounds playback engine. But when composing or even arranging and trying out different chords etc. this is essential! I explicitly bought a larger input keyboard for this purpose, as it's what I was used to with other software I'd used in the past, and was rather taken aback there is no such ability in MuseScore Studio 4 that I can tell.

Prior art

I believe most DAWs support this, as did Encore, and probably most other notation software packages (e.g. Sibelius "live playback" etc.). I understand MuseScore 3.6 even supported it to a limited degree.

In fact QSynth already supports this, when configured with the "MS Basic.sf3" soundfont file. But obviously it has no way of knowing what instrument you want to use based on what staff is selected in MuseScore studio. And most frustratingly, Windows does not make it easy to switch between applications that are all trying to use the MIDI driver.

Additional context

Happy to contribute towards the implementation, though I gather mapping note on/note off messages into Muse Sampler in real time might be tricky.

cbjeukendrup commented 3 months ago

To some extent this seems a duplicate of https://github.com/musescore/MuseScore/issues/13381, except that this is slightly more extensive, also mentioning velocity.

To my knowledge, this is a limitation at the MIDI input handling side, probably in NotationMidiInput; so not at the driver, nor at MuseSampler(Wrapper/Sequencer) because MuseSampler has AuditionStartNoteEvent and AuditionStopNoteEvent exactly for this purpose.

wizofaus commented 3 months ago

What I didn't actually realise is that Muse Score doesn't actually support real-time note input either - which is arguably even more useful than just a basic pass-through mode where nothing was captured. I'd assume there'd be some overlap in implementing it. But that issue is just about note durations - I've also observed that chords don't play back reliably either.

wizofaus commented 2 months ago

BTW, I also realised what I want is the ability to use different instruments depending on the pitch! Mainly for Muse Strings - being able to play a chord and have it choose the highest-possible instrument for which each note in a chord is in range would be super powerful (so if I play any note below a cello's range, it uses contrabass, but notes in the subsequent octave use cello, then viola up to the G after which violins can be used).

Alternatively if there were a mode you could easily flip to where it just used a neutral piano sound, that'd be better than what you get now where you simply hear nothing if you play notes outside of the range of whatever instrument you're currently on.