Allows instruments to keep the MIDI channel information when forwarding (#5470)
Now it's possible to forward received MIDI events with their original channel, either to another track or to the instrument plugin itself. To do that, the user must select the channel "--" on the MIDI output widget. In that case, all MIDI events will be forwarded with their original channel, and the MIDI events produced by the track itself will be sent with the default channel.
This commit is contained in:
@@ -96,7 +96,10 @@ public:
|
||||
|
||||
int realOutputChannel() const
|
||||
{
|
||||
return outputChannel() - 1;
|
||||
// There's a possibility of outputChannel being 0 ("--"), which is used to keep all
|
||||
// midi channels when forwarding. In that case, realOutputChannel will return the
|
||||
// default channel 1 (whose value is 0).
|
||||
return outputChannel() ? outputChannel() - 1 : 0;
|
||||
}
|
||||
|
||||
void processInEvent( const MidiEvent& event, const MidiTime& time = MidiTime() );
|
||||
|
||||
Reference in New Issue
Block a user