5 #include "pbd/textreceiver.h"
7 Transmitter
error (Transmitter::Error
);
8 Transmitter
info (Transmitter::Info
);
9 Transmitter
warning (Transmitter::Warning
);
10 Transmitter
fatal (Transmitter::Fatal
);
11 TextReceiver
text_receiver ("mmctest");
13 #include "midi++/port.h"
14 #include "midi++/manager.h"
19 PortRequest midi_device
;
25 midi_device
.devname
= "/dev/snd/midiC0D0";
26 midi_device
.tagname
= "trident";
27 midi_device
.mode
= O_RDWR
;
28 midi_device
.type
= Port::ALSA_RawMidi
;
30 if ((port
= MIDI::Manager::instance()->add_port (midi_device
)) == 0) {
31 info
<< "MIDI port is not valid" << endmsg
;
38 main (int argc
, char *argv
[])
43 text_receiver
.listen_to (error
);
44 text_receiver
.listen_to (info
);
45 text_receiver
.listen_to (fatal
);
46 text_receiver
.listen_to (warning
);
52 port
->input()->trace (true, &cout
);
55 if (port
->read (buf
, 1) < 0) {
56 error
<< "cannot read byte"