From 98ac8e61a988ffea90ee8ff2a30f46559407861d Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Sat, 12 May 2018 11:19:33 +0200 Subject: [PATCH 1/2] Remove release time from arpeggiated note --- src/core/InstrumentFunctions.cpp | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index 5cf02c9342c..ada2e6b2346 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -344,7 +344,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) if( _n->origin() == NotePlayHandle::OriginArpeggio || _n->origin() == NotePlayHandle::OriginNoteStacking || !m_arpEnabledModel.value() || - ( _n->isReleased() && _n->releaseFramesDone() >= _n->actualReleaseFramesToDo() ) ) + _n->isReleased() ) { return; } @@ -412,7 +412,6 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) // Skip notes randomly if( m_arpSkipModel.value() ) { - if( 100 * ( (float) rand() / (float)( RAND_MAX + 1.0f ) ) < m_arpSkipModel.value() ) { // Set master note to prevent the note to extend over skipped notes @@ -501,12 +500,6 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) continue; } - float vol_level = 1.0f; - if( _n->isReleased() ) - { - vol_level = _n->volumeLevel( cur_frame + gated_frames ); - } - // create new arp-note // create sub-note-play-handle, only ptr to note is different @@ -515,7 +508,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) NotePlayHandleManager::acquire( _n->instrumentTrack(), frames_processed, gated_frames, - Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() * vol_level ), + Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() ), _n->getPanning(), _n->detuning() ), _n, -1, NotePlayHandle::OriginArpeggio ) ); From 7aa543c8c58c9175a0c77bdb9c3a7d74331926a8 Mon Sep 17 00:00:00 2001 From: Oskar Wallgren Date: Sat, 12 May 2018 20:03:11 +0200 Subject: [PATCH 2/2] Fixup - Just get the note volume --- src/core/InstrumentFunctions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/InstrumentFunctions.cpp b/src/core/InstrumentFunctions.cpp index ada2e6b2346..b44dbdc900b 100644 --- a/src/core/InstrumentFunctions.cpp +++ b/src/core/InstrumentFunctions.cpp @@ -508,7 +508,7 @@ void InstrumentFunctionArpeggio::processNote( NotePlayHandle * _n ) NotePlayHandleManager::acquire( _n->instrumentTrack(), frames_processed, gated_frames, - Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, (volume_t) qRound( _n->getVolume() ), + Note( MidiTime( 0 ), MidiTime( 0 ), sub_note_key, _n->getVolume(), _n->getPanning(), _n->detuning() ), _n, -1, NotePlayHandle::OriginArpeggio ) );