Skip to content

Commit

Permalink
Manually merged #6247 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
anatoly-os committed Aug 7, 2020
1 parent 963b5de commit c0cc2b5
Show file tree
Hide file tree
Showing 7 changed files with 4 additions and 30 deletions.
1 change: 0 additions & 1 deletion framework/preferencekeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@
#define PREF_IO_PORTMIDI_OUTPUTLATENCYMILLISECONDS "io/portMidi/outputLatencyMilliseconds"
#define PREF_IO_PULSEAUDIO_USEPULSEAUDIO "io/pulseAudio/usePulseAudio"
#define PREF_SCORE_CHORD_PLAYONADDNOTE "score/chord/playOnAddNote"
#define PREF_SCORE_HARMONY_PLAY "score/harmony/play"
#define PREF_SCORE_HARMONY_PLAY_ONEDIT "score/harmony/play/onedit"
#define PREF_SCORE_MAGNIFICATION "score/magnification"
#define PREF_SCORE_NOTE_PLAYONCLICK "score/note/playOnClick"
Expand Down
2 changes: 1 addition & 1 deletion libmscore/rendermidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2294,7 +2294,7 @@ void Score::renderMidi(EventMap* events, bool metronome, bool expandRepeats, con
masterScore()->setExpandRepeats(expandRepeats);
MidiRenderer::Context ctx(synthState);
ctx.metronome = metronome;
ctx.renderHarmony = true; //! TODO preferences.getBool(PREF_SCORE_HARMONY_PLAY);
ctx.renderHarmony = true;
MidiRenderer(this).renderScore(events, ctx);
}

Expand Down
4 changes: 1 addition & 3 deletions mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5082,9 +5082,7 @@ void MuseScore::play(Element* e) const
seq->startNote(channel, n->ppitch(), 80, n->tuning());
}
seq->startNoteTimer(MScore::defaultPlayDuration);
} else if (e->isHarmony()
&& preferences.getBool(PREF_SCORE_HARMONY_PLAY)
&& preferences.getBool(PREF_SCORE_HARMONY_PLAY_ONEDIT)) {
} else if (e->isHarmony() && preferences.getBool(PREF_SCORE_HARMONY_PLAY_ONEDIT)) {
seq->stopNotes();
Harmony* h = toHarmony(e);
if (!h->isRealizable()) {
Expand Down
1 change: 0 additions & 1 deletion mscore/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,6 @@ void Preferences::init(bool storeInMemoryOnly)
{ PREF_IO_PORTMIDI_OUTPUTLATENCYMILLISECONDS, new IntPreference(0) },
{ PREF_IO_PULSEAUDIO_USEPULSEAUDIO, new BoolPreference(defaultUsePulseAudio, false) },
{ PREF_SCORE_CHORD_PLAYONADDNOTE, new BoolPreference(true, false) },
{ PREF_SCORE_HARMONY_PLAY, new BoolPreference(false, false) },
{ PREF_SCORE_HARMONY_PLAY_ONEDIT, new BoolPreference(true, false) },
{ PREF_SCORE_MAGNIFICATION, new DoublePreference(1.0, false) },
{ PREF_SCORE_NOTE_PLAYONCLICK, new BoolPreference(true, false) },
Expand Down
1 change: 0 additions & 1 deletion mscore/prefsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -296,7 +296,6 @@ void PreferenceDialog::start()
new IntPreferenceItem(PREF_IO_OSC_PORTNUMBER, oscPort),
new BoolPreferenceItem(PREF_IO_OSC_USEREMOTECONTROL, oscServer),
new BoolPreferenceItem(PREF_SCORE_CHORD_PLAYONADDNOTE, playChordOnAddNote),
new BoolPreferenceItem(PREF_SCORE_HARMONY_PLAY, playHarmony),
new BoolPreferenceItem(PREF_SCORE_HARMONY_PLAY_ONEDIT, playHarmonyOnEdit),
new IntPreferenceItem(PREF_SCORE_NOTE_DEFAULTPLAYDURATION, defaultPlayDuration),
new BoolPreferenceItem(PREF_SCORE_NOTE_PLAYONCLICK, playNotes),
Expand Down
23 changes: 1 addition & 22 deletions mscore/prefsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -1327,28 +1327,7 @@
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<widget class="QGroupBox" name="playHarmony">
<property name="enabled">
<bool>true</bool>
</property>
<property name="mouseTracking">
<bool>true</bool>
</property>
<property name="title">
<string>Play Chord Symbols</string>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="checked">
<bool>false</bool>
</property>
<layout class="QGridLayout" name="gridLayout_41">
<item row="0" column="0">
<item row="2" column="0">
<widget class="QCheckBox" name="playHarmonyOnEdit">
<property name="text">
<string>Play chord symbol when editing</string>
Expand Down
2 changes: 1 addition & 1 deletion mscore/seq.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1075,7 +1075,7 @@ void Seq::renderChunk(const MidiRenderer::Chunk& ch, EventMap* eventMap)
SynthesizerState synState = mscore->synthesizerState();
MidiRenderer::Context ctx(synState);
ctx.metronome = true;
ctx.renderHarmony = preferences.getBool(PREF_SCORE_HARMONY_PLAY);
ctx.renderHarmony = true;
midi.renderChunk(ch, eventMap, ctx);
renderEventsStatus.setOccupied(ch.utick1(), ch.utick2());
}
Expand Down

0 comments on commit c0cc2b5

Please sign in to comment.