3 // ----------------------------------------------------------------------------
9 // Notehead used for longa and breve
11 define QUDRTOFFS +1.75 @
15 define LNADD2 LNADD LNADD @
21 define HOR2DIST -1.5 @
22 define LNGUSTEM STMLEN -LNGVERTU QUDRTOFFS -2 @
23 define LNGDSTEM STMLEN +LNGVERT QUDRTOFFS -2 @
26 medium line (P1.x LO,P1.y OFFS1 QUDRTOFFS) to (P1.x LO +LNGHOR,P1.y OFFS1 QUDRTOFFS) @
29 medium line (P1.x LO,P1.y OFFS1 HOR2DIST QUDRTOFFS) to (P1.x LO +LNGHOR,P1.y OFFS1 HOR2DIST QUDRTOFFS) @
32 line (P1.x LO,P1.y OFFS1 +LNGVERTU QUDRTOFFS) to (P1.x LO,P1.y OFFS1 HOR2DIST -LNGVERTD QUDRTOFFS) @
35 line (P1.x LO +LNGHOR,P1.y OFFS1 +LNGVERTU +USTEM QUDRTOFFS) to (P1.x LO +LNGHOR,P1.y OFFS1 HOR2DIST -LNGVERTD -DSTEM QUDRTOFFS) @
37 define QUADRHD(P1,OFFS1,USTEM,DSTEM)
43 define LONGAU(P2,OFFS2) QUADRHD(P2,OFFS2,LNGUSTEM,0) @
44 define LONGAD(P2,OFFS2) QUADRHD(P2,OFFS2,0,LNGDSTEM) @
45 define BREVE(P2,OFFS2) QUADRHD(P2,OFFS2,0,0) @
47 // ----------------------------------------------------------------------------
49 // noteheads used for semibreve, minima, semiminima, fusa & semifusa
51 define DMNDHD "\s(12) \(diamond)" @
52 define FILLHD "\s(12) \(filldiamond)" @
53 define STMXOFFS +2.4 @
56 define FLAGXOFFS1 +2 @
57 define FLAGYOFFS1 .2 @
59 define FLAGYOFFS3 1.4 @
60 define FLAGYOFFS4 3.2 @
62 define STEMU line (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS) to (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS +STMLEN) @
64 define STEMD line (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS) to (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS -STMLEN) @
66 define FLAGU1 line (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS1) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS2) @
68 define FLAGU2 line (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS3) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS4) @
70 define FLAGD1 line (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS1) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS2) @
72 define FLAGD2 line (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS3) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS4) @
74 define SEMIBREVE(P1,OFFS1)
75 print (P1.x,P1.y OFFS1) DMNDHD @
77 define CLRDSEMIBREVE(P1,OFFS1)
78 print (P1.x,P1.y OFFS1) FILLHD @
80 define MINIMU(P1,OFFS1)
81 print (P1.x,P1.y OFFS1) DMNDHD
84 define MINIMD(P1,OFFS1)
85 print (P1.x,P1.y OFFS1) DMNDHD
88 define SEMIMINU(P1,OFFS1)
89 print (P1.x,P1.y OFFS1) FILLHD
92 define SEMIMIND(P1,OFFS1)
93 print (P1.x,P1.y OFFS1) FILLHD
96 define FUSAU(P1,OFFS1)
97 print (P1.x,P1.y OFFS1) FILLHD
101 define SEMIFUSAU(P1,OFFS1)
102 print (P1.x,P1.y OFFS1) FILLHD
107 define FUSAD(P1,OFFS1)
108 print (P1.x,P1.y OFFS1) FILLHD
112 define SEMIFUSAD(P1,OFFS1)
113 print (P1.x,P1.y OFFS1) FILLHD
118 // ----------------------------------------------------------------------------
122 define DOT "\s(12) \(dot)" @
123 define UDOTYOFFS +1.5 @
124 define LDOTYOFFS -.5 @
125 define CDOTYOFFS +.5 @
126 define DOTXOFFS +3.2 @
128 define UDOT(P1,OFFS1)
129 print (P1.x DOTXOFFS,P1.y OFFS1 UDOTYOFFS) DOT @
131 define LDOT(P1,OFFS1)
132 print (P1.x DOTXOFFS,P1.y OFFS1 LDOTYOFFS) DOT @
134 define CDOT(P1,OFFS1)
135 print (P1.x DOTXOFFS,P1.y OFFS1 CDOTYOFFS) DOT @
137 // ----------------------------------------------------------------------------
141 define SHARPXOFFS -2.5 @
144 define SHARP(P1,OFFS1)
145 line (P1.x SHARPXOFFS,P1.y OFFS1+2) to (P1.x SHARPXOFFS+2,P1.y OFFS1);
146 line (P1.x SHARPXOFFS+SHDST,P1.y OFFS1+2) to (P1.x SHARPXOFFS+SHDST+2,P1.y OFFS1);
147 line (P1.x SHARPXOFFS,P1.y OFFS1) to (P1.x SHARPXOFFS+2,P1.y OFFS1+2);
148 line (P1.x SHARPXOFFS+SHDST,P1.y OFFS1) to (P1.x SHARPXOFFS+SHDST+2,P1.y OFFS1+2); @
150 // ----------------------------------------------------------------------------
154 define LEDGERLEN +4.75 @
156 define LEDGER(P1,OFFS1)
157 line (P1.x,P1.y OFFS1) to (P1.x LEDGERLEN,P1.y OFFS1) @
159 define PLEDGER(P1,XOFFS,YOFFS)
160 line (P1.x XOFFS,P1.y YOFFS) to (P1.x XOFFS LEDGERLEN,P1.y YOFFS) @
162 // ----------------------------------------------------------------------------
167 define RLINEADD +.2 @
168 define RLINEADD2 RLINEADD RLINEADD @
170 define RLONGALINELEN 4 @
172 define RLONGA(P1,OFFS1)
173 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 -RLONGALINELEN) @
175 define RBREVELINELEN 2 @
177 define RBREVE(P1,OFFS1)
178 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 -RBREVELINELEN) @
180 define RLINELEN 1.2 @
182 define RSEMIBREVE(P1,OFFS1)
183 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 -RLINELEN) @
185 define RMINIM(P1,OFFS1)
186 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 +RLINELEN) @
188 define RFLAGYOFFS1 .1 @
190 define RFLAG1 line (P1.x RLINEADD RXOFFS,P1.y OFFS1 +RLINELEN -RFLAGYOFFS1) to (P1.x RLINEADD +1 RXOFFS,P1.y OFFS1 +RLINELEN -.5) @
192 define RSEMIMINIM(P1,OFFS1)
193 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 +RLINELEN)
196 // ----------------------------------------------------------------------------
200 define GCLF "\s(12) \(gclef)" @
201 define CCLF "\s(12) \(cclef)" @
202 define FCLF "\s(12) \(fclef)" @
204 define TREBLEOFFS -7 @
207 print (P1.x, P1.y TREBLEOFFS) GCLF @
209 define PTREBLECLF(P1, TROFFS)
210 print (P1.x TROFFS, P1.y TREBLEOFFS) GCLF @
212 define TREBLECLF8(P1)
213 print (P1.x, P1.y TREBLEOFFS) GCLF
214 print (P1.x +2, P1.y TREBLEOFFS -2.2) "\f(TI) \s(10) 8"
217 define PTREBLECLF8(P1, TROFFS)
218 print (P1.x TROFFS, P1.y TREBLEOFFS) GCLF
219 print (P1.x +2 TROFFS, P1.y TREBLEOFFS -2.2) "\f(TI) \s(10) 8"
222 define BARITONOFFS -0 @
223 define TENOROFFS -2 @
228 define BARITONCLF(P1)
229 print (P1.x, P1.y BARITONOFFS) CCLF @
232 print (P1.x, P1.y TENOROFFS) CCLF @
235 print (P1.x, P1.y ALTOOFFS) CCLF @
238 print (P1.x, P1.y DESCOFFS) CCLF @
241 print (P1.x, P1.y BASSOFFS) FCLF @
243 define PBASSCLF(P1,CLOFFS)
244 print (P1.x CLOFFS, P1.y BASSOFFS) FCLF @
246 // ----------------------------------------------------------------------------
251 define PRFXOFFS2 -1.125 @
252 define PRFYOFFS -1.75 @
253 define DUPYOFFS +2.6 @
254 define DUPXOFFS -1.05 @
258 line(P1.x DUPXOFFS,P1.y DUPYOFFS) to (P1.x DUPXOFFS,P1.y DUPLEN) @
260 // The "Q" parameter must be the "R" parameter divided by the square root
261 // of 2. Unfortunately, Mup doesn't support multiplication and division.
263 define CIRC(X, Y, R, Q)
264 curve (X+R,Y) to (X+Q,Y+Q) to (X,Y+R) to (X-Q,Y+Q) to (X-R,Y) \
265 to (X-Q,Y-Q) to (X,Y-R) to (X+Q,Y-Q) to (X+R,Y) @
267 define LARC(X, Y, R, Q)
268 curve (X+Q,Y+Q) to (X,Y+R) to (X-Q,Y+Q) to (X-R,Y) \
269 to (X-Q,Y-Q) to (X,Y-R) to (X+Q,Y-Q) @
271 define RARC(X, Y, R, Q)
272 curve (X-Q,Y+Q) to (X,Y+R) to (X+Q,Y+Q) to (X+R,Y) \
273 to (X+Q,Y-Q) to (X,Y-R) to (X-Q,Y-Q) @
275 define CIRCL "\f(AR) \s(14) O" @
278 define CIRCL2(PS) CIRC(PS.x PRFXOFFS2,PS.y,CIRCR,CIRCQ) @
279 define HLFCIRCL "\f(AR) \s(14) C" @
280 define HLFCIRCL2(PS) LARC(PS.x PRFXOFFS2,PS.y,CIRCR,CIRCQ) @
281 define BULLET "\f(AR) \s(8) \(bullet)" @
283 //define PERF(P1) print(P1.x PRFXOFFS,P1.y PRFYOFFS) CIRCL @
284 define PERF(P1) CIRCL2(P1) @
285 //define IMPERF(P1) print(P1.x PRFXOFFS,P1.y PRFYOFFS) HLFCIRCL @
286 define IMPERF(P1) HLFCIRCL2(P1) @
288 //define PRLXOFFS -4.25 @
289 define PRLXOFFS -3.65 @
290 define PRLXOFFS2 -4.2 @
291 define PRLYOFFS -.85 @
303 print(P2.x PRLXOFFS,P2.y PRLYOFFS) BULLET @
305 define PERFDUPPROL(P3)
307 print(P3.x PRLXOFFS,P3.y PRLYOFFS) BULLET @
309 define IMPERFDUPPROL(P3)
311 print(P3.x PRLXOFFS,P3.y PRLYOFFS) BULLET @
313 define IMPERFPROL(P3)
315 print(P3.x PRLXOFFS2,P3.y PRLYOFFS) BULLET @
317 // ----------------------------------------------------------------------------
319 // Modern time signatures
321 define CMMN "\s(12) \(com)" @
322 define CT "\s(12) \(cut)" @
324 define MTRFONT "\f(NB)\s(16)" @
325 define TRPL MTRFONT+"3" @
327 define TRIPLEOFFS -2 @
328 define PTRIPLE(P1,TROFFS) print(P1.x TROFFS,P1.y TRIPLEOFFS) TRPL @
330 define COMMONOFFS -2 @
333 define COMMON(P1) print(P1.x,P1.y COMMONOFFS) CMMN @
334 define PCOMMON(P1,COFFS) print(P1.x COFFS,P1.y COMMONOFFS) CMMN @
336 define CUT(P1) print(P1.x,P1.y CUTOFFS) CT @
338 define METERFRAC(P1,MOFFS,M1,M2)
339 print(P1.x MOFFS,P1.y MOFFS) MTRFONT+M1;
340 print(P1.x MOFFS,P1.y-4) MTRFONT+M2; @