home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 June / SIMTEL_0692.cdr / msdos / tex / mutex.arc / MF.ARC / SLUR16.MF < prev    next >
Text File  |  1990-03-06  |  7KB  |  230 lines

  1. input musicdef
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. %                                                           %
  4. %            BOGEN UND (DE)CRESCENDO                        %
  5. %                                                           %
  6. %      (Phrasierungsbogen und Bogen der Steigung 0)         %
  7. %                                                           %
  8. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  9.  
  10. def drawslurs (expr st) =
  11.     save i, factor, length, height;
  12.     numeric i,  absp, length, height, factor;
  13.     factor:= 1/6;
  14.     for i= 0 upto 15:
  15.           length :=  (i+2)*nhw#;
  16.           height := 0 ;
  17.  
  18.           beginchar(i, length, height, 0);
  19.             clear;
  20.             z2r = (w,h);
  21.             z1l = origin;
  22.             absp := abs((-h,w));
  23.             if (factor*absp)>2nhh : factor:= 2nhh/absp fi;
  24.             z3r = 1/2z2l+factor*(-h,w);
  25.             penpos1(thinwidth,90);
  26.             penpos2(thinwidth,90);
  27.             penpos3(5/12beamht,90);
  28.  %          currentpen := pencircle xscaled thinwidth yscaled beamht ;
  29.             pickup  pencircle scaled (1/16mm + blacker);
  30.             penstroke z1e..z3e..z2e; %statt dir 30
  31.           endchar;
  32.     endfor;
  33. enddef;
  34.  
  35. def drawslursneg (expr st) =
  36.     save i, factor, length, depth;
  37.     numeric i,  absp, length, depth, factor;
  38.     factor:= 1/6;
  39.     for i=0 upto 15:
  40.          length :=  (i+2)*nhw#;
  41.          depth := length*st ;
  42.  
  43.         beginchar(16+i, length, 0, depth);
  44.            clear;
  45.            z2l = (w,-d);
  46.            z1r = origin;
  47.            absp := abs((d,w));
  48.            if (factor*absp)>2nhh : factor:= 2nhh/absp fi;
  49.            z3r = 1/2z2l+factor*(d,w);
  50.            penpos1(thinwidth,90);
  51.            penpos2(thinwidth,90);
  52.            penpos3(5/12beamht,90);
  53. %          currentpen := pencircle xscaled thinwidth yscaled beamht ;
  54.             pickup  pencircle scaled (1/16mm + blacker);
  55.            penstroke (z1e..z3e..z2e) rotatedaround(1/2z2r, 180);
  56.          endchar;
  57.     endfor;
  58. enddef;
  59.  
  60. def drawleftslur =
  61.     save i, length, height;
  62.     numeric i,  length, height;
  63.     length :=  9*nhw#;
  64.     for i = 1 upto 9:
  65.           height := (i+2)*1/2nhh# ;
  66.           beginchar(i-1+32, length, height, 0);
  67.             clear;
  68.             z2r = (w+4thinwidth,h);
  69.             z1l = origin;
  70.             penpos1(thinwidth,90);
  71.             penpos2(5/12beamht,90);
  72. %           currentpen := pencircle xscaled thinwidth yscaled beamht ;
  73.             pickup  pencircle scaled (1/16mm + blacker);
  74.             penstroke z1e..z2e{(2w,0)}; %statt dir 30
  75.           endchar;
  76.     endfor;
  77. enddef;
  78.  
  79. def drawrightslur =
  80.     save i,  length, height;
  81.     numeric i, length, height;
  82.     length :=  9*nhw#;
  83.     for i= 1 upto 9:
  84.           height := (i+2)*1/2nhh#;
  85.           beginchar(i-1+48, length, height, 0);
  86.             clear;
  87.             z1r = (0-4\thinwidth,h);
  88.             z2l = (w,0);
  89.             penpos2(thinwidth,90);
  90.             penpos1(5/12beamht,90);
  91. %           currentpen := pencircle xscaled thinwidth yscaled beamht ;
  92.             pickup  pencircle scaled (1/16mm + blacker);
  93.             penstroke z1e{right}..z2e; %statt dir 30
  94.           endchar;
  95.     endfor;
  96. enddef;
  97.  
  98. def drawleftslurneg  =
  99.     save i,  length, depth;
  100.     numeric i,   length, depth;
  101.     length :=  9*nhw#;
  102.     for i= 1 upto 9:
  103.           depth := (i+2)*1/2nhh# ;
  104.           beginchar(i-1+64, length, 0, depth);
  105.             clear;
  106.             z2l = (w+4thinwidth,-d);
  107.             z1r = origin;
  108.             penpos1(thinwidth,90);
  109.             penpos2(5/12beamht,90);
  110.             pickup  pencircle scaled (1/16mm + blacker);
  111.  %          currentpen := pencircle xscaled thinwidth yscaled beamht ;
  112.             penstroke z1e..z2e{(2w,0)}; %statt dir 30
  113.           endchar;
  114.     endfor;
  115. enddef;
  116.  
  117. def drawrightslurneg =
  118.     save i,  length, depth;
  119.     numeric i, length, depth;
  120.     length :=  9*nhw#;
  121.     for i= 1 upto 9:
  122.           depth := (i+2)*1/2nhh#;
  123.  
  124.           beginchar(i-1+80, length, 0, depth);
  125.             clear;
  126.             z1l = (0-4\thinwidth,-d);
  127.             z2r = (w,0);
  128.             penpos2(thinwidth,90);
  129.             penpos1(5/12beamht,90);
  130. %           currentpen := pencircle xscaled thinwidth yscaled beamht ;
  131.             pickup  pencircle scaled (1/16mm + blacker);
  132.             penstroke z1e{right}..z2e; %statt dir 30
  133.           endchar;
  134.     endfor;
  135. enddef;
  136.  
  137. %decrescendo und cresc.
  138. def drawcrescendo =
  139.     save i, height, length, depth;
  140.     numeric i, length, height, depth;
  141.     for i= 0 upto 15:
  142.           length :=  (i+1)*nhw#;
  143.           depth := 1/2nhh# ;
  144.           height := depth ;
  145.  
  146.           beginchar(i+96, length, height, depth);
  147.             clear;
  148.             z1 = origin;
  149.             z2l = (w,h);
  150.             z3r = (w,-d);
  151.             penpos2(1/16mm,90);
  152.             penpos1(1/16mm,90);
  153.             penpos3(1/16mm,90);
  154.             pickup  pencircle scaled (blacker);
  155.             penstrike z1e--z2e;
  156.             penstrike z1e--z3e;
  157.           endchar;
  158.     endfor;
  159. enddef;
  160.  
  161. def drawdecrescendo =
  162.     save i, height, length, depth;
  163.     numeric i, length, height, depth;
  164.     for i= 0 upto 15:
  165.           length :=  (i+1)*nhw#;
  166.           depth := 1/2nhh# ;
  167.           height := depth ;
  168.  
  169.           beginchar(i+112, length, height, depth);
  170.             clear;
  171.             z1l = (0,h);
  172.             z2 = (w,0);
  173.             z3r = (0,-d);
  174.             penpos2(1/16mm,90);
  175.             penpos1(1/16mm,90);
  176.             penpos3(1/16mm,90);
  177.             pickup  pencircle scaled (blacker);
  178.             penstrike z3e---z2e;
  179.             penstrike z1e---z2e;
  180. %label(1,2,3);
  181.           endchar;
  182.     endfor;
  183. enddef;
  184.  
  185. %%%%%%%%%%%%%%%%%%%
  186. % Bogen nach oben %
  187. %%%%%%%%%%%%%%%%%%%
  188.  
  189. drawslurs(0);
  190.  
  191. %%%%%%%%%%%%%%%%%%%%
  192. % Bogen nach unten %
  193. %%%%%%%%%%%%%%%%%%%%
  194.  
  195. drawslursneg(0);
  196.  
  197. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  198. % linge Halbboegen  nach oben %
  199. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  200.  
  201. drawleftslur;
  202.  
  203. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  204. % rechte Halbboegen  nach oben %
  205. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  206.  
  207. drawrightslur;
  208.  
  209. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  210. % linke Halbboegen  nach unten %
  211. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  212.  
  213. drawleftslurneg;
  214.  
  215. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  216. % rechte Halbboegen  nach unten %
  217. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  218.  
  219. drawrightslurneg;
  220.  
  221. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  222. % Crescendo und Decrescendo %
  223. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  224.  
  225. drawcrescendo;
  226. drawdecrescendo;
  227.  
  228.  
  229. end;
  230.