Control Surface
new-input
MIDI Control Surface library for Arduino
|
Operators and utilities for MIDI routing.
Two or more MIDI interfaces can be connected using MIDI Pipes. The simplest pipe just carries messages from the input interface to the output interface, but you can write rules for filtering out certain messages, changing the channel of some messages, etc.
Allows you to use syntax like:
Or for bidirectional connections:
Have a look at the following examples on MIDI routing:
If you're interested how the pipes work, see the documentation for MIDI_Pipe.
Classes | |
class | MIDI_Sink |
Receives MIDI messages from a MIDI pipe. More... | |
class | MIDI_Source |
Class that can send MIDI messages to a MIDI pipe. More... | |
class | MIDI_Pipe |
Class that routes MIDI messages from a MIDI_Source to a MIDI_Sink. More... | |
struct | TrueMIDI_SinkSource |
A struct that is both a TrueMIDI_Sink and a TrueMIDI_Source. More... | |
struct | MIDI_PipeFactory< N, Pipe > |
Class that produces multiple MIDI_Pipes. More... | |
Typedefs | |
using | TrueMIDI_Sink = MIDI_Sink |
A MIDI_Sink that is not a MIDI_Pipe. | |
using | TrueMIDI_Source = MIDI_Source |
A MIDI_Source that is not a MIDI_Pipe. | |
using | BidirectionalMIDI_Pipe = std::pair< MIDI_Pipe, MIDI_Pipe > |
A bidirectional pipe consists of two unidirectional pipes. | |
template<size_t N> | |
using | BidirectionalMIDI_PipeFactory = MIDI_PipeFactory< N, BidirectionalMIDI_Pipe > |
Functions | |
MIDI_Pipe & | operator>> (TrueMIDI_Source &source, MIDI_Pipe &pipe) |
Connect a source to a pipe (source >> pipe ). | |
TrueMIDI_Sink & | operator>> (MIDI_Pipe &pipe, TrueMIDI_Sink &sink) |
Connect a pipe to a sink (pipe >> sink ). | |
MIDI_Pipe & | operator<< (TrueMIDI_Sink &sink, MIDI_Pipe &pipe) |
Connect a sink to a pipe (sink << pipe ). | |
TrueMIDI_Source & | operator<< (MIDI_Pipe &pipe, TrueMIDI_Source &source) |
Connect a pipe to a source (pipe << source ). | |
MIDI_Pipe & | operator<< (MIDI_Pipe &, MIDI_Pipe &)=delete |
Don't connect two pipes to eachother. | |
TrueMIDI_SinkSource & | operator| (BidirectionalMIDI_Pipe &pipe, TrueMIDI_SinkSource &sinksource) |
Connect a pipe to a sink+source (pipe | source+sink ). | |
BidirectionalMIDI_Pipe & | operator| (TrueMIDI_SinkSource &sinksource, BidirectionalMIDI_Pipe &pipe) |
Connect a sink+source to a pipe (source+sink | pipe ). | |
template<size_t N, class Pipe > | |
MIDI_Pipe & | operator>> (TrueMIDI_Source &source, MIDI_PipeFactory< N, Pipe > &pipe_fact) |
template<size_t N, class Pipe > | |
MIDI_Pipe & | operator>> (MIDI_Pipe &, MIDI_PipeFactory< N, Pipe > &)=delete |
template<size_t N, class Pipe > | |
TrueMIDI_Sink & | operator>> (MIDI_PipeFactory< N, Pipe > &pipe_fact, TrueMIDI_Sink &sink) |
template<size_t N, class Pipe > | |
MIDI_Pipe & | operator>> (MIDI_PipeFactory< N, Pipe > &, MIDI_Pipe &)=delete |
template<size_t N, class Pipe > | |
MIDI_Pipe & | operator<< (TrueMIDI_Sink &sink, MIDI_PipeFactory< N, Pipe > &pipe_fact) |
template<size_t N, class Pipe > | |
TrueMIDI_Source & | operator<< (MIDI_PipeFactory< N, Pipe > &pipe_fact, TrueMIDI_Source &source) |
template<size_t N> | |
TrueMIDI_SinkSource & | operator| (BidirectionalMIDI_PipeFactory< N > &pipe_fact, TrueMIDI_SinkSource &sinksource) |
template<size_t N> | |
BidirectionalMIDI_Pipe & | operator| (TrueMIDI_SinkSource &sinksource, BidirectionalMIDI_PipeFactory< N > &pipe_fact) |