Skip to content

MACRO for creation an AppleMIDI instance

lathoub edited this page Feb 13, 2021 · 20 revisions

Creation MACRO expansion

APPLEMIDI_CREATE_INSTANCE(EthernetUDP, MIDI, "AppleMIDI-Arduino", DEFAULT_CONTROL_PORT);

                            Type      Name     SessionName        Port
                            |         |             |             |
                            |         |             |             +-> Default UDP port is 5004
                            |         |             +---------------> AppleMIDI session name
                            |         +-----------------------------> Variable name used in the sketch
                            |                                         also create an instance AppleMIDI
                            +---------------------------------------> UDP class from the Ethernet lib.
#define APPLEMIDI_CREATE_INSTANCE(Type, Name, SessionName, Port)
1)    APPLEMIDI_NAMESPACE::AppleMIDISession<Type> Apple##Name(SessionName, Port);
2)    MIDI_NAMESPACE::MidiInterface< 
3)          APPLEMIDI_NAMESPACE::AppleMIDISession<Type>, 
4)          APPLEMIDI_NAMESPACE::AppleMIDISettings>
5)       Name((APPLEMIDI_NAMESPACE::AppleMIDISession<Type>&)Apple##Name);
  1. Create an AppleMIDI instance, with a given sessionName and default port.
  2. The FortySevenEffects MidiInterface template
  3. Provide the UDP class as Type
  4. Specific AppleMIDI Settings
  5. The MIDI instance
Clone this wiki locally