Midi トラックの出力
#include <cstdlib>
#include <iostream>
using namespace hrk;
using namespace std;
namespace
{
void dump_midi_events(Midi_parser::Events& events)
{
(void)events;
cout << "not implemented: dump_midi_events()" << endl;
}
}
int main(int argc, char *argv[])
{
if (argc < 2) {
cout << "usage: " << argv[0] << " <midi file> <track number>" << endl;
return 1;
}
const string midi_file = argv[1];
int track_number = (argc > 2) ? atoi(argv[2]) : 0;
if (!midi_parser.
load(midi_file)) {
cerr <<
"Midi_parser::load(): " << midi_parser.
what() << endl;
return 1;
}
Midi_parser::Events events;
midi_parser.
events(events, track_number);
dump_midi_events(events);
return 0;
}