From 626b85f7b67b97e7635c46d900edd9ca5a568831 Mon Sep 17 00:00:00 2001 From: Jan Nieuwenhuizen Date: Tue, 18 Nov 1997 10:12:20 +0100 Subject: [PATCH] patch::: 0.1.31: pats! pl 30.jcn1 - bf: mi2mu: notes of zero duration as comments - feta: ugh c clef --- NEWS | 4 +++ TODO | 2 -- VERSION | 2 +- mf/feta-eindelijk.mf | 21 +++------------ mf/feta-klef.mf | 62 +++++++++++++++++++++++++++++++++++++++----- mf/feta-macros.mf | 40 ++++++++++++++++++++++++++++ mf/feta-nummer.mf | 18 ------------- mf/feta20.mf | 2 +- mi2mu/VERSION | 2 +- mi2mu/mudela-item.cc | 9 +++++-- 10 files changed, 113 insertions(+), 49 deletions(-) diff --git a/NEWS b/NEWS index e3b20155dc..9814604fac 100644 --- a/NEWS +++ b/NEWS @@ -10,6 +10,10 @@ pl 31 ******** nov 11 +pl 30.jcn1 + - bf: mi2mu: notes of zero duration as comments + - feta: ugh c clef + pl 30 - feta: G clef. - scripts now do relative coords (fixes lyrics + barnumber bug) diff --git a/TODO b/TODO index f99d401dcb..3f63c612a6 100644 --- a/TODO +++ b/TODO @@ -23,8 +23,6 @@ grep for TODO and ugh/ugr * bf: abbrevs over whole note - * mi2mu: fix a1*0/4 output - STUFF * give Items/Spanners access to unbroken originals diff --git a/VERSION b/VERSION index 155de33c71..56468dd620 100644 --- a/VERSION +++ b/VERSION @@ -1,7 +1,7 @@ TOPLEVEL_MAJOR_VERSION = 0 TOPLEVEL_MINOR_VERSION = 1 TOPLEVEL_PATCH_LEVEL = 31 -TOPLEVEL_MY_PATCH_LEVEL = +TOPLEVEL_MY_PATCH_LEVEL = jcn1 # use the above to send patches, always empty for released version: # please don't move these comments up; the patch should fail if diff --git a/mf/feta-eindelijk.mf b/mf/feta-eindelijk.mf index bdad5b6ea1..51d35462aa 100644 --- a/mf/feta-eindelijk.mf +++ b/mf/feta-eindelijk.mf @@ -37,24 +37,9 @@ block_rest_x# = 3/2 interline#; define_pixels(block_rest_y, block_rest_x); -def block_rest= - pickup pencircle scaled blot_diameter; - - bot y1 = 0; - top y2 = block_rest_y; - y3 = y2; - y4 = y1; - - rt x1 = block_rest_x; - x2 = x1; - lft x3 = 0; - x4 = x3; - save p; - path p; - p:=z1 -- z2 -- z3 -- z4 -- cycle; - - filldraw p; -enddef; +def block_rest = + draw_block ((0,0), (block_rest_x, block_rest_y)); + enddef; fet_beginchar( "whole rest", "0", "wholerest"); set_char_box(0, block_rest_x#, diff --git a/mf/feta-klef.mf b/mf/feta-klef.mf index 56903d7f8e..2e9d1ff8c2 100644 --- a/mf/feta-klef.mf +++ b/mf/feta-klef.mf @@ -3,21 +3,71 @@ % % source file of the Feta (Font-En-Tja) music font % -% (c) 1997 Han-Wen Nienhuys -% +% (c) 1997 Han-Wen Nienhuys , +% Jan Nieuwenhuizen fet_begingroup("klef"); - def draw_staff(expr first, last)= pickup pencircle scaled stafflinethickness; for i:= first step 1 until last: draw (- interline, i* interline) .. (4 interline, i* interline); endfor + enddef; + +def draw_c_clef (expr reduction) = + save hair, norm, reduced_il; + reduced_il#=interline#*reduction; + norm#:=2/3reduced_il#; + hair#:=1/6norm#; + define_pixels (hair,norm,reduced_il); + set_char_box (0, 11/4interline#, 2 reduced_il#, 2 reduced_il#); + % huh, what's y-zero? + draw_block ((0,-d), (1/2reduced_il,h)); + draw_block ((1/2reduced_il+stafflinethickness,-d), + (1/2reduced_il+2stafflinethickness,h)); + + save xoff; + xoff=1/2reduced_il+2hair; + penpos1(hair,-90); + z1l=(xoff+norm+hair/2,h); + penpos2(norm-hair,180); + z2l=(w,h/2); + penpos3(hair,90); + z3=(((w-xoff)/2)+xoff,2hair); + penpos4(hair,90); + z4=(xoff+hair+1/2norm+hair,y3); + + penpos6(hair,-90); + z6r=(xoff+norm+hair,-d); + + save t; t=0.833; + save p; path p; + p = z4r{right}..z3r{right}..tension t..z2r{up} + ..z1r{left}..z1l{right}..z2l{down} + ..z3l{left}..z4l{left}; + pickup pencircle scaled 1pt#; + % boehoe, howto? +% draw p..(p yscaled -1)..cycle; + fill p..cycle; + fill (p yscaled -1)..cycle; + penlabels (1,2,3,4); + + % ugh, should be bulb, not flare + draw_flare(z1l,180,90,hair,norm); + draw_flare(z6r,180,-90,hair,norm+hair); + enddef; + +fet_beginchar ("C clef", "ugh_alto", "ugh_altoclef") + if test = 1: + draw_staff (-1,3); + fi; + draw_c_clef (1.0); +fet_endchar; - enddef; - - +fet_beginchar ("C clef", "ugh_alto_change", "ugh_caltoclef") + draw_c_clef (.8); +fet_endchar; % % Inspired by Baerenreiter and Breitkopf diff --git a/mf/feta-macros.mf b/mf/feta-macros.mf index d7708f7932..c03e97c7b0 100644 --- a/mf/feta-macros.mf +++ b/mf/feta-macros.mf @@ -100,6 +100,27 @@ def distorted_ellipse(expr a,b,err_y,err_x,super) = superellipse((a,err_x),(-err_y,b),(-a,-err_x),(err_y,-b),super); enddef; +% stolen from feta-eindelijk, but still +% FIXME: too high +def draw_block (expr bottom_left, top_right) = + pickup pencircle scaled blot_diameter; + + begingroup; + save x,y; + bot y1 = ypart bottom_left; + top y2 = ypart top_right; + y3 = y2; + y4 = y1; + + rt x1 = xpart top_right; + x2 = x1; + lft x3 = xpart bottom_left; + x4 = x3; + + filldraw z1--z2--z3--z4--cycle; + endgroup; + enddef; + def draw_brush(expr a,w,b,v) = save x,y; z1=a; z2=b; @@ -113,6 +134,25 @@ def draw_brush(expr a,w,b,v) = fill z3r{z3r-z5l}..z4l..{z5r-z3l}z3l..z5r{z5r-z3l}..z6l..{z3r-z5l}z5l..cycle; enddef; +def draw_flare(expr pos,alpha,beta,line,flare) = + begingroup; + clearxy; + penpos1(line,180+beta+alpha); + z1r=pos; + penpos2(flare,180+beta+alpha); + z2=z3; + penpos3(flare,0+alpha); + z3l=z1r+(1/2+0.43)*flare*dir(alpha+beta); + z4=z2r-1/6flare*dir(alpha); + penlabels(1,2,3,4); + pickup pencircle; + save t; t=0.833; + fill z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)} + ..z3l{dir(180+alpha+beta)}..tension t + ..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)}..cycle; + endgroup; + enddef; + def brush(expr a,w,b,v) = begingroup; draw_brush(a,w,b,v); diff --git a/mf/feta-nummer.mf b/mf/feta-nummer.mf index fb1bb559e5..496015828e 100644 --- a/mf/feta-nummer.mf +++ b/mf/feta-nummer.mf @@ -43,24 +43,6 @@ def draw_foot(expr xpos) = endgroup; enddef; -def draw_flare(expr pos,alpha,beta,line,flare) = - begingroup; - clearxy; - penpos1(line,180+beta+alpha); - z1r=pos; - penpos2(flare,180+beta+alpha); - z2=z3; - penpos3(flare,0+alpha); - z3l=z1r+(1/2+0.43)*flare*dir(alpha+beta); - z4=z2r-1/6flare*dir(alpha); - penlabels(1,2,3,4); - pickup pencircle; - save t; t=0.833; - fill z1r{dir(alpha)}..z3r{dir(180+alpha-beta)}..z2l{dir(alpha+180)} - ..z3l{dir(180+alpha+beta)}..tension t..z4{dir(180+alpha+beta)}..z1l{dir(alpha+180)}..cycle; - endgroup; - enddef; - def draw_six = set_char_box(0, 2thick#+2thin#, 0, height#); message "w:"&decimal w; diff --git a/mf/feta20.mf b/mf/feta20.mf index b45af8ed34..59d431f312 100644 --- a/mf/feta20.mf +++ b/mf/feta20.mf @@ -6,7 +6,7 @@ staffsize#:=20pt#; input autometric; fet_beginfont("feta", 20); -test := 0; +test := 1; input feta-generic; diff --git a/mi2mu/VERSION b/mi2mu/VERSION index 4ecc91f7f8..361ecac436 100644 --- a/mi2mu/VERSION +++ b/mi2mu/VERSION @@ -1,6 +1,6 @@ MAJOR_VERSION = 0 MINOR_VERSION = 0 -PATCH_LEVEL = 21 +PATCH_LEVEL = 22 # use to send patches, always empty for released version: MY_PATCH_LEVEL = # diff --git a/mi2mu/mudela-item.cc b/mi2mu/mudela-item.cc index b21d2acc2f..b4b1d46b29 100644 --- a/mi2mu/mudela-item.cc +++ b/mi2mu/mudela-item.cc @@ -173,8 +173,6 @@ Mudela_note::duration () Moment Mudela_note::duration_mom () { -// ugh -// return Duration_convert::dur2_mom (duration ()); assert (end_column_l_); return end_column_l_->at_mom () - at_mom (); } @@ -210,6 +208,13 @@ Mudela_note::str () if (dur.plet_b ()) str += String (" \\plet 1/1;"); + /* + note of zero duration is nonsense, + but let's output anyway for convenient debugging + */ + if (!duration_mom ()) + return String ("\n% ") + str + "\n"; + return str + " "; } -- 2.39.2