From 1ddd204250b944af73ad231014947cdf849977fe Mon Sep 17 00:00:00 2001 From: dj-pixus Date: Mon, 13 Dec 2021 17:27:25 +0100 Subject: [PATCH] workize output note setting --- src/core/midi/MidiPort.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/core/midi/MidiPort.cpp b/src/core/midi/MidiPort.cpp index 63ca817e0..b656d9541 100644 --- a/src/core/midi/MidiPort.cpp +++ b/src/core/midi/MidiPort.cpp @@ -169,6 +169,12 @@ void MidiPort::processOutEvent( const MidiEvent& event, const TimePos& time ) outEvent.setVelocity( fixedOutputVelocity() ); } + if( fixedOutputNote() >= 0 && + ( event.type() == MidiNoteOn || event.type() == MidiNoteOff || event.type() == MidiKeyPressure ) ) + { + outEvent.setKey( fixedOutputNote() ); + } + m_midiClient->processOutEvent( outEvent, time, this ); } } @@ -238,6 +244,7 @@ void MidiPort::loadSettings( const QDomElement& thisElement ) m_outputControllerModel.loadSettings( thisElement, "outputcontroller" ); m_fixedInputVelocityModel.loadSettings( thisElement, "fixedinputvelocity" ); m_fixedOutputVelocityModel.loadSettings( thisElement, "fixedoutputvelocity" ); + m_fixedOutputNoteModel.loadSettings( thisElement, "fixedoutputnote" ); m_outputProgramModel.loadSettings( thisElement, "outputprogram" ); m_baseVelocityModel.loadSettings( thisElement, "basevelocity" ); m_readableModel.loadSettings( thisElement, "readable" );