Loopp/src/observer/midi.hxx

37 lines
762 B
C++
Raw Normal View History

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
* A base class allowing the recieving of MIDI message streams to the subclass
**/
class MidiObserver
{
public:
MidiObserver();
virtual ~MidiObserver(){};
2013-07-31 18:19:15 +02:00
/// registers class with jack's MIDI handling, with MIDI port name
void registerPorts( std::string portName );
2013-09-06 15:18:27 +02:00
/// name string to show in UI
virtual std::string getName() = 0;
/// gets called each process() in JACK
virtual void process(int nframes) = 0;
protected:
// there are jack_port_t* registered ports
void* jackInputPort;
void* jackOutputPort;
2013-07-31 18:19:15 +02:00
};
#endif // LUPPP_MIDI_OBSERVER_H