#pragma once #include "config.h" #include "debug.h" #include "log.h" #include #include #include class MIDI { public: MIDI(); ~MIDI(); boost::signals2::signal signal_note; boost::signals2::signal signal_active_sensing; boost::signals2::signal signal_clock; boost::signals2::signal signal_count_events; int fd(); bool event_ready(); snd_seq_event_t *read(void); // returns if click starts void process(snd_seq_event_t *ev); void flush(); void wait_for_event(); private: snd_seq_t *seq_handle; int in_port; int npfd; struct pollfd* pfd; };