This commit is contained in:
Francois Best 2014-02-13 21:44:27 +01:00
parent c4d5d76f4a
commit 8ee40445f4
2 changed files with 8 additions and 11 deletions

View File

@ -1092,24 +1092,17 @@ void MidiInterface<SerialPort>::turnThruOff()
// This method is called upon reception of a message // This method is called upon reception of a message
// and takes care of Thru filtering and sending. // and takes care of Thru filtering and sending.
// - All system messages (System Exclusive, Common and Real Time) are passed
// to output unless filter is set to Off.
// - Channel messages are passed to the output whether their channel
// is matching the input channel and the filter setting
template<class SerialPort> template<class SerialPort>
void MidiInterface<SerialPort>::thruFilter(Channel inChannel) void MidiInterface<SerialPort>::thruFilter(Channel inChannel)
{ {
/*
This method handles Soft-Thru filtering.
Soft-Thru filtering:
- All system messages (System Exclusive, Common and Real Time) are passed to output unless filter is set to Off
- Channel messages are passed to the output whether their channel is matching the input channel and the filter setting
*/
// If the feature is disabled, don't do anything. // If the feature is disabled, don't do anything.
if (!mThruActivated || (mThruFilterMode == Off)) if (!mThruActivated || (mThruFilterMode == Off))
return; return;
// First, check if the received message is Channel // First, check if the received message is Channel
if (mMessage.type >= NoteOff && mMessage.type <= PitchBend) if (mMessage.type >= NoteOff && mMessage.type <= PitchBend)
{ {

View File

@ -70,6 +70,10 @@
// of the same type and channel. // of the same type and channel.
// Set to 0 if you have troubles controlling your hardware. // Set to 0 if you have troubles controlling your hardware.
#define MIDI_USE_RUNNING_STATUS 1 #define MIDI_USE_RUNNING_STATUS 1
// Setting this to 1 will make MIDI.read parse only one byte of data for each
// call when data is available. This can speed up your application if receiving
// a lot of traffic, but might induce MIDI Thru and treatment latency.
#define MIDI_USE_1BYTE_PARSING 1 #define MIDI_USE_1BYTE_PARSING 1
#define MIDI_BAUDRATE 31250 #define MIDI_BAUDRATE 31250