From 7500c98f8d46cd79129fbf23865e257d69855d85 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Mon, 3 Feb 2014 20:56:23 +0100 Subject: [PATCH] MidiPort: do not change key of MIDI note events There's no need to transpose MIDI events inside a MidiPort instance. Any correction to the outer world should (if at all) happen in the according MIDI backends. Closes #242. --- src/core/midi/MidiPort.cpp | 9 --------- 1 file changed, 9 deletions(-) diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index ffa2c97dd..0dd0ae760 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -123,7 +123,6 @@ void MidiPort::processInEvent( const MidiEvent& event, const MidiTime& time ) event.type() == MidiNoteOff || event.type() == MidiKeyPressure ) { - inEvent.setKey( inEvent.key() + KeysPerOctave ); if( inEvent.key() < 0 || inEvent.key() >= NumKeys ) { return; @@ -149,14 +148,6 @@ void MidiPort::processOutEvent( const MidiEvent& event, const MidiTime& time ) { MidiEvent outEvent = event; - if( ( event.type() == MidiNoteOn || event.type() == MidiNoteOff ) && - fixedOutputNote() >= 0 ) - { - // Convert MIDI note number (from spinbox) -> LMMS note number - // that will be converted back when outputted. - outEvent.setKey( fixedOutputNote() - KeysPerOctave ); - } - if( fixedOutputVelocity() >= 0 && event.velocity() > 0 && ( event.type() == MidiNoteOn || event.type() == MidiKeyPressure ) ) {