-
Notifications
You must be signed in to change notification settings - Fork 8
/
esac2hum.cpp
43 lines (37 loc) · 973 Bytes
/
esac2hum.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
//
// Programmer: Craig Stuart Sapp <craig@ccrma.stanford.edu>
// Creation Date: Thu Aug 22 18:35:34 PDT 2024
// Last Modified: Thu Aug 22 18:35:37 PDT 2024
// Filename: cli/esac2hum.cpp
// URL: https://github.com/craigsapp/humlib/blob/master/cli/esac2hum.cpp
// Syntax: C++11
// vim: ts=3 noexpandtab nowrap
//
// Description: Converter from EsAC to Humdrum.
//
#include "humlib.h"
using namespace std;
using namespace hum;
int main(int argc, char** argv) {
Tool_esac2hum interface;
if (!interface.process(argc, argv)) {
interface.getError(cerr);
return -1;
}
HumdrumFile infile;
int status = 1;
if (interface.getArgCount() > 0) {
status = interface.convertFile(cout, interface.getArgument(1));
} else {
status = interface.convert(cout, cin);
}
if (interface.hasWarning()) {
interface.getWarning(cerr);
return 0;
}
if (interface.hasError()) {
interface.getError(cerr);
return -1;
}
return !status;
}