From 2d93e19f72af3f1fde8032209dec004969d258a1 Mon Sep 17 00:00:00 2001 From: Vesa Date: Wed, 9 Jul 2014 20:36:49 +0300 Subject: [PATCH] Fix erroneous note offset in instrumenttrack --- src/tracks/InstrumentTrack.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tracks/InstrumentTrack.cpp b/src/tracks/InstrumentTrack.cpp index 87d0de299..ea7f24315 100644 --- a/src/tracks/InstrumentTrack.cpp +++ b/src/tracks/InstrumentTrack.cpp @@ -278,7 +278,7 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti if( m_notes[event.key()] == NULL ) { // create (timed) note-play-handle - NotePlayHandle* nph = new NotePlayHandle( this, time.frames( engine::framesPerTick() ), + NotePlayHandle* nph = new NotePlayHandle( this, offset, typeInfo::max() / 2, note( MidiTime(), MidiTime(), event.key(), event.volume( midiPort()->baseVelocity() ) ), NULL, event.channel(), @@ -298,7 +298,7 @@ void InstrumentTrack::processInEvent( const MidiEvent& event, const MidiTime& ti { // do actual note off and remove internal reference to NotePlayHandle (which itself will // be deleted later automatically) - m_notes[event.key()]->noteOff(); + m_notes[event.key()]->noteOff( offset ); m_notes[event.key()] = NULL; } eventHandled = true;