Record chords (#4938)
* Added check for chord to notes recorded from keyboard
This commit is contained in:
committed by
Oskar Wallgren
parent
461faccaa0
commit
160d306f48
@@ -3522,6 +3522,22 @@ void PianoRoll::finishRecordNote(const Note & n )
|
||||
it->key(), it->getVolume(),
|
||||
it->getPanning() );
|
||||
n1.quantizeLength( quantization() );
|
||||
|
||||
//Get selected chord
|
||||
const InstrumentFunctionNoteStacking::Chord & chord = InstrumentFunctionNoteStacking::ChordTable::getInstance()
|
||||
.getChordByName( m_chordModel.currentText() );
|
||||
|
||||
if( !chord.isEmpty() )
|
||||
{
|
||||
for( int i = 1; i < chord.size(); i++ )
|
||||
{
|
||||
Note new_note( n.length(), it->pos(), it->key() + chord[i] );
|
||||
new_note.setPanning( it->getPanning() );
|
||||
new_note.setVolume( it->getVolume() );
|
||||
m_pattern->addNote( new_note );
|
||||
}
|
||||
}
|
||||
|
||||
m_pattern->addNote( n1 );
|
||||
update();
|
||||
m_recordingNotes.erase( it );
|
||||
|
||||
Reference in New Issue
Block a user