Skip to content

Commit

Permalink
Merge pull request #6268 from MarcSabatella/harmony-channel-program
Browse files Browse the repository at this point in the history
fix #302710: change default for harmony channel to piano
  • Loading branch information
anatoly-os committed Jul 7, 2020
2 parents b0d82ff + e1c56fd commit a931719
Show file tree
Hide file tree
Showing 18 changed files with 23 additions and 19 deletions.
2 changes: 2 additions & 0 deletions libmscore/part.cpp
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion mtest/libmscore/chordsymbol/add-link-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<program value="24"/>
</Channel>
<Channel name="harmony">
<program value="24"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
4 changes: 2 additions & 2 deletions mtest/libmscore/chordsymbol/add-part-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<program value="24"/>
</Channel>
<Channel name="harmony">
<program value="24"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down Expand Up @@ -162,7 +162,7 @@
<program value="24"/>
</Channel>
<Channel name="harmony">
<program value="24"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/chordsymbol/extend-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
<program value="27"/>
</Channel>
<Channel name="harmony">
<program value="27"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
4 changes: 2 additions & 2 deletions mtest/libmscore/chordsymbol/no-system-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
<program value="65"/>
</Channel>
<Channel name="harmony">
<program value="65"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down Expand Up @@ -358,7 +358,7 @@
<program value="65"/>
</Channel>
<Channel name="harmony">
<program value="65"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/chordsymbol/realize-transpose-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
4 changes: 2 additions & 2 deletions mtest/libmscore/chordsymbol/transpose-part-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down Expand Up @@ -182,7 +182,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/chordsymbol/transpose-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/compat114/chord_symbol-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<controller ctrl="91" value="30"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
<controller ctrl="93" value="30"/>
<controller ctrl="91" value="30"/>
</Channel>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/compat114/text_scaling-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
<controller ctrl="91" value="30"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
<controller ctrl="93" value="30"/>
<controller ctrl="91" value="30"/>
</Channel>
Expand Down
4 changes: 2 additions & 2 deletions mtest/libmscore/compat206/lidemptytext-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
<program value="44"/>
</Channel>
<Channel name="harmony">
<program value="43"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down Expand Up @@ -351,7 +351,7 @@
<program value="44"/>
</Channel>
<Channel name="harmony">
<program value="43"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
1 change: 1 addition & 0 deletions mtest/libmscore/copypaste/copypaste19-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@
<Channel>
</Channel>
<Channel name="harmony">
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
1 change: 1 addition & 0 deletions mtest/libmscore/copypaste/copypaste26-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
<Channel>
</Channel>
<Channel name="harmony">
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<program value="52"/>
</Channel>
<Channel name="harmony">
<program value="52"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<program value="44"/>
</Channel>
<Channel name="harmony">
<program value="40"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/timesig/timesig-03-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down
2 changes: 1 addition & 1 deletion mtest/libmscore/timesig/timesig-05-ref.mscx
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
<program value="73"/>
</Channel>
<Channel name="harmony">
<program value="73"/>
<program value="0"/>
</Channel>
</Instrument>
</Part>
Expand Down

0 comments on commit a931719

Please sign in to comment.