22 lines
287 B
C++
22 lines
287 B
C++
|
|
#ifndef MIDIINPUT
|
||
|
|
#define MIDIINPUT
|
||
|
|
|
||
|
|
#include <rtmidi/RtMidi.h>
|
||
|
|
#include <iostream>
|
||
|
|
#include <stdexcept>
|
||
|
|
|
||
|
|
class MidiInput{
|
||
|
|
|
||
|
|
|
||
|
|
public:
|
||
|
|
void list_ports();
|
||
|
|
void open_port(unsigned int port);
|
||
|
|
void read_message();
|
||
|
|
|
||
|
|
private:
|
||
|
|
RtMidiIn midiIn;
|
||
|
|
|
||
|
|
};
|
||
|
|
|
||
|
|
#endif
|