+25.jcn2
+ - bf: staffside axis init
+ - bf: staffmargin stuff.
+ - Timesig C fixes
+
+
+pl 25.uu2
+ - junked Scarlatti clef
+ - fixed clef^8
+ - Interpretation_context_handle is interface to interpretation context
+ - Staff_switching_translator: automatic staff switching for Piano staffs.
+
pl25.jcn1
- volta-spanner: junked dot_p_; not so handy after all: kerning??
- - feta-nummer: added : ,-.14s4s
+ - feta-nummer: added : ,-.
- volta/tuplet thickness
- bf: scs-paper
- bf: ".|", and bar-thicknesses
+pl 25.uu1
+ - bf: default duration is 4
+
+**********
+pl 25
+
pl 23.ms2
- property noteheadStyle
- first attempt to make harmonics : see input/test/harmonics.fly
Most of the items are marked in the code as well, with full explanation.
grep for TODO and ugh/ugr/urg
+*In a piece such as the Zipoli piece in mutopia/... there is a stray
+`8' over every bar line when processed by LilyPond 1.1.25.
+
+TODO before 1.2
+
+ * junk Text_def, use G_text_item in stead.
+
+ * junk Script_def
+
+ * fix partial measures in meaningful way.
+
+ * fix AFM for BlueSky AFM files.
+
+ * working notehead style.
+
+ * add scripts to bars eg. |^"bla"
+
+ * relative mode for mi2mu
+
+ * uniformise recent feta contributions.
+ - use SCM and Molecules for {accordeon stuff, }
+ - bigger and fatter 4/4 C
+
+ * make a SMOB of Atom and Molecule
+
+ * use kerning for dynamics.
+
+ * sort out directory stuff.
+ - --prefix option?
+ - -I option per filetype?
+ - kpathsea?
+
**************
I also found a few bugs:
don't work. The problem seems to be that you can't define a
a score identifier and then use it in the \score block.
-* Instrument names in the margin. Example:
- input/test/hara-kiri.ly. The text should of course
- be to the left of the staff lines.
-**************
-- Textual scripts and dynamics are printed in the middle of the staff.
+ - make separate MF chars for endings of ledger lines, and calc rest of lines.
- * fix AFM for BlueSky AFM files.
+ * support_l_arr_ empty in staff-margin's G_staff_side_item
-- I didn't find any working example of the Staff_margin-engraver in
- input/test, and I couldn't invent one myself either.
- bar-scripts.ly, score-bar-scripts.ly and hara-kiri.ly don't work
- properly.
- * check widths of TFM, something's wrong here.
+************
- * hang Item on Spanner
+How can I specify a chord whose duration is longer than a whole note?
- * junk Text_def, use G_text_item in stead.
+ \type ChordNames { \chord{ A1*2-min } }
+
+gives me a parse error. And \times doesn't work either. I can't use
+a spacer note. So it seems to be impossible to have long chords of
+general length. Of course, in the example above I can use \breve.
+But what if I want a chord that lasts for 3 whole notes? Or what
+about 2.5 whole notes? Is there a mechanism for getting this kind of
+length?
+
+
+Why does my second extender request get junked in the following:
+
+\score{
+< \notes \relative c''{
+ a4()b()c()d c()d()b()a }
+ \type Lyrics \lyrics {
+ foo1 __ bar2. __ _4 }
+> }
+
+It seems that \cr and \decr don't work any more.
+
+\score{
+ \notes{
+ a \cr b \rc c }
+ \paper{linewidth=-1.;}
+}
+
+Gives me
+
+qq.ly:3:9: warning: can't find (de)crescendo to end:
+ a \cr
+ b \rc c }
+
+
+
+Use of semicolons is still rather confusing. They are obligatory
+after some types of assignments and illegal after others.
+
+ \property foo=bar illegal
+ foo = 3 at top level illegal
+ foo = 3 inside \paper obligatory
+ foo = \notes{ ...} top level illegal
+ foo = \translator{ } in \paper obligatory
+
+As far as I can tell, the sole accomplishment of this syntactic
+irregularity is to keep the user as confused as possible.
+
+
+I was trying to get interstaff beams to work and did this:
+
+\score{
+\type GrandStaff <
+\type Staff=one \notes\relative c'{
+ \stemup
+ [c8 c \translator Staff=two \stemup c c]
+ \translator Staff=one
+ \stemdown
+ [ b8 \translator Staff=two a8]
+ \translator Staff=one
+ c4
+ }
+\type Staff=two \notes{ \clef bass; s1 }
+>
+\paper{
+ \translator{
+ \GrandStaffContext
+ minVerticalAlign = 3.0*\staffheight;
+ maxVerticalAlign = 3.0*\staffheight;
+ }
+ linewidth = -1.;
+}
+}
+
+The beams are at the right angle, but they aren't in the right place.
+
+
+
+*******************
+
+
+ * fractional chord durs.
+
+ * hang Item on Spanner
* remove Interval dim_ from Dimension_cache and rename the struct.
* convert-mudela --output
- * staff_margin (with a partial measure.)
+ * Staff_margin (with a partial measure.)
* fix "I've been drinking too much"
- * add scripts to bars eg. |^"bla"
-
- * fix Staff_margin_engraver.
-
* fix pletvisibility properties:
- bracket on/off/no-bracket-when-beam
- num on/off/no-num-when-beam
* fix convert-mudela manpage
- * automatic staff selection.
-
* decimal point in \paper {}
*{ \voiceone <a'4.*2/3 d''4.*2/3 fis''4.*2/3> [g''8 fis'' e''] d''4 |}
portato= \script { "portato" 0 -1 0 1 0 }
STUFF
- * uniformise recent feta contributions.
-
* check out legal/(c) matters for scores.
* check out GCC signatures?
* $DEPENDENCIES_OUTPUT support
- * fix weird behaviour when .AFMs/.SCMs not found.
-
* Xdvi zooming ?! Try to understand GS garbage collection.
gs: Error: /undefined in draw_beam
gs: Operand stack:
--Will Rogers (1879-1935)
***************************
+
+> I am still muddling along with integrating GUILE in LilyPond, and I
+> have a question. I want to replace an existing C++ implementation of
+> identifier tables by GUILE's code. I've managed to replace
+>
+> Hash_table<String,Identifier*>
+>
+> by
+>
+> Hash_table<SCM, Identifier*>
+>
+> and use interning and GUILE symbols for doing the identifier lookup.
+> But I'd like to use GUILE's hash tables as well, and that's were my
+> question comes in: is there an interface that allows me to iterate
+> through the entries of a GUILE hash table?
+
+I use the following, which should definitely be provided somewhere
+in guile, but isn't, AFAIK:
+
+(define (hash-table-for-each fn ht)
+ (do ((i 0 (+ 1 i)))
+ ((= i (vector-length ht)))
+ (do ((alist (vector-ref ht i) (cdr alist)))
+ ((null? alist) #t)
+ (fn (car (car alist)) (cdr (car alist))))))
+
+(define (hash-table-map fn ht)
+ (do ((i 0 (+ 1 i))
+ (ret-ls '()))
+ ((= i (vector-length ht)) (reverse ret-ls))
+ (do ((alist (vector-ref ht i) (cdr alist)))
+ ((null? alist) #t)
+ (set! ret-ls (cons (fn (car (car alist)) (cdr (car alist))) ret-ls)))))
+
+If you want a C version, you can run the above code through hobbit, or
+tranlate it to C by hand.
+
+-russ
+
+
+--
+"Whenever you find yourself on the side of the majority, it is time to
+pause and reflect."
+ -- Mark Twain
+***********************
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=1
-PATCH_LEVEL=25
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=26
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
chmod 755 $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh
ln -sf $LILYPOND_SOURCEDIR/buildscripts/ps-to-gifs.sh $prefix/bin/ps-to-gifs
ln -sf $LILYPOND_SOURCEDIR/mf/out/ afm
+TFMDIR=`kpsewhich cmr10.tfm`
+ln -sf `dirname $TFMDIR` tfm
mkdir -p $prefix/share/
ln -sf $prefix/lilypond/ $sources/lilypond
--- /dev/null
+
+\score {
+\notes {
+ \type AutoSwitchGrandStaff \relative c' {
+ c8^8 d^8 b^8 a^8 [a,^8 f'^8 g,^8 ~ g]
+
+ }
+}
+
+\paper {
+\translator { \ScoreContext
+\accepts AutoSwitchGrandStaff;
+}
+\translator{
+ \type "Line_group_engraver_group";
+ \name AutoSwitchGrandStaff;
+ \consists "Span_bar_engraver";
+ \consists "Vertical_align_engraver";
+ \consists "Piano_bar_engraver";
+ minVerticalAlign = 2.*\staffheight;
+ maxVerticalAlign = 2.*\staffheight;
+
+ \accepts "AutoSwitchContext";
+ \accepts "Staff";
+}
+\translator {
+ \type "Engraver_group_engraver";
+ \name "AutoSwitchContext";
+ \consists "Staff_switching_translator";
+}
+
+}}
--- /dev/null
+%{
+(Message vers:9)
+To: Adrian Mariano <adrian@cam.cornell.edu>
+cc: gnu-music-discuss@gnu.org
+Subject: Re: Switching from one staff to two staffs
+Reply-To: janneke@gnu.org
+In-reply-to: Your message of "Tue, 19 Jan 1999 12:27:10 EST."
+ <199901191727.MAA29757@avalanche.cam.cornell.edu>
+Date: Wed, 20 Jan 1999 09:39:22 +0100
+From: Jan Nieuwenhuizen <jan@beavis-nt>
+
+On Tuesday, 19 January 1999, Adrian Mariano writes:
+
+> I want to typeset something which starts out with just one staff and then
+> harmony comes in and there are two staffs. I can't figure out how to do
+> this. I get an extra blank staff during the second section (using
+> Lily 1.1.15):
+
+There used to be an example called 'multi.ly'...
+Try this (we'll include it in pl23/24):
+
+extra-staff.ly:
+%}
+
+\score {
+ <
+ \type Staff=i \notes\relative c''{ c1 c c c c }
+ \type StaffGroup=ii \notes\relative c''{
+ \type Staff=ii
+ c1 c
+ < \type Staff=ii { c1 } \type Staff=iii { c1 } >
+ c
+ }
+ >
+ \paper {
+ linewidth = -1.;
+ \translator{
+ \ScoreContext
+ minVerticalAlign = 2.0*\staffheight;
+ maxVerticalAlign = 2.0*\staffheight;
+ }
+ }
+}
+
if (i.origin_grav_l_arr_.size () == 1)
{
staff_side_p_->dim_cache_[other_axis].parent_l_ = &bar_l->dim_cache_[other_axis];
+ // staff_side_p_->dim_cache_[axis_].parent_l_ = &bar_l->dim_cache_[axis_];
staff_side_p_->add_support (i.elem_l_);
+ bar_l->add_dependency (staff_side_p_); // UGH.
}
}
}
source file of the GNU LilyPond music typesetter
(c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>,
+
Mats Bengtsson <matsb@s3.kth.se>
*/
Clef_engraver::Clef_engraver()
{
+ clef_p_ = 0;
clef_req_l_ = 0;
clef_type_str_ = "";
c0_position_i_ = 0;
octave_dir_ = CENTER;
}
+/*
+ ugh. Should be configurable.
+ */
struct Clef_settings {
char const *name;
char const *cleftype;
{"violin", "treble", -2},
{"G", "treble", -2},
{"G2", "treble", -2},
- {"scarlatti", "scarlatti", 0 },
{"french", "treble",-4 },
{"soprano", "alto",-4 },
{"mezzosoprano", "alto",-2 },
{0,0,0}
};
-
-
-
-/*
- Ugh. Should have support for Dictionaries in mudela.
- */
bool
Clef_engraver::set_type (String s)
{
found = 1;
}
}
+
if (!found)
{
switch(toupper (s[0]))
c0_position_i_ = clef_position_i_;
else if (clef_type_str_ == "bass")
c0_position_i_ = clef_position_i_ + 4;
- else if (clef_type_str_ == "scarlatti")
- c0_position_i_ = 0;
else
assert (false);
return true;
}
-void
-Clef_engraver::read_req (Clef_change_req*c_l)
-{
- if (!set_type (c_l->clef_str_))
- c_l->error (_ ("unknown clef type "));
-}
-
/**
Generate a clef at the start of a measure. (when you see a Bar,
{
create_clef();
if (!clef_req_l_)
- for (int i=0; i < clef_p_arr_.size (); i++)
- {
- clef_p_arr_[i]->default_b_ = true;
- }
-
+ clef_p_->default_b_ = true;
}
/* ugh; should make Clef_referenced baseclass */
void
Clef_engraver::do_creation_processing()
{
- Scalar def = get_property ("defaultClef", 0);
+ create_default_b_ = true; // should read property.
+ Scalar def = get_property ("createInitdefaultClef", 0);
if (def.to_bool ()) // egcs: Scalar to bool is ambiguous
set_type (def);
if (clef_type_str_.length_i ())
{
create_clef();
- for (int i=0; i < clef_p_arr_.size (); i++)
-
- clef_p_arr_[i]->default_b_ = false;
+ clef_p_->default_b_ = false;
}
}
if (Clef_change_req *cl = dynamic_cast <Clef_change_req *> (r_l))
{
clef_req_l_ = cl;
- read_req (clef_req_l_);
+ if (!set_type (cl->clef_str_))
+ cl->error (_ ("unknown clef type "));
+
return true;
}
else
void
Clef_engraver::create_clef()
{
- if (clef_type_str_ == "scarlatti")
+ if (!clef_p_)
{
- while (clef_p_arr_.size () < 2)
- {
- Clef_item *ct= new Clef_item;
- ct->break_priority_i_ = -2; // UGH
- announce_element (Score_element_info (ct, clef_req_l_));
- clef_p_arr_.push (ct);
- }
- clef_p_arr_[0]->symbol_ = "treble";
- clef_p_arr_[0]->y_position_i_ = 4;
- clef_p_arr_[1]->symbol_ = "bass";
- clef_p_arr_[1]->y_position_i_ = -4;
+ Clef_item *c= new Clef_item;
+ c->break_priority_i_ = -2; // ugh
+ announce_element (Score_element_info (c, clef_req_l_));
+ clef_p_ = c;
}
- else
- {
- if (!clef_p_arr_.size ())
- {
- Clef_item *c= new Clef_item;
- c->break_priority_i_ = -2; // ugh
- announce_element (Score_element_info (c, clef_req_l_));
- clef_p_arr_.push (c);
- }
- for (int i=0; i < clef_p_arr_.size (); i++)
- {
- clef_p_arr_[i]->symbol_ = clef_type_str_;
- clef_p_arr_[i]->y_position_i_ = clef_position_i_;
- clef_p_arr_[i]->octave_dir_ = octave_dir_;
- }
- }
+
+ clef_p_->symbol_ = clef_type_str_;
+ clef_p_->y_position_i_ = clef_position_i_;
+ clef_p_->octave_dir_ = octave_dir_;
}
if (clef_req_l_)
{
create_clef();
- for (int i=0; i < clef_p_arr_.size (); i++)
- clef_p_arr_[i]->default_b_ = false;
+ clef_p_->default_b_ = false;
+ }
+ else if (create_default_b_)
+ {
+ String type = get_property ("defaultClef", 0);
+ set_type (type.length_i () ? type : "treble");
+ create_clef ();
+ clef_p_->default_b_ = false;
+ create_default_b_ =0;
}
}
void
Clef_engraver::do_pre_move_processing()
{
- for (int i=0; i <clef_p_arr_.size (); i++)
+ if (clef_p_)
{
- typeset_element (clef_p_arr_[i]);
+ typeset_element (clef_p_);
+ clef_p_ =0;
}
- clef_p_arr_.clear ();
+ create_default_b_ = false;
}
void
void
Clef_engraver::do_removal_processing()
{
- if (clef_p_arr_.size ())
- {
- assert (false);
- }
+ assert (!clef_p_);
}
Clef_item::do_pre_processing()
{
dim_cache_[Y_AXIS].translate (paper()->internote_f () * y_position_i_);
-
- bool b= (break_status_dir() != RIGHT);
- change_b_ = b;
-
- if (default_b_)
- {
- set_empty(b);
- transparent_b_ = b;
- }
+ change_b_ = (break_status_dir() != RIGHT);
}
/*
void
Clef_item::do_add_processing ()
{
- if (!break_status_dir_ // broken stuff takes care of their own texts
- && octave_dir_)
+ if (!break_status_dir_) // broken stuff takes care of their own texts
{
- G_text_item *g = new G_text_item;
- pscore_l_->typeset_element (g);
+ SCM defvis = gh_eval_str ("(lambda (d) (if (= d 1) '(#f . #f) '(#t . #t)))");
+ G_text_item *g =0;
+ if (octave_dir_)
+ {
+ g = new G_text_item;
+ pscore_l_->typeset_element (g);
- g->text_str_ = "8";
- g->style_str_ = "italic";
- g->dim_cache_[Y_AXIS].parent_l_ = &dim_cache_[Y_AXIS];
- g->dim_cache_[X_AXIS].parent_l_ = &dim_cache_[X_AXIS];
- add_dependency (g); // just to be sure.
-
- Real r = do_height ()[octave_dir_] + g->extent (Y_AXIS)[-octave_dir_];
- g->dim_cache_[Y_AXIS].set_offset (r);
+ g->text_str_ = "8";
+ g->style_str_ = "italic";
+ g->dim_cache_[Y_AXIS].parent_l_ = &dim_cache_[Y_AXIS];
+ g->dim_cache_[X_AXIS].parent_l_ = &dim_cache_[X_AXIS];
+ add_dependency (g); // just to be sure.
+
+ Real r = do_height ()[octave_dir_] + g->extent (Y_AXIS)[-octave_dir_];
+ g->dim_cache_[Y_AXIS].set_offset (r);
+ }
+ if (default_b_)
+ {
+ visibility_lambda_ = defvis;
+ if (g)
+ g->visibility_lambda_ = defvis;
+ }
}
+
}
to_position_l_ = 0;
transparent_b_ = true;
padding_f_ = 0;
+ axis_ = Y_AXIS;
}
{
add_dependency (e);
to_position_l_ = e;
- to_position_l_->dim_cache_[Y_AXIS].parent_l_ = &dim_cache_[Y_AXIS];
+ to_position_l_->dim_cache_[axis_].parent_l_ = &dim_cache_[axis_];
}
void
void
G_staff_side_item::position_self ()
{
- if (!support_l_arr_.size ())
- return ;
-
- Dimension_cache *common = common_group (typecast_array (support_l_arr_, (Graphical_element*)0),
- axis_);
-
Interval dim;
- for (int i=0; i < support_l_arr_.size (); i++)
+ Dimension_cache *common = 0;
+ if (support_l_arr_.size ())
{
- Score_element * e = support_l_arr_ [i];
- Real coord = e->relative_coordinate (common, axis_);
- dim.unite (coord + e->extent (axis_));
+ common = common_group (typecast_array (support_l_arr_, (Graphical_element*)0),
+ axis_);
+
+ for (int i=0; i < support_l_arr_.size (); i++)
+ {
+ Score_element * e = support_l_arr_ [i];
+ Real coord = e->relative_coordinate (common, axis_);
+ dim.unite (coord + e->extent (axis_));
+ }
+ }
+ else
+ {
+ dim = Interval(0,0);
+ common = dim_cache_[axis_].parent_l_;
}
-
Interval sym_dim = to_position_l_->extent (axis_);
Real off = dim_cache_[axis_].relative_coordinate (common) - padding_f_ * dir_;
/// where is c-0 in the staff?
class Clef_engraver : public Engraver {
- Link_array<Clef_item> clef_p_arr_;
+ Clef_item * clef_p_;
Clef_change_req * clef_req_l_;
void create_clef();
- void read_req (Clef_change_req*);
bool set_type (String);
protected:
virtual void do_process_requests();
int clef_position_i_;
Direction octave_dir_;
String clef_type_str_;
-
+ bool create_default_b_;
Clef_engraver();
--- /dev/null
+/*
+ interpretation-context-handle.hh -- declare Interpretation_context_handle
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#ifndef INTERPRETATION_CONTEXT_HANDLE_HH
+#define INTERPRETATION_CONTEXT_HANDLE_HH
+#include "lily-proto.hh"
+
+class Interpretation_context_handle
+{
+ Translator_group * report_to_l_;
+ void down ();
+ void up (Translator_group*);
+public:
+ ~Interpretation_context_handle ();
+ Interpretation_context_handle ();
+ void set_translator (Translator_group*);
+ bool try_music (Music *);
+ void operator =(Interpretation_context_handle const&);
+ Interpretation_context_handle (Interpretation_context_handle const&);
+ Translator_group * report_to_l () const;
+};
+
+#endif /* INTERPRETATION_CONTEXT_HANDLE_HH */
+
#include "array.hh"
#include "moment.hh"
#include "virtual-methods.hh"
+#include "interpretation-context-handle.hh"
/** Walk through music and deliver music to translation units, synced
in time. This classa provides both the implementation of the shared
construct with one point in musical time.
*/
class Music_iterator {
- Array<Translator_group*>report_to_l_arr_;
- void push_translator (Translator_group*);
- void pop_translator();
+ Interpretation_context_handle handle_;
protected:
Music const * music_l_;
class Translator_group : public virtual Translator {
Array<String> consists_str_arr_;
Array<String> accepts_str_arr_;
+ Dictionary<Scalar> properties_dict_;
+
+ int iterator_count_;
+ friend class Interpretation_context_handle;
public:
+ Scalar get_property (String type_str, Translator_group **where_found_l) const;
+ void set_property (String var_name, Scalar value);
+
Pointer_list<Translator *> trans_p_list_;
String id_str_;
- int iterator_count_;
-
VIRTUAL_COPY_CONS(Translator);
hierarchically grouped #Translator#s
*/
class Translator : public Input {
- Dictionary<Scalar> properties_dict_;
public:
Music_output_def * output_def_l_;
String type_str_;
/**
ask daddy for a feature
*/
- Scalar get_property (String type_str, Translator const **where_found_l) const;
- void set_property (String var_name, Scalar value);
Music_output_def *output_def_l () const;
-
+ Scalar get_property (String, Translator_group **) const;
virtual Moment now_moment () const;
protected:
--- /dev/null
+/*
+ interpretation-context-handle.cc -- implement Interpretation_context_handle
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+
+#include "interpretation-context-handle.hh"
+#include "translator-group.hh"
+
+void
+Interpretation_context_handle::up (Translator_group*t)
+{
+ report_to_l_ = t;
+ t->iterator_count_ ++;
+}
+
+void
+Interpretation_context_handle::down()
+{
+ report_to_l_->iterator_count_ --;
+ report_to_l_ = 0;
+}
+
+bool
+Interpretation_context_handle::try_music (Music *m)
+{
+ return report_to_l_->try_music (m);
+}
+
+Interpretation_context_handle::Interpretation_context_handle (Interpretation_context_handle const&s)
+{
+ report_to_l_ =0;
+ if (s.report_to_l_)
+ up (s.report_to_l_ );
+}
+
+void
+Interpretation_context_handle::operator = (Interpretation_context_handle const &s)
+{
+ set_translator (s.report_to_l_);
+}
+
+void
+Interpretation_context_handle::set_translator (Translator_group*trans)
+{
+ if (report_to_l_ ==trans)
+ return;
+ if (report_to_l_)
+ down ();
+ if (trans)
+ up (trans);
+}
+
+Translator_group*
+Interpretation_context_handle::report_to_l ()const
+{
+ return report_to_l_;
+}
+
+Interpretation_context_handle::Interpretation_context_handle()
+{
+ report_to_l_ =0;
+}
+
+Interpretation_context_handle::~Interpretation_context_handle ()
+{
+ if (report_to_l_)
+ down ();
+}
+
NOTECOMMAND \\{A}+
LYRICS ({AA}|{TEX})[^0-9 \t\n\f]*
ESCAPED [nt\\'"]
-EXTENDER [_][_]
+EXTENDER __
%%
Lookup::afm_find (String s, bool warn) const
{
if (!afm_l_)
- ((Lookup*)this)->afm_l_ = all_fonts_global_p->find_afm (font_name_);
-
+ {
+ Lookup * me = ((Lookup*)this);
+ me->afm_l_ = all_fonts_global_p->find_afm (font_name_);
+ if (!me->afm_l_)
+ {
+ warning (_f("Can't open `%s'\n", font_name_));
+ warning (_f("Search path %s\n", global_path.str ().ch_C()));
+ }
+ }
Adobe_font_char_metric m = afm_l_->find_char (s, warn);
Atom a;
return report_to_l();
}
-void
-Music_iterator::push_translator (Translator_group*t)
-{
- report_to_l_arr_.push (t);
- t->iterator_count_ ++;
-}
-
-void
-Music_iterator::pop_translator()
-{
- report_to_l()->iterator_count_ --;
- assert (report_to_l()->iterator_count_ >=0);
- report_to_l_arr_.pop();
-}
Translator_group*
Music_iterator::report_to_l() const
{
- if (! report_to_l_arr_.size())
- return 0;
- return report_to_l_arr_.top();
+ return handle_.report_to_l ();
}
void
Music_iterator::set_translator (Translator_group*trans)
-{
- if (report_to_l()==trans)
- return;
- if (report_to_l())
- pop_translator();
- if (trans)
- push_translator (trans);
+{
+ handle_.set_translator (trans);
}
void
Music_iterator::construct_children()
{
-
}
Music_iterator::~Music_iterator()
{
- set_translator (0);
}
Moment
+/*
+ SHOULD JUNK THIS.
+ */
String *
get_scriptdef (char c)
{
THIS->parser_error (_("Wrong type for property value"));
delete $4;
- $$->set_property (*$2, str);
+ /* ugh*/
+ Translator_group * tr = dynamic_cast<Translator_group*>($$);
+ tr->set_property (*$2, str);
}
| translator_spec_body NAME STRING ';' {
$$->type_str_ = *$3;
if (init_str.length_i () && global_path.find (init_str).empty_b ())
{
warning (_f ("can't find file: `%s\'", init_str));
+ warning (_f ("Search path: %s", global_path.str ().ch_C()));
return;
}
if ((file_str != "-") && global_path.find (file_str).empty_b ())
#include "bar.hh"
#include "time-description.hh"
#include "g-text-item.hh"
+#include "g-staff-side.hh"
ADD_THIS_TRANSLATOR (Staff_margin_engraver);
String long_str = get_property ("instrument", 0);
String str = get_property ("instr", 0);
- if (now_moment () > Moment (0))
+ if (now_moment () > Moment (0) && str.length_i ())
long_str = str;
- if (!long_str.empty_b ())
+ if (long_str.empty_b ())
return;
create_items (0);
text_p_->text_str_ = long_str;
+ staff_side_p_->dir_ = LEFT;
Bar_script_engraver::acknowledge_element(i);
}
--- /dev/null
+/*
+ staff-switching-translator.cc -- implement Staff_switching_translator
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ */
+#include "engraver.hh"
+#include "interpretation-context-handle.hh"
+#include "drul-array.hh"
+#include "engraver-group.hh"
+#include "musical-request.hh"
+
+class Staff_switching_translator : public Engraver
+{
+ Interpretation_context_handle my_voice_;
+ Drul_array<Interpretation_context_handle> staff_handle_drul_;
+protected:
+ virtual bool do_try_music (Music* m);
+ virtual void do_creation_processing ();
+public:
+ Staff_switching_translator ();
+ VIRTUAL_COPY_CONS(Translator);
+};
+
+Staff_switching_translator::Staff_switching_translator ()
+{
+}
+
+void
+Staff_switching_translator::do_creation_processing ()
+{
+ Translator_group * daddy =daddy_grav_l (); // staff switching context
+
+ staff_handle_drul_[UP].set_translator (daddy->daddy_trans_l_ -> find_create_translator_l ("Staff", "upper"));
+ staff_handle_drul_[DOWN].set_translator (daddy->daddy_trans_l_-> find_create_translator_l ("Staff", "lower"));
+
+
+ staff_handle_drul_[DOWN].report_to_l ()->set_property ("defaultClef", "bass");
+
+ my_voice_.set_translator (staff_handle_drul_[UP].report_to_l ()->find_create_translator_l ("Voice", daddy->id_str_));
+}
+
+bool
+Staff_switching_translator::do_try_music (Music*m)
+{
+ if (Note_req*nr = dynamic_cast<Note_req*> (m))
+ {
+ Direction staff = (nr->pitch_.semitone_pitch () >= 0)
+ ? UP
+ : DOWN;
+
+
+ Translator_group * mv = my_voice_.report_to_l ();
+ Translator_group *dest_staff =staff_handle_drul_[staff].report_to_l ();
+ if (mv->daddy_trans_l_ != dest_staff)
+ {
+ mv->daddy_trans_l_->remove_translator_p (mv);
+ dest_staff->add_translator (mv);
+ }
+ }
+
+ return my_voice_.try_music (m);
+}
+
+ADD_THIS_TRANSLATOR(Staff_switching_translator);
#include "misc.hh"
#include "abbrev.hh"
#include "staff-info.hh"
+#include "translator-group.hh"
Stem_engraver::Stem_engraver()
{
stem_p_->dir_forced_b_ = true;
}
- Translator const *which;
+ Translator_group const *which;
prop = get_property ("stemLeftBeamCount", &which);
if (prop.isnum_b ())
{
stem_p_->beams_i_drul_[LEFT] = prop;
- ((Translator*)which)->set_property ("stemLeftBeamCount", "");
+ ((Translator_group*)which)->set_property ("stemLeftBeamCount", "");
}
prop = get_property ("stemRightBeamCount", &which);
if (prop.isnum_b ())
{
stem_p_->beams_i_drul_[RIGHT] = prop;
- ((Translator*)which)->set_property ("stemRightBeamCount", "");
+ ((Translator_group*)which)->set_property ("stemRightBeamCount", "");
}
+++ /dev/null
-/*
- text-item.cc -- implement Text_item
-
- source file of the GNU LilyPond music typesetter
-
- (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-*/
-
-#if 0
-#include "musical-request.hh"
-#include "paper-def.hh"
-#include "text-item.hh"
-#include "stem.hh"
-#include "molecule.hh"
-#include "lookup.hh"
-#include "debug.hh"
-
-
-Text_item::Text_item (General_script_def* tdef_l, Direction d)
-{
- dir_ = d;
- fat_b_ = false;
- tdef_p_ = tdef_l->clone ();
-}
-
-Text_item::~Text_item ()
-{
- delete tdef_p_;
-}
-
-void
-Text_item::do_pre_processing ()
-{
- if (!dir_)
- dir_ = DOWN;
-}
-
-Real
-Text_item::get_position_f () const
-{
- // uhuh, tdef/gdef?
- if (Text_def *tdl = dynamic_cast<Text_def*>(tdef_p_))
- {
- if (tdl->style_str_ != "finger") // HUHH?
- return Staff_side::get_position_f ();
- }
-
- if (!dir_)
- {
- warning (_ ("Text_item::get_position_f(): "
- "somebody forgot to set my vertical direction, returning -20"));
- return -20;
- }
-
- Interval v = support_extent ();
- // add no extra: fingers should be just above note, no?
- return v[dir_];
-}
-
-Interval
-Text_item::symbol_height () const
-{
- return tdef_p_->get_atom (paper (), dir_).dim_.y ();
-}
-
-Molecule*
-Text_item::do_brew_molecule_p () const
-{
- Atom a (tdef_p_->get_atom (paper (), dir_));
-
- if (!fat_b_)
- a.dim_[X_AXIS] = Interval (0,0);
- Molecule* mol_p = new Molecule (a);
-#if 0
- if (dir_<0) // should do something better anyway.
- mol_p->translate_axis (mol_p->extent ().y ().left , Y_AXIS);
-#endif
-
- mol_p->translate_axis (coordinate_offset_f_, Y_AXIS);
-
-#if 0
- // fine for one lyric, urg for lyric chord
- mol_p->translate_axis (a.dim_.y ().length (), Y_AXIS);
-#endif
-
- return mol_p;
-}
-
-
-
-#endif
#include "debug.hh"
#include "pcursor.hh"
#include "rational.hh"
+#include "dictionary-iter.hh"
Translator_group::Translator_group (Translator_group const&s)
: Translator(s)
consists_str_arr_ = s.consists_str_arr_;
accepts_str_arr_ = s.accepts_str_arr_;
iterator_count_ =0;
+ properties_dict_ = s.properties_dict_;
+
}
Translator_group::~Translator_group ()
#ifndef NPRINT
if (!check_debug)
return ;
+ for (Dictionary_iter<Scalar> i (properties_dict_); i.ok (); i++)
+ {
+ DOUT << i.key () << "=" << i.val () << '\n';
+ }
if (status == ORPHAN)
{
DOUT << "consists of: ";
add_translator (t->clone ());
}
}
+
+Scalar
+Translator_group::get_property (String id, Translator_group **where_l) const
+{
+ if (properties_dict_.elem_b (id))
+ {
+ if (where_l)
+ *where_l = this;
+ return properties_dict_[id];
+ }
+
+ if (daddy_trans_l_)
+ return daddy_trans_l_->get_property (id, where_l);
+
+ if (where_l)
+ *where_l = 0;
+ return "";
+}
+
+void
+Translator_group::set_property (String id, Scalar val)
+{
+ properties_dict_[id] = val;
+}
#include "translator.hh"
#include "debug.hh"
#include "translator-group.hh"
-#include "dictionary-iter.hh"
+
#include "rational.hh"
Translator::~Translator ()
status = ORPHAN;
daddy_trans_l_ =0;
output_def_l_ = s.output_def_l_;
- properties_dict_ = s.properties_dict_;
type_str_ = s.type_str_;
}
DOUT << classname (this) << " {";
if (classname (this) != type_str_)
DOUT << "type = " << type_str_;
- for (Dictionary_iter<Scalar> i (properties_dict_); i.ok (); i++)
- {
- DOUT << i.key () << "=" << i.val () << '\n';
- }
do_print ();
DOUT << "}\n";
#endif
status = CREATION_INITED;
}
-Scalar
-Translator::get_property (String id, Translator const **where_l) const
-{
- if (properties_dict_.elem_b (id))
- {
- if (where_l)
- *where_l = this;
- return properties_dict_[id];
- }
-
- if (daddy_trans_l_)
- return daddy_trans_l_->get_property (id, where_l);
-
- if (where_l)
- *where_l = 0;
- return "";
-}
-
-void
-Translator::set_property (String id, Scalar val)
-{
- properties_dict_[id] = val;
-}
Music_output_def *
{
return output_def_l_;
}
+
+Scalar
+Translator::get_property (String id, Translator_group **where_l) const
+{
+ return daddy_trans_l_->get_property (id, where_l);
+}
+
right = 1
up = 1
down = -1
+
% zillie spellink?
center=0
\scmfile "lily.scm";
+unusedEntry = \notes { c4 } % reset default duration
+
% music = "\melodic\relative c"
%build
./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --disable-optimise --enable-shared
make all
-make -C Documentation info || true
+ln -s /usr/share/texmf/fonts/tfm/public/cm/ tfm
+
+# make -C Documentation info || true
make htmldoc || true
+
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
/usr/share/locale/*/LC_MESSAGES/lilypond.mo
/etc/profile.d/lilypond.*
-
%post
touch /tmp/.lilypond-install
Begin3
Titel: LilyPond
-Versie: 1.1.25
-Inschrijf datum: 26JAN99
+Versie: 1.1.26
+Inschrijf datum: 01FEB99
Beschrijving: @FLAPTEKST@
Trefwoorden: muziek typezetten midi notatie
Auteur: hanwen@stack.nl (Han-Wen Nienhuys)
janneke@gnu.org (Jan Nieuwenhuizen)
Onderhouden door: hanwen@cs.ruu.nl (Han-Wen Nienhuys)
Voornaamste plek: sunsite.unc.edu /pub/Linux/apps
- 770k lilypond-1.1.25.tar.gz
+ 770k lilypond-1.1.26.tar.gz
Oorspronkelijke plek: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.25.tar.gz
+ 770k lilypond-1.1.26.tar.gz
Copi-eer voorwaarden: GPL
End
Begin3
Title: LilyPond
-Version: 1.1.25
-Entered-date: 26JAN99
+Version: 1.1.26
+Entered-date: 01FEB99
Description:
LilyPond is the GNU Project music typesetter. This program can print
beautiful sheet music from a music definition file. It can also play
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 770k lilypond-1.1.25.tar.gz
+ 770k lilypond-1.1.26.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 770k lilypond-1.1.25.tar.gz
+ 770k lilypond-1.1.26.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.1.25
+Version: 1.1.26
Release: 1
Copyright: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.25.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.1.26.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
Packager: Han-Wen Nienhuys <hanwen@cs.uu.nl>
%build
./configure --disable-checking --disable-debugging --enable-printing --prefix=/usr --disable-optimise --enable-shared
make all
-make -C Documentation info || true
+ln -s /usr/share/texmf/fonts/tfm/public/cm/ tfm
+
+# make -C Documentation info || true
make htmldoc || true
+
%install
rm -rf $RPM_BUILD_ROOT
mkdir -p $RPM_BUILD_ROOT/tmp/lilypond-rpm-doc
/usr/share/locale/*/LC_MESSAGES/lilypond.mo
/etc/profile.d/lilypond.*
-
%post
touch /tmp/.lilypond-install
$(MAKE) CONFIGSUFFIX='www' -C mutopia WWW
tar --exclude='*.dvi' --exclude='*.tex' --exclude='*.ps' -czf $(outdir)/examples.tar.gz `find input mutopia -type d -name 'out-www' -print`
+CMR10DIR=$(dir $(shell kpsewhich cmr10.tfm))#ugh! Need kpsewhich
+TEX_TFMDIR=$(CMR10DIR)
+localinstall:
+ mkdir -p $(datadir)
+ ln -s $(TEX_TFMDIR) $(datadir)/tfm
- design macro for penstroke with rounded endings
+ - timesig C: fat yet less curved. Check out relations.
- design decent macro for bulbed endings
- printer dependencies.
- y-refpoint for rests should be the 4th staffline (gclef: b')
% input feta-schrift;
% input feta-schrift;
% input feta-haak;
-% input feta-timesig;
+ input feta-timesig;
fi
def set_C_width =
save left_width, right_width;
- left_width# := .8 interline#;
+ left_width# := 0.9 interline#;
right_width# := .7 interline#;
define_pixels(left_width,right_width);
enddef;
def draw_C =
- save hair, bulb_rad;
+ save hair, bulb_rad, left_fatness;
+
+
hair# := stafflinethickness#;
- bulb_rad# := interline# / 3;
+ bulb_rad# := 0.4 interline#;
define_pixels(hair, bulb_rad);
-
- x1r = x5;
- y1r = .4 interline;
+ left_fatness = 0.55;
+
+ x1r = x5r;
+ y1r = .45 interline;
z2 = (0, interline);
z3r = (-left_width, 0);
z4 = (0, -interline);
- z5r = (right_width, -2 stafflinethickness);
+ z5r = (right_width - stafflinethickness, -0.4 interline);
penpos1(hair, 0);
penpos2(stafflinethickness, 90);
- penpos3(4 stafflinethickness, 180);
+ penpos3(left_fatness * interline, 180);
penpos4(stafflinethickness, -90);
penpos5(hair, -5);
1.4 interline#, 1.4 interline#);
draw_C;
- draw_block((-1.5stafflinethickness, -d), (0, h));
+ save excentricity;
+ pair excentricity;
+ excentricity = (-1.25 stafflinethickness, 0);
+
+ draw_block((- .75 stafflinethickness, -d) + excentricity, (.75 stafflinethickness , h) + excentricity);
fet_endchar;
path threequartercircle;
;;
(defconst mudela-font-lock-keywords
- (let* ((keywords '(
+ (let* ((keywords '("alternative" "repeat"
"accepts" "accidentals" "break" "bar" "cadenza"
- "clef" "cm" "consists" "contains" "duration" "absdynamic"
- "in" "translator" "type" "lyric" "key" "maininput" "notes"
+ "clef" "cm" "consists" "contains" "duration"
+ "absdynamic" "scmfile" "lyrics"
+ "in" "translator" "type" "key" "maininput" "notes"
"musical_pitch" "time" "midi" "mm" "header"
"notenames" "octave" "output" "partial" "paper" "plet" "name"
"property" "pt" "shape" "relative" "include" "score"
# do Coriolan if you have plenty RAM / CPU
#examples=coriolan oboi-part viola-part
-# examples= oboi-part viola-part
+
+examples= coriolan oboi-part viola-part
LOCALSTEPMAKE_TEMPLATES=mutopia
EXTRA_DIST_FILES=
-examples=
+examples=scsii-cello
LOCALSTEPMAKE_TEMPLATES=mutopia
include $(depth)/make/stepmake.make
\def\dynp{{\dyn\dynnp}}
\def\dynpp{{\dyn\kdynp\dynnp}}
\def\dynppp{{\dyn\kdynp\kdynp\dynnp}}
+\def\dynpppp{{\dyn\kdynp\kdynp\kdynp\dynnp}}
+\def\dynppppp{{\dyn\kdynp\kdynp\kdynp\kdynp\dynnp}}
+\def\dynpppppp{{\dyn\kdynp\kdynp\kdynp\kdynp\kdynp\dynnp}}
\def\dynmp{{\dyn\dynmm\kern -0.07em\dynnp}}
\def\dynmf{{\dyn\dynm\kern -0.14em\dynnf}}
\def\dynf{{\dyn\dynaf}}
\def\dynff{{\dyn\kdynf\dynnf}}
\def\dynfff{{\dyn\kdynf\kdynf\dynnf}}
+\def\dynffff{{\dyn\kdynf\kdynf\kdynf\dynnf}}
+\def\dynfffff{{\dyn\kdynf\kdynf\kdynf\kdynf\dynnf}}
+\def\dynffffff{{\dyn\kdynf\kdynf\kdynf\kdynf\kdynf\dynnf}}
\def\dynfp{{\dyn\dynnf\kern -0.04em\dynnp}}
+\def\dynsp{{\dyn\dyns\kern -0.13em\dynnp}}
+\def\dynspp{{\dyn\dyns\kern -0.13em\kdynp\dynnp}}
\def\dynsf{{\dyn\dyns\kern -0.13em\dynnf}}
+\def\dynsff{{\dyn\dyns\kern -0.13em\kdynf\dynnf}}
\def\dynsfz{{\dyn\dynsf\dynz}}
\def\dynfz{{\dyn\dynnf\dynz}}
\def\dynrf{{\dyn\dynr\kern -0.1em\dynnf}}
+\def\dynfz{{\dyn\dynr\kern -0.1em\dynnf\dynz}}
\endinput