5 // ----------------------------------------------------------------------------
11 // Notehead used for longa and breve
13 define QUDRTOFFS +1.75 @
17 define LNADD2 LNADD LNADD @
23 define HOR2DIST -1.5 @
24 define LNGUSTEM STMLEN -LNGVERTU QUDRTOFFS -2 @
25 define LNGDSTEM STMLEN +LNGVERT QUDRTOFFS -2 @
28 medium line (P1.x LO,P1.y OFFS1 QUDRTOFFS) to (P1.x LO +LNGHOR,P1.y OFFS1 QUDRTOFFS) @
31 medium line (P1.x LO,P1.y OFFS1 HOR2DIST QUDRTOFFS) to (P1.x LO +LNGHOR,P1.y OFFS1 HOR2DIST QUDRTOFFS) @
34 line (P1.x LO,P1.y OFFS1 +LNGVERTU QUDRTOFFS) to (P1.x LO,P1.y OFFS1 HOR2DIST -LNGVERTD QUDRTOFFS) @
37 line (P1.x LO +LNGHOR,P1.y OFFS1 +LNGVERTU +USTEM QUDRTOFFS) to (P1.x LO +LNGHOR,P1.y OFFS1 HOR2DIST -LNGVERTD -DSTEM QUDRTOFFS) @
39 define QUADRHD(P1,OFFS1,USTEM,DSTEM)
45 define LONGAU(P2,OFFS2) QUADRHD(P2,OFFS2,LNGUSTEM,0) @
46 define LONGAD(P2,OFFS2) QUADRHD(P2,OFFS2,0,LNGDSTEM) @
47 define BREVE(P2,OFFS2) QUADRHD(P2,OFFS2,0,0) @
49 // ----------------------------------------------------------------------------
51 // noteheads used for semibreve, minima, semiminima, fusa & semifusa
53 define DMNDHD "\s(12) \(diamond)" @
54 define FILLHD "\s(12) \(filldiamond)" @
55 define STMXOFFS +2.4 @
58 define FLAGXOFFS1 +2 @
59 define FLAGYOFFS1 .2 @
61 define FLAGYOFFS3 1.4 @
62 define FLAGYOFFS4 3.2 @
64 define STEMU line (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS) to (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS +STMLEN) @
66 define STEMD line (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS) to (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS -STMLEN) @
68 define FLAGU1 line (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS1) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS2) @
70 define FLAGU2 line (P1.x STMXOFFS,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS3) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYUOFFS +STMLEN -FLAGYOFFS4) @
72 define FLAGD1 line (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS1) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS2) @
74 define FLAGD2 line (P1.x STMXOFFS,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS3) to (P1.x STMXOFFS FLAGXOFFS1,P1.y OFFS1 STMYDOFFS -STMLEN +FLAGYOFFS4) @
76 define SEMIBREVE(P1,OFFS1)
77 print (P1.x,P1.y OFFS1) DMNDHD @
79 define CLRDSEMIBREVE(P1,OFFS1)
80 print (P1.x,P1.y OFFS1) FILLHD @
82 define MINIMU(P1,OFFS1)
83 print (P1.x,P1.y OFFS1) DMNDHD
86 define MINIMD(P1,OFFS1)
87 print (P1.x,P1.y OFFS1) DMNDHD
90 define SEMIMINU(P1,OFFS1)
91 print (P1.x,P1.y OFFS1) FILLHD
94 define SEMIMIND(P1,OFFS1)
95 print (P1.x,P1.y OFFS1) FILLHD
98 define FUSAU(P1,OFFS1)
99 print (P1.x,P1.y OFFS1) FILLHD
103 define SEMIFUSAU(P1,OFFS1)
104 print (P1.x,P1.y OFFS1) FILLHD
109 define FUSAD(P1,OFFS1)
110 print (P1.x,P1.y OFFS1) FILLHD
114 define SEMIFUSAD(P1,OFFS1)
115 print (P1.x,P1.y OFFS1) FILLHD
120 // ----------------------------------------------------------------------------
124 define DOT "\s(12) \(dot)" @
125 define UDOTYOFFS +1.5 @
126 define LDOTYOFFS -.5 @
127 define CDOTYOFFS +.5 @
128 define DOTXOFFS +3.2 @
130 define UDOT(P1,OFFS1)
131 print (P1.x DOTXOFFS,P1.y OFFS1 UDOTYOFFS) DOT @
133 define LDOT(P1,OFFS1)
134 print (P1.x DOTXOFFS,P1.y OFFS1 LDOTYOFFS) DOT @
136 define CDOT(P1,OFFS1)
137 print (P1.x DOTXOFFS,P1.y OFFS1 CDOTYOFFS) DOT @
139 // ----------------------------------------------------------------------------
143 define SHARPXOFFS -2.5 @
146 define SHARP(P1,OFFS1)
147 line (P1.x SHARPXOFFS,P1.y OFFS1+2) to (P1.x SHARPXOFFS+2,P1.y OFFS1);
148 line (P1.x SHARPXOFFS+SHDST,P1.y OFFS1+2) to (P1.x SHARPXOFFS+SHDST+2,P1.y OFFS1);
149 line (P1.x SHARPXOFFS,P1.y OFFS1) to (P1.x SHARPXOFFS+2,P1.y OFFS1+2);
150 line (P1.x SHARPXOFFS+SHDST,P1.y OFFS1) to (P1.x SHARPXOFFS+SHDST+2,P1.y OFFS1+2); @
152 // ----------------------------------------------------------------------------
156 define LEDGERLEN +4.75 @
158 define LEDGER(P1,OFFS1)
159 line (P1.x,P1.y OFFS1) to (P1.x LEDGERLEN,P1.y OFFS1) @
161 define PLEDGER(P1,XOFFS,YOFFS)
162 line (P1.x XOFFS,P1.y YOFFS) to (P1.x XOFFS LEDGERLEN,P1.y YOFFS) @
164 // ----------------------------------------------------------------------------
169 define RLINEADD +.2 @
170 define RLINEADD2 RLINEADD RLINEADD @
172 define RLONGALINELEN 4 @
174 define RLONGA(P1,OFFS1)
175 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 -RLONGALINELEN) @
177 define RBREVELINELEN 2 @
179 define RBREVE(P1,OFFS1)
180 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 -RBREVELINELEN) @
182 define RLINELEN 1.2 @
184 define RSEMIBREVE(P1,OFFS1)
185 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 -RLINELEN) @
187 define RMINIM(P1,OFFS1)
188 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 +RLINELEN) @
190 define RFLAGYOFFS1 .1 @
192 define RFLAG1 line (P1.x RLINEADD RXOFFS,P1.y OFFS1 +RLINELEN -RFLAGYOFFS1) to (P1.x RLINEADD +1 RXOFFS,P1.y OFFS1 +RLINELEN -.5) @
194 define RSEMIMINIM(P1,OFFS1)
195 medium line (P1.x RXOFFS,P1.y OFFS1) to (P1.x RXOFFS,P1.y OFFS1 +RLINELEN)
198 // ----------------------------------------------------------------------------
202 define GCLF "\s(12) \(gclef)" @
203 define CCLF "\s(12) \(cclef)" @
204 define FCLF "\s(12) \(fclef)" @
206 define TREBLEOFFS -7 @
209 print (P1.x, P1.y TREBLEOFFS) GCLF @
211 define PTREBLECLF(P1, TROFFS)
212 print (P1.x TROFFS, P1.y TREBLEOFFS) GCLF @
214 define TREBLECLF8(P1)
215 print (P1.x, P1.y TREBLEOFFS) GCLF
216 print (P1.x +2, P1.y TREBLEOFFS -2.2) "\f(TI) \s(10) 8"
219 define PTREBLECLF8(P1, TROFFS)
220 print (P1.x TROFFS, P1.y TREBLEOFFS) GCLF
221 print (P1.x +2 TROFFS, P1.y TREBLEOFFS -2.2) "\f(TI) \s(10) 8"
224 define BARITONOFFS -0 @
225 define TENOROFFS -2 @
230 define BARITONCLF(P1)
231 print (P1.x, P1.y BARITONOFFS) CCLF @
234 print (P1.x, P1.y TENOROFFS) CCLF @
237 print (P1.x, P1.y ALTOOFFS) CCLF @
240 print (P1.x, P1.y DESCOFFS) CCLF @
243 print (P1.x, P1.y BASSOFFS) FCLF @
245 define PBASSCLF(P1,CLOFFS)
246 print (P1.x CLOFFS, P1.y BASSOFFS) FCLF @
248 // ----------------------------------------------------------------------------
253 define PRFXOFFS2 -1.125 @
254 define PRFYOFFS -1.75 @
255 define DUPYOFFS +2.6 @
256 define DUPXOFFS -1.05 @
260 line(P1.x DUPXOFFS,P1.y DUPYOFFS) to (P1.x DUPXOFFS,P1.y DUPLEN) @
262 // The "Q" parameter must be the "R" parameter divided by the square root
263 // of 2. Unfortunately, Mup doesn't support multiplication and division.
265 define CIRC(X, Y, R, Q)
266 curve (X+R,Y) to (X+Q,Y+Q) to (X,Y+R) to (X-Q,Y+Q) to (X-R,Y) \
267 to (X-Q,Y-Q) to (X,Y-R) to (X+Q,Y-Q) to (X+R,Y) @
269 define LARC(X, Y, R, Q)
270 curve (X+Q,Y+Q) to (X,Y+R) to (X-Q,Y+Q) to (X-R,Y) \
271 to (X-Q,Y-Q) to (X,Y-R) to (X+Q,Y-Q) @
273 define RARC(X, Y, R, Q)
274 curve (X-Q,Y+Q) to (X,Y+R) to (X+Q,Y+Q) to (X+R,Y) \
275 to (X+Q,Y-Q) to (X,Y-R) to (X-Q,Y-Q) @
277 define CIRCL "\f(AR) \s(14) O" @
280 define CIRCL2(PS) CIRC(PS.x PRFXOFFS2,PS.y,CIRCR,CIRCQ) @
281 define HLFCIRCL "\f(AR) \s(14) C" @
282 define HLFCIRCL2(PS) LARC(PS.x PRFXOFFS2,PS.y,CIRCR,CIRCQ) @
283 define BULLET "\f(AR) \s(8) \(bullet)" @
285 //define PERF(P1) print(P1.x PRFXOFFS,P1.y PRFYOFFS) CIRCL @
286 define PERF(P1) CIRCL2(P1) @
287 //define IMPERF(P1) print(P1.x PRFXOFFS,P1.y PRFYOFFS) HLFCIRCL @
288 define IMPERF(P1) HLFCIRCL2(P1) @
290 //define PRLXOFFS -4.25 @
291 define PRLXOFFS -3.65 @
292 define PRLXOFFS2 -4.2 @
293 define PRLYOFFS -.85 @
305 print(P2.x PRLXOFFS,P2.y PRLYOFFS) BULLET @
307 define PERFDUPPROL(P3)
309 print(P3.x PRLXOFFS,P3.y PRLYOFFS) BULLET @
311 define IMPERFDUPPROL(P3)
313 print(P3.x PRLXOFFS,P3.y PRLYOFFS) BULLET @
315 define IMPERFPROL(P3)
317 print(P3.x PRLXOFFS2,P3.y PRLYOFFS) BULLET @
319 // ----------------------------------------------------------------------------
321 // Modern time signatures
323 define CMMN "\s(12) \(com)" @
324 define CT "\s(12) \(cut)" @
326 define MTRFONT "\f(NB)\s(16)" @
327 define TRPL MTRFONT+"3" @
329 define TRIPLEOFFS -2 @
330 define PTRIPLE(P1,TROFFS) print(P1.x TROFFS,P1.y TRIPLEOFFS) TRPL @
332 define COMMONOFFS -2 @
335 define COMMON(P1) print(P1.x,P1.y COMMONOFFS) CMMN @
336 define PCOMMON(P1,COFFS) print(P1.x COFFS,P1.y COMMONOFFS) CMMN @
338 define CUT(P1) print(P1.x,P1.y CUTOFFS) CT @
340 define METERFRAC(P1,MOFFS,M1,M2)
341 print(P1.x MOFFS,P1.y MOFFS) MTRFONT+M1;
342 print(P1.x MOFFS,P1.y-4) MTRFONT+M2; @