Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #307005: chord playback default not consistent #6247

Merged
merged 1 commit into from
Jun 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion global/settings/types/preferencekeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,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_NOTE_PLAYONCLICK "score/note/playOnClick"
#define PREF_SCORE_NOTE_DEFAULTPLAYDURATION "score/note/defaultPlayDuration"
Expand Down
2 changes: 1 addition & 1 deletion libmscore/rendermidi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2162,7 +2162,7 @@ void Score::renderMidi(EventMap* events, bool metronome, bool expandRepeats, con
masterScore()->setExpandRepeats(expandRepeats);
MidiRenderer::Context ctx(synthState);
ctx.metronome = metronome;
ctx.renderHarmony = preferences.getBool(PREF_SCORE_HARMONY_PLAY);
ctx.renderHarmony = true;
MidiRenderer(this).renderScore(events, ctx);
}

Expand Down
1 change: 0 additions & 1 deletion mscore/musescore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4737,7 +4737,6 @@ void MuseScore::play(Element* e) const
seq->startNoteTimer(MScore::defaultPlayDuration);
}
else if (e->isHarmony()
&& preferences.getBool(PREF_SCORE_HARMONY_PLAY)
&& preferences.getBool(PREF_SCORE_HARMONY_PLAY_ONEDIT)) {
seq->stopNotes();
Harmony* h = toHarmony(e);
Expand Down
1 change: 0 additions & 1 deletion mscore/preferences.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,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_NOTE_PLAYONCLICK, new BoolPreference(true, false)},
{PREF_SCORE_NOTE_DEFAULTPLAYDURATION, new IntPreference(300 /* ms */, false)},
Expand Down
1 change: 0 additions & 1 deletion mscore/prefsdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,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 @@ -1477,28 +1477,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 @@ -1043,7 +1043,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