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
11.82k stars 2.57k forks source link

Add MP3/WAV file in Mixer as reference audio #22161

Open TeeDeeY opened 3 months ago

TeeDeeY commented 3 months ago

Your idea

Similar to: https://github.com/musescore/MuseScore/issues/19674#issue-1935495732 but also different.

I have a vocal track that I want to use to guide me when making and modifying a Score. If there is an “MP3” instrument in the Mixer window that plays a stereo file in parallel with Musescore instruments, that would be excellent. If a WAV file is easier to implement, that would be fine. (An initial delay is fine if decoding to a raw music file for ease of streaming is OK also).

I am not proposing a full blown audio system. The structure of Musescore that I saw in some document makes it seem “reasonable” that a virtual instrument feeding an audio stream to the mixer is not overly complicated.

Thank you for considering it. If you think about limiting it to one fixed instrument and a predefined sample rate, it could be less difficult to implement.

The Mixer volume should work but other features could be turned off.

Problem to be solved

For music with a semi-freeform style, exact measure boundaries aren’t always available. The vocal track dictates the music.

When adding dramatic embellishments, experimenting with the Score and hearing it against the vocals track right away is important.

For transcribers, incorrect note decisions will be very apparent.

For music for videos or soundtracks, the reference is needed.

Adding the feature to Musescore will likely bring more people to use Musescore.

Musescore.com scores could be more desirable if they had vocals or other background sound effects with them.

A secondary feature is to be able to skew the music +/- so many seconds to initially align it.

Prior art

Logic Pro lets multiple digital audio tracks operate in parallel with multiple note-based music. This isn’t a new thing.

Backing tracks with either software instruments or digitally recorded live instruments mixed together helps the show go on when musicians are present or absent.

It would be nice if multiple digital music tracks can play in parallel. Starting with just one track would be great !

Additional context

Someone discussed how they feed Musescore midi to a DAW, which then allows a coordination of music and video. That’s a lot of work for most people.

Having a simple coordinated digital audio track within Musescore would help a lot of people who want to write music with an easier work flow.

I like the Musescore-way of writing music via a Score model. The reference track is important to me.

* If this is a valid community project, a discussion on what code changes to implement this would be helpful. I.e. Mixer plays this even though no notes on the score. The early version would be an automatic “background” track to the mixer at first, then working on the interface portion (actually the most work).

TeeDeeY commented 3 months ago

Ah. I’m thinking my initial version would take over the metronome audio chain, which I don’t use (or duplicate it, making two metronomes seemingly available internally, but one labeled external audio in the Mixer). It’s already a non-score note sound source with mixer interface and volume control. Once music can flow through that, the interfaces can be worked on in separate steps, possibly be different people. The interface design would need the agreement with the Musescore design team, and then the separate pieces can be added on. If a program execution switch can be allowed at startup, then the external audio function would be mostly hidden, except for those who would be implementing the user interface and converting a music file into the proper format and buffering the input as necessary.

As a metronome-like instrument, an external audio source seems in line with the current program. :-)

Would that type of initial implementation be acceptable for inclusion in a production version?

I’m guessing the metronome is told something about “time” within the file, especially when the playing is started somewhere in the middle. This may need slight expansion so that the audio from the file can be pulled and buffered but hopefully a relationship already exists.

For audio, let’s assume a WAV to start, converted into a large raw audio file, without the various allowable internal format issues, ready for direct output to the Mixer. This makes pulling data out of it straightforward. Just a math calculation.