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.
This commit is contained in:
@@ -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 ) )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user