Skip to content

Commit

Permalink
fix #302710: change default for harmony channel to piano
Browse files Browse the repository at this point in the history
Resolves: https://musescore.org/en/node/302710

Chord symbols current play back using the sound of the staff
to which they are attached.
This makes perfect sense for instruments that normally play chords,
but is not expected when chords are attached to vocal or other staves.
Unfortunately it's not really possible for MuseScore
to know what sounds are actually being used,
and it would be difficult to decide on which instruments
should use their own sound versus a default.
So this change just arbitrarily sets the default harmony channel
to MIDI program 0, which is piano in general midi soundfonts.

It's still possible for individual socres or templates to override this,
and overrides can also be programmers into instruments.xml.
A potential downside of doing so is that the harony channel
would then be created even before chord symbols are present.
That's not *necessarily* a problem, but to me it's something
to worry about later.
  • Loading branch information
MarcSabatella committed Jun 26, 2020
1 parent 674c42f commit 22a4d68
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libmscore/part.cpp
Expand Up @@ -599,6 +599,8 @@ void Part::updateHarmonyChannels(bool isDoOnInstrumentChanged, bool checkRemoval
if (!harmonyChannel() && harmonyCount() > 0) {
Instrument* instr = instrument();
Channel* c = new Channel(*instr->channel(0));
// default to program 0, which is piano in General MIDI
c->setProgram(0);
c->setName(Channel::HARMONY_NAME);
instr->appendChannel(c);
onInstrumentChanged();
Expand Down

0 comments on commit 22a4d68

Please sign in to comment.