50 virtual void init() = 0;
51 virtual void exit() = 0;
56 virtual bool OpenPort (
int i, std::string AppName=
"")=0;
57 virtual bool OpenPort (std::string AppName=
"") = 0;
103 #endif // MIDIADAPTER_H
double deltatime
Time elapsed since the last MIDI event.
MidiEvent event
Midi event, encoded by the enumeration MidiEvent.
virtual void init()=0
Initialisation of the implementation.
Midi event when a key is pressed.
Midi event for changing voice.
MidiAdapter()
Constructor without function.
void send(Data &data)
Send new MIDI data to the messaging system.
~MidiAdapter()
Destructor without function.
virtual void exit()=0
Shut down the implementation.
MidiEvent
Enumeration of the possible MIDI events.
int byte1
Data byte, usually representing the MIDI key index.
virtual std::string GetPortName(int i)=0
Get the name of device number i (starting with zero)
virtual bool OpenPort(int i, std::string AppName="")=0
Open Midi input device number i.
Midi event when a key is released.
virtual int getCurrentPort() const =0
Get the current port number.
static MidiEvent byteToEvent(int byte)
Convert MIDI code to MidiEvent.
virtual int GetNumberOfPorts()=0
Get the number of available input devices.
Adapter class for reading an externally connected MIDI keyboard.
virtual std::string GetPortNames()
Get a list of all available input devices.
int byte2
Data byte, usually representing the keystroke intensity.
Structure of the data associated with a MIDI event.