---- ../lilypond-1.3.94/CHANGES Sun Oct 8 10:27:38 2000
+--- ../lilypond-1.3.94.jcn2/CHANGES Tue Oct 10 15:50:19 2000
+++ b/CHANGES Tue Oct 10 19:36:50 2000
+@@ -1,3 +1,10 @@
+1.3.94.jcn3
+===========
+
+* Added Arpeggio and Trill elements to feta font.
+
+* Yet another bugfix for output-property (Han-Wen)
+
+ 1.3.94.jcn2
+ ===========
+ --- ../lilypond-1.3.94/CHANGES Sun Oct 8 10:27:38 2000
++ b/CHANGES Tue Oct 10 17:28:55 2000
@@ -1,3 +1,13 @@
1.3.94.lec1
MAJOR_VERSION=1
MINOR_VERSION=3
PATCH_LEVEL=94
-MY_PATCH_LEVEL=lec1
+MY_PATCH_LEVEL=jcn3
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
# should use kpsepath
+TEXDIRS=.
if [ -d /var/lib/texmf ]; then
- TEXDIR=/var/lib/texmf
-elif [ -d /var/texfonts ]; then
- TEXDIR=/var/texfonts
+ TEXDIRS="$TEXDIRS /var/lib/texmf"
+fi
+if [ -d /var/spool/texmf ]; then
+ TEXDIRS="$TEXDIRS /var/tmp/texmf"
+fi
+if [ -d /var/tmp/texfonts ]; then
+ TEXDIRS="$TEXDIRS /var/spool/texfonts"
+fi
+if [ -d /var/texfonts ]; then
+ TEXDIRS="$TEXDIRS /var/texfonts"
+fi
+if [ -z $TEXDIR ]; then
+ TEXDIRS=". /var"
else
- TEXDIR=/var/
+ TEXDIRS=". $TEXDIRS"
fi
# remove possibly stale .pk/.tfm files
-echo> /tmp/cleaning-font-dummy
-FILES=`find . $TEXDIR -name "feta*$WHAT*tfm" -or -name "feta*$WHAT*pk"`
+FILES=`find $TEXDIRS -name "feta*$WHAT*tfm" -or -name "feta*$WHAT*pk"`
echo removing $FILES
rm -f $FILES /tmp/cleaning-font-dummy
+++ /dev/null
-
-%
-% Using music-variable breaks output property
-%
-
-foo = \notes\relative c''{
- \outputproperty #(make-type-checker 'note-head-interface)
- #'extra-offset = #'(2 . 3)
- c2
- c
-}
-
-\score{
- <
- \context Staff=a\notes\relative c''{
- \outputproperty #(make-type-checker 'note-head-interface)
- #'extra-offset = #'(2 . 3)
- c2
- c
- }
- \context Staff=b \foo
- >
- \paper{
- linewidth=-1.0;
- \translator {
- \ScoreContext
- \consists "Mark_engraver";
- }
- }
-}
title = "LES N\\'ER\\'EIDES";
subtitle = "THE NEREIDS";
enteredby = "JCN";
- piece = "Allegretto scherzando";
+ %piece = "Allegretto scherzando";
copyright = "public domain";
description = "Natiest piece of competition at http://www.orphee.com/comparison/study.html, see http://www.orphee.com/comparison/gray.pdf";
comment = "LilyPond (1.3.93) can't really do this yet, I guess";
treble = \context Voice=treble \notes\relative c''{
% Broken?
\property Voice.NoteColumn \push #'horizontal-shift = #0
- r2
+ \outputproperty #(make-type-checker 'text-item-interface)
+ #'extra-offset = #'(-6 . 2)
+ r2^"Allegretto scherzando"
%2
\property Voice.Stem \pop #'direction
\property Voice.Stem \push #'direction = #1
- r4 <cis eis a cis> r2
+ r4 <cis\arpeggio eis a cis> r2
%3
- r4 <cis fis a cis> r8.
+ r4 <cis\arpeggio fis a cis> r8.
\translator Staff=bass
cis,16^2^"m.d."( <fis8 fis,> <e! e,!>
%4
\property Voice.Slur \pop #'direction
\property Voice.Slur \push #'direction = #1
%% 8va
- cis''''4^"m.g." (
+ \property PianoStaff.connectArpeggios = ##t
+ cis''''4^"m.g."\arpeggio (
#ifndef FAKE_GRACE
s4
\property Voice.Stem \pop #'direction
\property Voice.Stem \push #'direction = #-1
- <cis4 a fis dis>
+ <cis4\arpeggio a fis dis>
#ifdef FAKE_GRACE
s32*16
\property Voice.Stem \pop #'direction
\property Voice.Stem \push #'direction = #-1
\property Voice.slurEndAttachment = #'stem
- <)a''4 eis cis>
+ <)a''4\arpeggio eis cis>
%\stemboth
\property Voice.slurEndAttachment = ##f
\translator Staff=bass
\property Voice.Stem \pop #'length
\property Voice.Stem \pop #'direction
\property Voice.Stem \push #'direction = #-1
- <)a' fis cis>
+ <)a'\arpeggio fis cis>
\translator Staff=bass
\property Voice.Stem \pop #'direction
r2
\property Voice.Stem \push #'direction = #0
<
%urg: staff-change: ! on dis
- <cis'' a fis dis!>
+ <cis''\arpeggio a fis dis!>
% { s8. \clef bass;}
>
#ifdef FAKE_GRACE
s32*12
+ \outputproperty #(make-type-checker 'dynamic-interface)
+ #'extra-offset = #'(0 . 1.5)
s32\> s s \!s
#endif
-
- s32 s-"rall." s s
+ s32
+ \outputproperty #(make-type-checker 'text-item-interface)
+ #'extra-offset = #'(0 . 1.5)
+ s-"rall." s s
s8 s4
\outputproperty #(make-type-checker 'dynamic-interface)
- #'extra-offset = #'(0 . 10)
+ #'extra-offset = #'(0 . 3.5)
s1\mf-"a tempo"
- s8 s8\mf s4 s4 s8\> s32 s s \!s
+ s8
+ \outputproperty #(make-type-checker 'dynamic-interface)
+ #'extra-offset = #'(-1 . 3.5)
+ s8\mf s4 s4 s8\> s32 s s \!s
}
lowerDynamics = \context Dynamics=lower \notes{
\treble
\trebleTwo
>
- %\context Dynamics=middle <
- % \global
- % \middleDynamics
- %>
- \middleDynamics
+ \context Dynamics=middle <
+ \global
+ \middleDynamics
+ >
\context Staff=bass <
\clef bass;
\global
%Generic_property_list = #generic-lyrics-properties
\consists "Property_engraver";
DynamicsMinimumVerticalExtent = #(cons -3 -3)
- VerticalAlignment \push #'threshold = #'(8 . 8)
+ %VerticalAlignment \push #'threshold = #'(8 . 8)
+ %VerticalAlignment \push #'threshold = #'(10 . 10)
+ VerticalAlignment \push #'threshold = #'(9 . 9)
startSustain = #"Ped."
stopSustain = #"*"
\translator {
\VoiceContext
- TextScript \push #'style = #"italic"
+ %TextScript \push #'style = #"italic"
+ %TextScript \push #'font-size = #3
+ TextScript \push #'size = #"Large"
+ TextScript \push #'font-size = #"Large"
}
\translator {
\PianoStaffContext
\accepts Dynamics;
- VerticalAlignment \push #'threshold = #'(8 . 8)
+ %VerticalAlignment \push #'threshold = #'(8 . 8)
+ %VerticalAlignment \push #'threshold = #'(6 . 6)
+ VerticalAlignment \push #'threshold = #'(7 . 7)
}
\translator {
\GraceContext
\score{
- \context StaffGroup <
- %<
- \context Staff=one \notes\relative c''{
- f,
- <f, a c>
- }
- \context Staff=two \notes\relative c{
- \clef bass;
- g
- <g b d>
+ \context PianoStaff <
+ \context Staff=one \notes\relative c''{
+ fis,\arpeggio
+ %%\property PianoStaff.SpanArpeggio \push #'connect = ##t
+ \property PianoStaff.connectArpeggios = ##t
+ <fis,\arpeggio a c>
}
+ \context Staff=two \notes\relative c{
+ \clef bass;
+ g
+ <g\arpeggio b d>
+ }
>
- \paper{
- \translator{
- \StaffContext
- \consists Arpeggio_engraver;
- }
- }
}
#include "engraver.hh"
#include "group-interface.hh"
#include "item.hh"
+#include "musical-request.hh"
#include "arpeggio.hh"
#include "stem.hh"
+#include "local-key-item.hh"
+#include "rhythmic-head.hh"
+#include "side-position-interface.hh"
+#include "staff-symbol-referencer.hh"
class Arpeggio_engraver : public Engraver
{
virtual void acknowledge_element (Score_element_info);
virtual void process_acknowledged ();
virtual void do_pre_move_processing ();
+ virtual bool do_try_music (Music *);
private:
Item* arpeggio_;
+ Arpeggio_req *arpeggio_req_;
Link_array <Score_element> stems_;
+ Link_array<Score_element> supports_;
};
Arpeggio_engraver::Arpeggio_engraver ()
{
arpeggio_ = 0;
+ arpeggio_req_ = 0;
+}
+
+bool
+Arpeggio_engraver::do_try_music (Music* m)
+{
+ if (!arpeggio_req_)
+ {
+ if (Arpeggio_req *a = dynamic_cast<Arpeggio_req*> (m))
+ {
+ arpeggio_req_ = a;
+ return true;
+ }
+ }
+ return false;
}
void
Arpeggio_engraver::acknowledge_element (Score_element_info info)
{
- if (Stem::has_interface (info.elem_l_))
+ if (arpeggio_req_)
{
- stems_.push (info.elem_l_);
+ if (Stem::has_interface (info.elem_l_))
+ {
+ stems_.push (info.elem_l_);
+ }
+ else if (Rhythmic_head::has_interface (info.elem_l_)
+ || Local_key_item::has_interface (info.elem_l_))
+ {
+ supports_.push (info.elem_l_);
+ }
}
}
if (!arpeggio_ && !stems_.empty ())
{
arpeggio_ = new Item (get_property ("Arpeggio"));
+ arpeggio_->set_parent (stems_[0], Y_AXIS);
+ Side_position::set_axis (arpeggio_, X_AXIS);
+ Side_position::set_direction (arpeggio_, LEFT);
Pointer_group_interface pgi (arpeggio_, "stems");
for (int i = 0; i < stems_.size (); i++)
{
pgi.add_element (stems_[i]);
- arpeggio_->add_dependency (stems_[i]);
+ Side_position::add_support (arpeggio_, stems_[i]);
+ }
+ for (int i = 0; i < supports_.size (); i++)
+ {
+ Side_position::add_support (arpeggio_, supports_[i]);
}
- announce_element (arpeggio_, 0);
+ announce_element (arpeggio_, arpeggio_req_);
}
}
typeset_element (arpeggio_);
arpeggio_ = 0;
}
+ arpeggio_req_ = 0;
stems_.clear ();
+ supports_.clear ();
}
}
Molecule mol;
- Molecule dot = me->paper_l ()->lookup_l (0)->afm_find ("dots-dot");
- Real half_space = Staff_symbol_referencer::staff_space (me) / 2;
- for (Real i = iv[MIN]; i <= iv[MAX]; i++)
+ Molecule arpeggio = me->paper_l ()->lookup_l (0)->afm_find ("scripts-arpeggio");
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
+ for (int i = (int)iv[MIN]/ 2; i < (int)(iv[MAX] - 1)/ 2; i++)
{
- Molecule d (dot);
- d.translate_axis (i * half_space, Y_AXIS);
- mol.add_molecule (d);
+ Molecule a (arpeggio);
+ a.translate_axis (i * staff_space, Y_AXIS);
+ mol.add_molecule (a);
}
- mol.translate (Offset (-3, 0));
+ mol.translate (Offset (-2 * staff_space, 0);
return mol.create_scheme ();
}
public:
VIRTUAL_COPY_CONS (Music);
};
+
+class Arpeggio_req : public Request
+{
+public:
+ VIRTUAL_COPY_CONS (Music);
+};
+
#endif // MUSICALREQUESTS_HH
#define OUTPUT_PROPERTY_HH
#include "music.hh"
-#include "protected-scm.hh"
-
+//#include "protected-scm.hh"
/*
class Output_property : public Music
{
public:
- Output_property(SCM, SCM, SCM);
+ VIRTUAL_COPY_CONS (Music);
+ Output_property (SCM, SCM, SCM);
};
#endif /* OUTPUT_PROPERTY_HH */
static Keyword_ent the_key_tab[]={
{"autochange", AUTOCHANGE},
+ {"arpeggio", ARPEGGIO },
{"spanrequest", SPANREQUEST},
{"commandspanrequest", COMMANDSPANREQUEST},
{"simultaneous", SIMULTANEOUS},
/* tokens which are not keywords */
%token AUTOCHANGE
+%token ARPEGGIO
%token TEXTSCRIPT
%token ACCEPTS
%token ALTERNATIVE
a->set_spot (THIS->here_input ());
$$ = a;
}
+ | ARPEGGIO {
+ Arpeggio_req *a = new Arpeggio_req;
+ a->set_spot (THIS->here_input ());
+ $$ = a;
+ }
;
sup_quotes:
*/
#include "engraver.hh"
+#include "lily-guile.hh"
#include "item.hh"
#include "arpeggio.hh"
#include "span-arpeggio.hh"
#include "group-interface.hh"
+#include "side-position-interface.hh"
+#include "staff-symbol-referencer.hh"
/**
void
Span_arpeggio_engraver::process_acknowledged ()
{
- if (arpeggios_.size () > 1 && !span_arpeggio_)
+ if (!span_arpeggio_ && arpeggios_.size () > 1
+ && to_boolean (get_property ("connectArpeggios")))
{
span_arpeggio_ = new Item (get_property ("SpanArpeggio"));
+ span_arpeggio_->set_parent (arpeggios_[0], Y_AXIS);
+ Side_position::set_axis (span_arpeggio_, X_AXIS);
Pointer_group_interface pgi (span_arpeggio_, "arpeggios");
for (int i = 0; i < arpeggios_.size () ; i++)
{
span_arpeggio_->add_dependency (arpeggios_[i]);
}
- span_arpeggio_->set_parent (arpeggios_[0], Y_AXIS);
- span_arpeggio_->set_parent (arpeggios_[0], X_AXIS);
-
announce_element (span_arpeggio_, 0);
}
}
common = arpeggio->common_refpoint (common, Y_AXIS);
}
// Hmm, nothing in common?
- if (0) //(common)
+ if (0) //common)
for (SCM s = me->get_elt_property ("arpeggios"); gh_pair_p (s); s = gh_cdr (s))
{
Score_element *arpeggio = unsmob_element (gh_car (s));
iv = Interval (-23, 5);
Molecule mol;
- Molecule dot = me->paper_l ()->lookup_l (0)->afm_find ("dots-dot");
- Real half_space = Staff_symbol_referencer::staff_space (me) / 2;
- for (Real i = iv[MIN]; i < iv[MAX]; i++)
+ Molecule arpeggio = me->paper_l ()->lookup_l (0)->afm_find ("scripts-arpeggio");
+ Real staff_space = Staff_symbol_referencer::staff_space (me);
+ for (int i = (int)iv[MIN]/ 2; i < (int)(iv[MAX] - 1)/ 2; i++)
{
- Molecule d (dot);
- d.translate_axis (i * half_space, Y_AXIS);
- mol.add_molecule (d);
+ Molecule a (arpeggio);
+ a.translate_axis (i * staff_space, Y_AXIS);
+ mol.add_molecule (a);
}
- mol.translate (Offset (-6, 0));
+ mol.translate (Offset (-2 * staff_space, 0);
return mol.create_scheme ();
}
-
\consists "Collision_engraver";
\consists "Rest_collision_engraver";
\consists "Local_key_engraver";
-
\consists "Piano_pedal_engraver";
-
-% \consists "Arpeggio_engraver";
+ \consists "Arpeggio_engraver";
\consistsend "Axis_group_engraver";
\accepts "Staff";
}
-PianoStaffContext = \translator{\GrandStaffContext
- alignmentReference = \center;
+PianoStaffContext = \translator{
+ \GrandStaffContext
+ \name "PianoStaff";
\consists "Vertical_align_engraver";
+ alignmentReference = \center;
VerticalAlignment \push #'threshold = #'(12 . 12)
% \consistsend "Axis_group_engraver";
- \name "PianoStaff";
}
StaffGroupContext= \translator {
% input feta-bolletjes;
% input feta-banier;
% input feta-eindelijk;
- input feta-klef;
+% input feta-klef;
% input feta-toevallig;
-% input feta-schrift;
+ input feta-schrift;
% input feta-haak;
% input feta-timesig;
% input feta-pendaal;
fet_begingroup("scripts")
-
def draw_fermata =
save alpha, radius, crook_thinness, crook_fatness, dot_diam;
fet_endchar;
+thick#:=1/24designsize;
+define_blacker_pixels(thick);
+
+rthin:=1/8*staff_space;
+rthick:=2thick+rthin;
+
+def draw_arpeggio =
+ save alpha;
+ alpha:=-40;
+ save ne,nw,se,sw; pair ne,nw,se,sw;
+ save x,y;
+
+ se=dir alpha; nw=dir (alpha+180);
+ ne=dir (alpha+90); sw=dir (alpha-90);
+ penpos1(rthin,alpha+90);
+ penpos2(5/4rthick,alpha);
+ penpos4(5/4rthick,alpha);
+ penpos5(rthin,alpha+90);
+ penpos3(3/4rthick,alpha);
+
+ z1=(width/2, height) - overshoot*se;
+ z2=2[z4,(width/2,height/2)];
+ z3=1/2[z2,z4];
+ x4=2/8staff_space;
+ y4=rthin;
+
+ z5=2[z1,(width/2,height/2)];
+ z6=z2l+1/2rthin*sw;
+ z7=z4l+1/2rthin*sw+1/2rthin*se;
+ z8=2[z6,(width/2,height/2)];
+ z9=2[z7,(width/2,height/2)];
+
+ fill z1l{se}..{se}z6..z3l..z7{se}..{se}z5l..z5r{nw}..{nw}z8..z3r..z9{nw}..{nw}z1r.. cycle;
+ penlabels(1,2,3,4,5,6,7,8,9);
+ enddef;
+
+fet_beginchar("Arpeggio","arpeggio","arpeggio");
+ %draw_staff (-2, 2, 0.0);
+ save height, overshoot, width;
+ height# = staff_space#;
+ width# = 0.8height#;
+ overshoot# = 0.25 staff_space#;
+ define_pixels (height,overshoot,width);
+ set_char_box(0, width#, 0, height#);
+ draw_arpeggio;
+ fet_endchar;
+
+% Extendable Trill symbol.
+% Not yet used
+% Rename me to Trill, rename Trill to Tr?
+fet_beginchar("Trill-element","trill-element","trill-element");
+ save height, overshoot;
+ height# = staff_space#;
+ width# = 0.8height#;
+ overshoot# = 0.25 staff_space#;
+ define_pixels (height,overshoot,width);
+ set_char_box(0, height#, 0, width#);
+ draw_arpeggio;
+ currentpicture := currentpicture shifted -(width/2, height/2);
+ currentpicture := currentpicture rotated 90;
+ currentpicture := currentpicture shifted (height/2, width/2);
+ fet_endchar;
+
+% Hmm
input feta-slag;
fet_endgroup("scripts");