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

  1. input musicdef
  2. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  3. %                                                             %
  4. %                   BALKEN                                    %
  5. %                                                             %
  6. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  7.  
  8.  
  9.  
  10. font_x_height beamht#;
  11.  
  12. def drawbeams (expr st, jj) =
  13.     save i, length, height;
  14.     numeric i, length, height;
  15.     length:= 0.5;
  16.     for i=0 upto 7:
  17.         height := length*st + beamht#;
  18.         beginchar(jj*8+i, length, height, 0);
  19.            clear;
  20.          % x2 = w; x1 = 0;
  21.            z2r = (w,h);
  22.            z1l = origin;
  23.            penpos1(beamht,90);
  24.            penpos2(beamht,90);
  25.            penstroke z1e---z2e;
  26.          endchar;
  27.          length :=  2*length;
  28.     endfor;
  29. enddef;
  30.  
  31. def drawbeamsneg (expr st, jj) =
  32.     save i, length, depth;
  33.     numeric i, length, depth;
  34.     length:= 0.5;
  35.     for i=0 upto 7:
  36.         depth := length*st - beamht#;
  37.         beginchar(jj*8+i, length, 0, depth);
  38.            clear;
  39.            z2l = (w,d);
  40.            z1r = origin;
  41.            penpos1(beamht,90);
  42.            penpos2(beamht,90);
  43.            penstroke z1e---z2e;
  44.          endchar;
  45.          length :=  2*length;
  46.     endfor;
  47. enddef;
  48.  
  49. numeric ss[];
  50.  
  51. ss[0]:=0.05;
  52. ss[1]:=0.10;
  53. ss[2]:=0.15;
  54. ss[3]:=0.20;
  55. ss[4]:=0.25;
  56. ss[5]:=0.30;
  57. ss[6]:=0.35;
  58. ss[7]:=0.45;
  59.  
  60.  
  61. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  62. % Balken mit positiver Steigung %
  63. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  64.  
  65. for j=0 upto 7 :
  66. drawbeams(ss[j],j);
  67. endfor;
  68.  
  69.  
  70. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  71. % Balken mit negativer Steigung %
  72. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  73.  
  74. for j=0 upto 7 :
  75. drawbeamsneg(-ss[j],j+8);
  76. endfor;
  77.  
  78. end;
  79.