2013-07-31 18:19:15 +02:00
|
|
|
|
|
|
|
#ifndef LUPPP_MIDI_OBSERVER_H
|
|
|
|
#define LUPPP_MIDI_OBSERVER_H
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
|
|
|
|
|
|
|
class Jack;
|
|
|
|
extern Jack* jack;
|
|
|
|
|
|
|
|
/** MidiObserver
|
2013-10-01 18:15:28 +02:00
|
|
|
* A base class for obseriving a MIDI port
|
2013-07-31 18:19:15 +02:00
|
|
|
**/
|
|
|
|
class MidiObserver
|
|
|
|
{
|
|
|
|
public:
|
2013-09-30 15:57:17 +02:00
|
|
|
MidiObserver();
|
2013-09-21 00:28:59 +02:00
|
|
|
virtual ~MidiObserver(){};
|
2013-07-31 18:19:15 +02:00
|
|
|
|
2013-09-06 15:18:27 +02:00
|
|
|
/// name string to show in UI
|
|
|
|
virtual std::string getName() = 0;
|
|
|
|
|
2013-10-01 18:08:19 +02:00
|
|
|
/// gets called each process() in JACK
|
|
|
|
virtual void process(int nframes) = 0;
|
2013-09-06 15:05:57 +02:00
|
|
|
|
2013-10-01 18:08:19 +02:00
|
|
|
protected:
|
|
|
|
// there are jack_port_t* registered ports
|
|
|
|
void* jackInputPort;
|
|
|
|
void* jackOutputPort;
|
2013-09-06 15:05:57 +02:00
|
|
|
|
2013-07-31 18:19:15 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LUPPP_MIDI_OBSERVER_H
|