@ This file contains a number of macros that are described in the manual.

key C
time C
systemgap 56

*define mf "\it\m\bi\f"/b
*define hang() [slur/rr15&&2] &&1 [es]
*define s8u "\it\8va-"/ol/" -| \mf\\159\"/u0.3/"\it\8"/s2
*define e8u "#"/ol/r8
*define s8d "\it\8va-"/ul/" -| \mf\\161\"/d0.3/"\it\8"/s2
*define e8d "#"/ul/r8

draw triangle
  3 -4 moveto   @ move to apex
  -3 -6 rlineto @ line to bottom left
  6 0 rlineto   @ horizontal line to bottom right
  -3 6 rlineto  @ line back to apex
  fill          @ fill it in (solid triangle)
enddraw

draw box
  -2 headleft sub accleft sub stembottom 1.3 sub moveto
  stemtop stembottom sub 2.6 add dup 0 exch rlineto
  headleft headright add accleft add 4 add dup 0 rlineto exch
  0 exch neg rlineto
  neg 0 rlineto
  stroke
enddraw

draw bracket
  -2 headleft sub accleft sub headbottom linebottom add moveto
  -2 0 rlineto
  -4 headleft sub accleft sub headtop linetop sub lineto
   2 0 rlineto
   stroke
enddraw

draw save
  headbottom originx
enddraw

draw connect
  originx sub 3 add dup 3 add 2 div
  3 1 roll exch 2 sub moveto
  -12 lineto
  3 headbottom 2 sub lineto
  stroke
enddraw

draw blip
  linegapx linegapy moveto
  0 linegapx 2 mul lineto
  linegapx neg linegapy neg lineto
  0.3 setlinewidth stroke
enddraw

draw ped
  0 0 moveto "\**163\ " show
enddraw

*define ped [line/=P/b/h/ol/d4 linegap/h0/w30/draw ped]
*define blip [linegap/=P/draw blip]
*define ep   [endline/=P]


[staff 1 treble 1]
&mf/ts "\*c\ \bi\= 88"/a/ts/u4/c g [draw triangle] g &hang(g,/ru4) &hang(g,/b/rd4) ||

[draw box] $a [draw box] f' [draw box] (f-g-); [space 10] [draw box] (f'-g'-);
[space 6] [draw bracket] (#f-c'-); [space 6] [draw bracket] (g-#d'-) ||

[draw save] e c'-g-a-b- [draw connect] a ||

"\it\cresc-==en-==do"/ul gc'ga | gfgr |
"\it\decresc.-"/ul gfef | G "#"/ul/r6 G ||

"\it\cresc.-"/ul/" ."/u1.5 gc'ga | gf "#"/ul gr ||

"\*136\-"/ol/"\*96\" E'+_ | "#"/ol/r8 E'R || @ trill with a wiggly line

&s8u c'.d'-e'd' | g'g' &e8u G' | @ ottava alta
&s8d c'.d'-e'd' | g'g' &e8d G' || @ ottava bassa

[bass 0] r- &ped %a &blip b-_; b-; e &blip a`-_ | a`- G` &ep r-r | @ piano pedal
[endstaff]
