From bfe2f0cf1125c4b1e20a472cc7d01f26e04444a5 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Tue, 20 May 2014 23:07:28 +0200 Subject: [PATCH] InstrumentFunctions: fix base note playback in chords As of 6650dd356dbdd08739ad69153b0c7020e39787b9 base notes are not played anymore when chords are enabled. Therefore create a separate NotePlayHandle for the base note like we do for all other notes in the chord. --- src/core/InstrumentFunctions.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 4e50b185f..7ffb4a3bb 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -243,11 +243,9 @@ void InstrumentFunctionNoteStacking::processNote( NotePlayHandle * _n ) for( int octave_cnt = 0; octave_cnt < m_chordRangeModel.value(); ++octave_cnt ) { const int sub_note_key_base = base_note_key + octave_cnt * KeysPerOctave; - // if octave_cnt == 1 we're in the first octave and - // the base-note is already done, so we don't have to - // create it in the following loop, then we loop until - // there's a -1 in the interval-array - for( int i = ( octave_cnt == 0 ) ? 1 : 0; i < chord_table[selected_chord].size(); ++i ) + + // process all notes in the chord + for( int i = 0; i < chord_table[selected_chord].size(); ++i ) { // add interval to sub-note-key const int sub_note_key = sub_note_key_base + (int) chord_table[selected_chord][i];