-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
122 lines (89 loc) · 2.72 KB
/
Makefile
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
humdrum: segment id newlines
##############################
##
## segment: Add segment lines to files. The segment line
## must be the first line in the file.
##
## Add filename to start of file in the format:
## !!!!SEGMENT: Bar2001-Peccantem_me_cotidie.krn
segment:
for i in humdrum/[A-Z][a-z][a-z]; \
do \
echo SEGMENT processing directory $$i; \
bin/segmentizer $$i/*.krn; \
done
##############################
##
## id: Insert/update 1520s project IDs in Humdrum files.
##
## Insert/Update 1520s project IDs near the start of file in the format:
## !!!!SEGMENT: Bar2001-Peccantem_me_cotidie.krn
## !!!id:Bar2001
##
## The ID is extracted from the SEGMENT line, characters before "-" in filename.
##
id:
for i in humdrum/[A-Z][a-z][a-z]; \
do \
echo ID processing directory $$i; \
bin/addId $$i/*.krn; \
done
##############################
##
## notecount: create a list of note counts for each piece which
## should be pasted into the metadata spreadsheet column for
## notecounts.
##
notecount:
@bin/getWorkIdList | bin/makeNoteCounts
##############################
##
## fix-barlines: Fix cases where the first measure has missing first barline
## Causing a pickup interpretation due to 2/2 being used as the meter rather
## than 4/2 for cut-c.
##
barlines: fix-barlines;
barline: fix-barlines;
fb: fix-barlines
fixbarline: fix-barlines
fixbarlines: fix-barlines
fix-barline: fix-barlines
fix-barlines:
@bin/fixBarnums
#############################
##
## newlines: Add a newline to the end of a file if there is none.
## This can happen when editing in VHV since the editor
## likes to eat the last newlines. Having a text file
## with new ending newline can cause problems in various
## programs.
##
nl: newlines
newline: newlines
newlines:
@for file in humdrum/[A-Z][a-z][a-z]/*.krn; do \
if [ $$(tail -c 1 $$file | od -An -tx1 | sed -e 's/[\t ]*//g') != "0a" ]; then \
echo "Adding newline to end of $$file"; \
echo >> $$file; \
fi; \
done
##############################
##
## voicedensity: Do voice density analysis
##
v: voicedensity
voice: voicedensity
voiceDensity: voicedensity
voice-density: voicedensity
voicedensity:
bin/voicedensity
##############################
##
## validate -- Check to ensure that the filenames on the spreadsheet match
## the actual file names in the repository for Humdrum files.
##
vf: validate-filenames
validate: validate-filenames
validateFilenames: validate-filenames
validate-filenames:
bin/validateFilenames