* Roy R. Rankin <Roy.Rankin@alcatel.com.au>, major extension,
fixes to abc2ly, lilypond bug fixes
+ * Juergen Reuter <reuterj@ira.uka.de> Custos support.
+
* Jeffrey B. Reed <daboys@austin.rr.com>, Windows-NT support.
* Shay Rojanski Some mudela source.
-1.3.99.jcn2
-===========
-* Font initialisation and markup translation fixes.
+1.3.101
+=======
-1.3.99.hwn2
-===========
+* Custodes (patch by Juergen Reuter), mods by hwn.
+
+* Font initialisation and markup translation fixes. (99.jcn2)
+
+* Remove staffspace calls. Removed markScriptPadding. Fixes some
+problems with tuplet, brace and volta spanners.
+
+* make Font_interface::font_alist_chain (), and use default font
+settings. Fixes too large time sigs.
+
+1.3.100
+=======
* Tweaks of .scm font-selection.
* Made several font size and initialisation fixes.
-1.3.98.jcn2
-===========
-
* Renamed all occurrences of font-size to font-relative-size
* Renamed all occurrences of font-point to font-point-size
met through music.
- Those deserving special mentioning (in no particular order): Esther,
-Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn, Maartje, Suzanne,
-Ilse (gee, again?), Irene and last (but certainly not least) Janneke!
+ Those deserving special mentioning (in no particular order):
+Esther, Marijke, Heike, Inge, Judith, Hannah, Auke, Ilse, Evelyn,
+Maartje, Suzanne, Ilse (gee, again?), Marieke, Irene and last (but
+certainly not least) Janneke!
HWN
Of course, our other friends in the `Eindhovens Jongeren Ensemble'
-cannot go unmentioned either.
-
+(http://www.dse.nl/eje/ ) cannot go unmentioned either.
--- * ---
minor bug fixes, lyric-phrasing.
@item @email{Roy.Rankin@@alcatel.com.au, Roy R. Rankin},
major extension, fixes to abc2ly, lilypond bug fixes
+@item @email{reuterj@@ira.uka.de, Juergen Reuter}
+ Custos support.
@item @email{daboys@@austin.rr.com, Jeffrey B. Reed},
Windows-NT support.
-
@item Shay Rojanski
Some mudela source.
@item @email{august@@infran.ru, August S.Sigov}
@uref{http://www.geocities.com/Vienna/Studio/1714/scarlattidwn.html,sonatas
by Scarlatti}. Jeff Covey, guitar player and overall nice guy, is
putting @uref{http://www4.smart.net/~jcovey/scores/,guitar music} on the
-net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is a
-large archive of public domain sheet music under construction. Dirk
-Lattermann also put some works
-@uref{http://www.alqualonde.de/lilypond.html,on the web}.
+net. The @uref{http://sca.uwaterloo.ca/Mutopia/,Mutopia project} is an
+archive of public domain sheet music under construction. Dirk Lattermann
+also put some works @uref{http://www.alqualonde.de/lilypond.html,on the
+web}.
@html
<a name="download-source">
@unnumberedsec Mailing lists
If you have questions, do write to the mailing lists!
- (But don't forget to read the @uref{Documentation/out-www/faq.html,
+ (But don't forget to read the
+@uref{http://appel.dyndns.org/wiki?LilyPondFaqs,
Frequently Asked Questions} first.)
- Improved robustness: Lily almost never crashes.
-* Rewritten font selection, Latex-NFSS like
+* New font selection scheme similar to Latex-NFSS.
-* Piano pedal support, Arpeggios
+* Piano pedal support, Arpeggios, Custodes
* MIDI: dynamics, tempo changes
PACKAGE_NAME=LilyPond
MAJOR_VERSION=1
MINOR_VERSION=3
-PATCH_LEVEL=100
-MY_PATCH_LEVEL=jcn1
+PATCH_LEVEL=101
+MY_PATCH_LEVEL=
# use the above to send patches: MY_PATCH_LEVEL is always empty for a
# released version.
\paper{
%my standard paper block
- 0=\font "feta19"
- -1=\font "feta16"
+
+ % figure out a way to do this cleanly.
+
+% 0=\font "feta19"
+% -1=\font "feta16"
+% \stylesheet #(make-style-sheet 'paper19)
+
arithmetic_multiplier=7.\pt;
indent=0.;
linewidth=188.\mm;
minVerticalAlign=8.4;
}
\translator{\StaffContext
- timeSignatureStyle="C";}
+ TimeSignature \push #'style = #"C"
+ }
\translator{\VoiceContext
noStemExtend = ##t
tupletVisibility = ##f
--- /dev/null
+
+\score { \notes { c'1 \break < d'1 f' a'> }
+\paper {\translator { \StaffContext
+\consists Custos_engraver;
+}}
+
+}
\property Score.midiInstrument = "church organ"
\praeludiumRight
- r1 \mark "B";
+ \times 4/3 { c4 c4 c4 } \mark "B";
\fugaIIRight }
\context Staff = bass {
\property Staff.instrument = #"left"
SCM thr = me->get_elt_property ("threshold");
if (gh_pair_p (thr))
{
- Real ss = me->paper_l ()-> get_var ("staffspace");
+ Real ss = 1.0;
threshold[SMALLER] = ss *gh_scm2double (gh_car (thr));
threshold[BIGGER] = ss * gh_scm2double (gh_cdr (thr));
}
ugh.
*/
Real extra_space = gh_scm2double(grsp);
- SCM e = gh_cons (gh_double2scm (-extra_space * paper_l ()->get_var ("staffspace")),
+ SCM e = gh_cons (gh_double2scm (-extra_space),
gh_double2scm (0.0));
now_column_l_->set_elt_property ("extra-space", e);
}
{
SCM sname = ly_symbol2scm (name.ch_C ());
- SCM name_str = gh_str02scm (name.ch_C ());
+ SCM name_str = ly_str02scm (name.ch_C ());
SCM val;
All_font_metrics::find_tfm (String name)
{
SCM sname = ly_symbol2scm (name.ch_C ());
- SCM name_str = gh_str02scm (name.ch_C ());
+ SCM name_str = ly_str02scm (name.ch_C ());
SCM val;
if (!tfm_p_dict_->try_retrieve (sname, &val))
#include "item.hh"
#include "engraver.hh"
-/**
+/*
generate bars. Either user ("|:"), or default (new measure)
+
+ TODO
+
+ - document this
+
+ - document how barlines and line breaks interact.
*/
class Bar_engraver : public Engraver
{
/*
steep slope running against lengthened stem is suspect
*/
- Real ss = me->paper_l ()->get_var ("staffspace");
Real first_ideal = Stem::calc_stem_info (first_visible_stem (me)).idealy_f_;
Real last_ideal = Stem::calc_stem_info (last_visible_stem (me)).idealy_f_;
- Real lengthened = gh_scm2double (me->get_elt_property ("outer-stem-length-limit")) * ss;
+ Real lengthened = gh_scm2double (me->get_elt_property ("outer-stem-length-limit"));
Real steep = gh_scm2double (me->get_elt_property ("slope-limit"));
// ugh -> use commonx
int beam_multiplicity = get_multiplicity (me);
int stem_multiplicity = (Stem::flag_i (s) - 2) >? 0;
- Real staffspace = me->paper_l ()->get_var ("staffspace");
-
SCM space_proc = me->get_elt_property ("space-function");
SCM space = gh_call1 (space_proc, gh_int2scm (beam_multiplicity));
- Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace;
- Real interbeam_f = gh_scm2double (space) * staffspace;
+ Real thick = gh_scm2double (me->get_elt_property ("thickness")) ;
+ Real interbeam_f = gh_scm2double (space) ;
// ugh -> use commonx
Real x0 = first_visible_stem (me)->relative_coordinate (0, X_AXIS);
SCM proc = me->get_elt_property ("height-quants");
SCM quants = gh_call2 (proc, me->self_scm (),
gh_double2scm (me->paper_l ()->get_var ("stafflinethickness")
- / me->paper_l ()->get_var ("staffspace")));
+ / 1.0));
for (SCM s = quants; gh_pair_p (s); s = gh_cdr (s))
Real staffline_f = me->paper_l ()->get_var ("stafflinethickness");
int multiplicity = get_multiplicity (me);
- Real staffspace =me->paper_l ()->get_var ("staffspace");
SCM space_proc = me->get_elt_property ("space-function");
SCM space = gh_call1 (space_proc, gh_int2scm (multiplicity));
- Real thick = gh_scm2double (me->get_elt_property ("thickness")) *staffspace;
- Real interbeam_f = gh_scm2double (space) * staffspace;
+ Real thick = gh_scm2double (me->get_elt_property ("thickness")) ;
+ Real interbeam_f = gh_scm2double (space) ;
Real bdy = interbeam_f;
Real stemdx = staffline_f;
SCM proc = me->get_elt_property ("flag-width-function");
SCM result = gh_call1 (proc, gh_int2scm (t));
- nw_f = gh_scm2double (result) * staffspace;
+ nw_f = gh_scm2double (result);
}
Item * item = dynamic_cast<Item*> (me);
Item *column = item->column_l ();
- Real interline= me->paper_l ()->get_var ("staffspace");
Link_array<Score_element> elems;
Link_array<Score_element> all_elems
= Pointer_group_interface__extract_elements (me, (Score_element*)0,
SCM symbol = gh_car (extra_space);
Real spc = gh_scm2double (gh_cadr(extra_space));
- spc *= interline;
dists.push(spc);
symbol_list = gh_cons (symbol, symbol_list);
SCM func = me->get_elt_property (ly_symbol2scm ("chord-name-function"));
SCM text = gh_call3 (func, style, pitches, gh_cons (inversion, bass));
- SCM properties = gh_list (me->mutable_property_alist_, me->immutable_property_alist_, SCM_UNDEFINED);
+ SCM properties = Font_interface::font_alist_chain (me);
Molecule mol = Text_item::text2molecule (me, text, properties);
SCM space = me->get_elt_property ("word-space");
/*
-
clef-engraver.cc -- implement Clef_engraver
source file of the GNU LilyPond music typesetter
#include "direction.hh"
#include "side-position-interface.hh"
#include "item.hh"
+#include "custos.hh"
/// where is c-0 in the staff?
class Clef_engraver : public Engraver
bool set_type (String);
};
-
Clef_engraver::Clef_engraver ()
{
first_b_ = true;
SCM glyph = gh_cadr (found);
SCM pos = gh_caddr (found);
- daddy_trans_l_->set_property ("glyph", glyph);
- daddy_trans_l_->set_property ("position", pos);
+ daddy_trans_l_->set_property ("clefGlyph", glyph);
+ daddy_trans_l_->set_property ("clefPosition", pos);
found = scm_assoc (glyph, p);
if (found == SCM_BOOL_F)
return false;
int c0_position = gh_scm2int (pos) + gh_scm2int (gh_cdr (found));
- daddy_trans_l_->set_property ("c0-position", gh_int2scm (c0_position));
+ daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (c0_position));
}
- int c0_position = gh_scm2int (get_property ("c0-position"));
+ int c0_position = gh_scm2int (get_property ("clefCentralCPosition"));
c0_position -= (int)octave_dir_ * 7;
- daddy_trans_l_->set_property ("c0-position", gh_int2scm (c0_position));
+ daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (c0_position));
SCM basic = ly_symbol2scm ("Clef");
- SCM c0 = ly_symbol2scm ("c0-position");
SCM gl = ly_symbol2scm ("glyph");
daddy_trans_l_->execute_single_pushpop_property (basic, gl, SCM_UNDEFINED);
- daddy_trans_l_->execute_single_pushpop_property (basic, c0, SCM_UNDEFINED);
daddy_trans_l_->execute_single_pushpop_property (basic, gl,
- get_property ("glyph"));
- daddy_trans_l_->execute_single_pushpop_property (basic, c0,
- get_property ("c0_position")
- );
+ get_property ("clefGlyph"));
+
return true;
}
if (item)
{
if (Bar::has_interface (info.elem_l_)
- && gh_string_p (get_property ("glyph")))
+ && gh_string_p (get_property ("clefGlyph")))
create_clef ();
if (Note_head::has_interface (item)
- || Local_key_item::has_interface (item))
+ || Local_key_item::has_interface (item)
+ || Custos::has_interface (item)
+ )
{
int p = int (Staff_symbol_referencer::position_f (item))
- + gh_scm2int (get_property ("c0-position"));
+ + gh_scm2int (get_property ("clefCentralCPosition"));
Staff_symbol_referencer::set_position (item, p);
}
else if (Key_item::has_interface (item))
{
- item->set_elt_property ("c0-position", get_property ("c0-position"));
+ /*
+ Key_item adapts its formatting to make sure that the
+ accidentals stay in the upper half of the staff. It needs
+ to know c0-pos for this. (?)
+ */
+
+ item->set_elt_property ("c0-position", get_property ("clefCentralCPosition"));
}
}
}
void
Clef_engraver::do_creation_processing ()
{
- daddy_trans_l_->set_property ("position", gh_int2scm (0));
- daddy_trans_l_->set_property ("glyph", SCM_EOL);
- daddy_trans_l_->set_property ("c0-position", gh_int2scm (0));
+ daddy_trans_l_->set_property ("clefPosition", gh_int2scm (0));
+ daddy_trans_l_->set_property ("clefGlyph", SCM_EOL);
+ daddy_trans_l_->set_property ("clefCentralCPosition", gh_int2scm (0));
SCM def = get_property ("defaultClef");
if (gh_string_p (def))
clef_p_ = c;
}
Staff_symbol_referencer::set_position (clef_p_,
- gh_scm2int (get_property ("position")
+ gh_scm2int (get_property ("clefPosition")
));
if (octave_dir_)
{
Link_array<Score_element> done;
Real wid
- = gh_scm2double (me->get_elt_property ("note-width"))
- * me->paper_l ()->get_var ("staffspace");
+ = gh_scm2double (me->get_elt_property ("note-width"));
for (; gh_pair_p (hand); hand =gh_cdr (hand))
{
{
Score_element *me= unsmob_element (smob);
Spanner *span = dynamic_cast<Spanner*>(me);
- Real staff_space = me->paper_l ()->get_var ("staffspace");
+
Real line = me->paper_l ()->get_var ("stafflinethickness");
Real broken_left = span->get_broken_left_end_align ();
while (flip (&d) != LEFT);
bool continued = broken[Direction (-grow_dir)];
- Real height = staff_space * gh_scm2double (me->get_elt_property ("height"));
+ Real height = gh_scm2double (me->get_elt_property ("height"));
Real thick = line * gh_scm2double (me->get_elt_property ("thickness"));
const char* type = (grow_dir < 0) ? "decrescendo" : "crescendo";
- interstaff = item->paper_l ()->get_var ("staffspace");
+ interstaff = 1.0;
if (gh_pair_p (threshold))
interstaff = gh_scm2double (gh_car (threshold)) * interstaff;
--- /dev/null
+/*
+ custos-engraver.cc -- implement Custos_engraver
+
+ source file of the GNU LilyPond music typesetter
+
+ (C) 2000 Juergen Reuter <reuterj@ira.uka.de>,
+
+ Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+*/
+
+#include "engraver.hh"
+#include "bar.hh"
+#include "item.hh"
+#include "note-head.hh"
+#include "staff-symbol-referencer.hh"
+#include "warn.hh"
+#include "musical-request.hh"
+
+/*
+ This class implements an engraver for custos symbols.
+*/
+class Custos_engraver : public Engraver
+{
+public:
+ Custos_engraver();
+ virtual void do_post_move_processing();
+ virtual void acknowledge_element(Score_element_info);
+ virtual void do_process_music ();
+ virtual void process_acknowledged ();
+ virtual void do_pre_move_processing ();
+ virtual void do_removal_processing ();
+ VIRTUAL_COPY_CONS(Translator);
+
+private:
+ Item * create_custos();
+ bool custos_permitted;
+ Link_array<Score_element> custos_arr_;
+ Array<Musical_pitch> pitches_;
+};
+
+Custos_engraver::Custos_engraver ()
+{
+ custos_permitted = false;
+}
+
+
+void
+Custos_engraver::do_pre_move_processing()
+{
+ /*
+ delay typeset until we're at the next moment, so we can silence custodes at the end of the piece.
+ */
+}
+
+void
+Custos_engraver::do_post_move_processing ()
+{
+ for (int i = custos_arr_.size (); i--;)
+ {
+ typeset_element (custos_arr_[i]);
+ }
+ custos_arr_.clear ();
+ pitches_.clear ();
+
+ custos_permitted = false;
+}
+
+
+/*
+ TODO check if this works with forced bar lines?
+ */
+void
+Custos_engraver::do_process_music ()
+{
+ if (gh_string_p (get_property( "whichBar")))
+ custos_permitted = true;
+}
+
+void
+Custos_engraver::acknowledge_element (Score_element_info info)
+{
+ Item *item = dynamic_cast <Item *>(info.elem_l_);
+ if (item)
+ {
+ if (Bar::has_interface (info.elem_l_))
+ custos_permitted = true;
+ else if (Note_head::has_interface (info.elem_l_))
+ {
+
+ /*
+ ideally, we'd do custos->set_parent (Y_AXIS, notehead),
+ but since the note head lives on the other system, we can't
+
+ So we copy the position from the note head pitch. We
+ don't look at the staff-position, since we can't be sure
+ whether Clef_engraver already applied a vertical shift.
+ */
+
+ pitches_.push (dynamic_cast<Note_req*> (info.req_l_)->pitch_);
+ }
+ }
+}
+
+void
+Custos_engraver::process_acknowledged ()
+{
+ if (custos_permitted)
+ {
+ for (int i = pitches_.size (); i--;)
+ {
+ Item *c = create_custos ();
+
+ c->set_elt_property ("staff-position",
+ gh_int2scm (pitches_[i].steps ()));
+
+ }
+
+ pitches_.clear ();
+ }
+}
+
+Item*
+Custos_engraver::create_custos()
+{
+ SCM basicProperties = get_property ("Custos");
+ Item* custos = new Item (basicProperties);
+
+ announce_element (custos, 0);
+ custos_arr_.push (custos);
+
+ return custos;
+}
+
+void
+Custos_engraver::do_removal_processing ()
+{
+ for (int i = custos_arr_.size (); i--;)
+ {
+ custos_arr_[i]->suicide ();
+ typeset_element (custos_arr_[i]);
+ }
+ custos_arr_.clear ();
+}
+
+ADD_THIS_TRANSLATOR (Custos_engraver);
+
--- /dev/null
+/*
+ custos.cc -- implement Custos
+
+ source file of the GNU LilyPond music typesetter
+
+ (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
+*/
+
+/* TODO:
+
+ - merge create_ledger_line () and Note_head::create_ledger_line()
+
+
+ - rewrite create_ledger_line() to support short and thin ledger lines
+
+ - do not show if a clef change immediately follows in the next line
+
+ - make custos direction control configurable
+
+ - decide: do or do not print custos if the next line starts with a rest
+
+*/
+
+
+#include <stdio.h>
+#include "staff-symbol-referencer.hh"
+#include "custos.hh"
+#include "molecule.hh"
+#include "lookup.hh"
+#include "debug.hh"
+#include "note-head.hh"
+#include "item.hh"
+#include "font-interface.hh"
+
+/*
+ This function is a patched and hopefully much more understandable
+ rewrite of Note_head::ledger_line(). It still has some
+ bugs/limitations:
+ *
+ (1) The term thick/2 probably should be thick*2 (probably a bug,
+ see the code below).
+ *
+ (2) The minimal width of the resulting ledger line equals the width
+ of the noteheads-ledgerending symbol (a limitation):
+ *
+ (---- left ledger ending
+ ----) right ledger ending
+ (---) resulting ledger line (just ok)
+ *
+ If x_extent ("xwid" in Note_head) is less than the width of the
+ ledger ending, the width of the total ledger line is even *greater*
+ than the width of a ledger ending (I would call this a bug). In
+ the below code, the condition "if (x_extent.length() >
+ slice_x_extent.length())" avoids outputting the left ending in such
+ cases (rather a silly workaround, but better than nothing).
+ *
+ (---- left ledger ending
+ ----) right ledger ending
+ (-) desired ledger line
+ ------- resulting ledger line (too long)
+ ----) resulting ledger line with additional "if" (still too long)
+ *
+ The algorithm works properly only for a desired ledger line width
+ greater than the width of the ledger ending:
+ *
+ (---- left ledger ending
+ ----) right ledger ending
+ (------) desired ledger line
+ (------) resulting ledger line (ok)
+ *
+ * (3) The thickness of the ledger line is fixed (limitation).
+ */
+Molecule create_ledger_line (Interval x_extent, Score_element *me)
+{
+ Molecule line;
+ Molecule slice = Font_interface::get_default_font (me)->find_by_name ("noteheads-ledgerending");
+ Interval slice_x_extent = slice.extent(X_AXIS);
+ Interval slice_y_extent = slice.extent(Y_AXIS);
+
+ // Create left ending of ledger line.
+ Molecule left_ending = slice;
+ left_ending.translate_axis (x_extent[LEFT] - slice_x_extent[LEFT], X_AXIS);
+ if (x_extent.length() > slice_x_extent.length())
+ line.add_molecule (left_ending);
+
+ // Create right ending of ledger line.
+ Molecule right_ending = slice;
+ right_ending.translate_axis (x_extent[RIGHT] - slice_x_extent[RIGHT],
+ X_AXIS);
+ line.add_molecule (right_ending);
+
+ // Fill out space between left and right ending of ledger line by
+ // lining up a series of slices in a row between them.
+ Molecule fill_out_slice = left_ending;
+ Real thick = slice_y_extent.length();
+ Real delta_x = slice_x_extent.length () - thick;
+ Real xpos = x_extent [LEFT] + 2*delta_x + thick/2; // TODO: check: thick*2?
+ while (xpos <= x_extent[RIGHT])
+ {
+ fill_out_slice.translate_axis (delta_x, X_AXIS);
+ line.add_molecule (fill_out_slice);
+ xpos += delta_x;
+ }
+
+ return line;
+}
+
+void add_streepjes(Score_element* me,
+ int pos,
+ int interspaces,
+ Molecule* custos_p_)
+{
+ // TODO: This is (almost) duplicated code (see
+ // Note_head::brew_molecule). Junk me.
+ Real inter_f = Staff_symbol_referencer::staff_space (me)/2;
+ int streepjes_i = abs (pos) < interspaces
+ ? 0
+ : (abs(pos) - interspaces) /2;
+ if (streepjes_i)
+ {
+ Direction dir = (Direction)sign (pos);
+ Molecule ledger_line (create_ledger_line (custos_p_->extent (X_AXIS),
+ me));
+ ledger_line.set_empty (true);
+ Real offs = (Staff_symbol_referencer::on_staffline (me))
+ ? 0.0
+ : -dir * inter_f;
+ for (int i = 0; i < streepjes_i; i++)
+ {
+ Molecule streep (ledger_line);
+ streep.translate_axis (-dir * inter_f * i * 2 + offs,
+ Y_AXIS);
+ custos_p_->add_molecule (streep);
+ }
+ }
+}
+
+MAKE_SCHEME_CALLBACK(Custos,brew_molecule,1);
+SCM
+Custos::brew_molecule (SCM smob)
+{
+ Item *me = (Item *)unsmob_element (smob);
+ SCM scm_style = me->get_elt_property ("style");
+
+ if (gh_string_p (scm_style))
+ {
+ String style = ly_scm2string (scm_style);
+
+ String idx = "custodes-";
+ int interspaces = Staff_symbol_referencer::line_count (me)-1;
+
+ Real pos = Staff_symbol_referencer::position_f (me);
+
+ if (pos > (interspaces/2 + 1)) // TODO: make this rule configurable
+ idx += "r";
+ idx += style;
+ Molecule molecule
+ = Font_interface::get_default_font (me)->find_by_name (idx);
+ if (molecule.empty_b())
+ {
+ String message = "unknown custos style: `" + style + "'";
+ warning(_ (message.ch_C()));
+ return SCM_EOL;
+ }
+ else
+ {
+ add_streepjes(me, (int)pos, interspaces, &molecule);
+ SCM result = molecule.create_scheme();
+ return result;
+ }
+ }
+ else
+ return SCM_EOL;
+}
+
+bool
+Custos::has_interface (Score_element*m)
+{
+ return m && m->has_interface (ly_symbol2scm ("custos-interface"));
+}
#include "score-element.hh"
#include "paper-def.hh"
+
+SCM
+Font_interface::font_alist_chain (Score_element *me)
+{
+ SCM defaults = gh_cdr (scm_assoc (ly_symbol2scm ("font-defaults"),
+ me->paper_l ()->style_sheet_ ));
+
+ SCM ch = gh_list (me->mutable_property_alist_,
+ me->immutable_property_alist_,
+ defaults,
+ SCM_UNDEFINED);
+
+ return ch;
+}
+
/*
- todO : split up this func, reuse in text_item?
+ todo: split up this func, reuse in text_item?
*/
Font_metric *
Font_interface::get_default_font (Score_element*me)
ss));
assert (gh_procedure_p (proc));
- SCM font_name = gh_call2 (proc, fonts,
- gh_list (me->mutable_property_alist_,
- me->immutable_property_alist_,
- defaults,
- SCM_UNDEFINED));
+ SCM font_name = gh_call2 (proc, fonts, font_alist_chain (me));
fm = me->paper_l ()->find_font (font_name, 1.0);
me->set_elt_property ("font", fm->self_scm ());
Molecule
Font_metric::find_by_name (String) const
{
- assert (false);
+ Molecule m ;
+ return m;
}
}
while (flip (&d) != LEFT);
- Real ss = sp->paper_l ()->get_var ("staffspace");
Real lt = sp->paper_l ()->get_var ("stafflinethickness");
Real th = gh_scm2double (sp->get_elt_property ("thickness")) * lt ;
- Real h = gh_scm2double (sp->get_elt_property ("height")) * ss;
- Real l = gh_scm2double (sp->get_elt_property ("minimum-length")) * ss;
+ Real h = gh_scm2double (sp->get_elt_property ("height"));
+ Real l = gh_scm2double (sp->get_elt_property ("minimum-length"));
// The hyphen can exist in the word space of the left lyric ...
SCM space = sp->get_bound (LEFT)->get_elt_property ("word-space");
if (gh_number_p (space))
{
- bounds[LEFT] -= gh_scm2double (space)*ss;
+ bounds[LEFT] -= gh_scm2double (space);
}
Real w = bounds.length ();
/* for length, use a geometric mean of the available space and some minimum
--- /dev/null
+/*
+ custos.hh
+
+ source file of the GNU LilyPond music typesetter
+
+ (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
+*/
+
+#ifndef CUSTOS_HH
+#define CUSTOS_HH
+
+#include "lily-guile.hh"
+
+struct Custos
+{
+ DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM ));
+ static bool has_interface (Score_element*);
+};
+
+#endif // CUSTOS_HH
+
struct Font_interface
{
+ static SCM font_alist_chain (Score_element*);
static Font_metric * get_default_font (Score_element*);
};
gh_double2scm (height),
SCM_UNDEFINED));
- Real il = paper_l ()->get_var ("staffspace");
-
/*
all elements.
*/
SCM e = sc->get_elt_property ("extra-offset");
if (gh_pair_p (e))
{
- o[X_AXIS] += il * gh_scm2double (gh_car (e));
- o[Y_AXIS] += il * gh_scm2double (gh_cdr (e));
+ o[X_AXIS] += gh_scm2double (gh_car (e));
+ o[Y_AXIS] += gh_scm2double (gh_cdr (e));
}
output_molecule (m.get_expr (), o);
(UGH UGH, pulled amount of space out of thin air)
*/
- text_p_->translate_axis (paper_l()->get_var ("staffspace")*0.66, X_AXIS);
+ text_p_->translate_axis (0.66, X_AXIS);
announce_element (text_p_, req_l_);
}
// ugh: refp
Real leftext = sp->get_bound (LEFT)->extent (sp->get_bound (LEFT),
X_AXIS).length ();
- Real ss = sp->paper_l ()->get_var ("staffspace");
+ Real ss = 1.0;
Real sl = sp->paper_l ()->get_var ("stafflinethickness");
- Real righttrim = 0.5; // default to half a staffspace gap on the right
+ Real righttrim = 0.5; // default to half a space gap on the right
SCM righttrim_scm = sp->get_elt_property("right-trim-amount");
if (gh_number_p (righttrim_scm)) {
righttrim = gh_scm2double (righttrim_scm);
prop = gh_int2scm (UP);
}
text_p_->set_elt_property ("direction", prop);
-
- SCM padding = get_property ("markScriptPadding");
- if (gh_number_p(padding))
- {
- text_p_->set_elt_property ("padding", padding);
- }
- else
- {
- text_p_
- ->set_elt_property ("padding",
- gh_double2scm(paper_l ()->get_var ("staffspace")));
- }
-
announce_element (text_p_, rq);
}
if (measures > 1)
{
- SCM properties = gh_list (me->mutable_property_alist_,
- me->immutable_property_alist_,
- SCM_UNDEFINED);
- Molecule s =
- Text_item::text2molecule (me,
- ly_str02scm (to_str (measures).ch_C ()),
- properties);
+ SCM properties = Font_interface::font_alist_chain (me);
+ Molecule s = Text_item::text2molecule (me,
+ ly_str02scm (to_str (measures).ch_C ()),
+ properties);
s.align_to (X_AXIS, CENTER);
s.translate_axis (3.0 * staff_space, Y_AXIS);
mol.add_molecule (s);
return SCM_UNSPECIFIED;
// staff ref'd?
- Real staff_space = me->paper_l()->get_var ("staffspace");
+ Real staff_space = 1.0;
/* FIXME
staff_space = rcol->rests[0]->staff_space ();
{
Real l = gh_scm2double (gh_car (ext));
Real r = gh_scm2double (gh_cdr (ext));
- l *= s->paper_l ()->get_var ("staffspace");
- r *= s->paper_l ()->get_var ("staffspace");
return ly_interval2scm (Interval (l, r));
}
/*
signs ?
*/
- Real s = paper_l ()->get_var ("staffspace");
if (gh_pair_p (extra))
{
- ext[BIGGER] += s * gh_scm2double (gh_cdr (extra));
- ext[SMALLER] += s * gh_scm2double (gh_car (extra));
+ ext[BIGGER] += gh_scm2double (gh_cdr (extra));
+ ext[SMALLER] += gh_scm2double (gh_car (extra));
}
extra = get_elt_property (a == X_AXIS
: "minimum-extent-Y");
if (gh_pair_p (extra))
{
- ext.unite (Interval (s * gh_scm2double (gh_car (extra)),
- s * gh_scm2double (gh_cdr (extra))));
+ ext.unite (Interval (gh_scm2double (gh_car (extra)),
+ gh_scm2double (gh_cdr (extra))));
}
ext.translate (x);
}
else if (key == ly_symbol2scm ("accordion"))
{
- return Lookup::accordion (gh_cdr (s), me->paper_l()->get_var("staffspace"), Font_interface::get_default_font (me));
+ return Lookup::accordion (gh_cdr (s), 1.0, Font_interface::get_default_font (me));
}
else
assert (false);
leave a gap: slur mustn't touch head/stem
*/
o[Y_AXIS] += dir * gh_scm2double (me->get_elt_property ("y-free")) *
- me->paper_l ()->get_var ("staffspace");
+ 1.0;
return o;
}
r.item_l_drul_[RIGHT] = sp->get_bound (RIGHT);
r.distance_f_ =
gh_scm2double (me->get_elt_property ("minimum-length"))
- * me->paper_l ()->get_var ("staffspace");
+ * 1.0;
r.add_to_cols ();
return SCM_UNSPECIFIED;
Real k = gh_scm2double (me->get_elt_property ("arithmetic-basicspace"))
- log;
- return (log_2 (d) + k) * gh_scm2double (me->get_elt_property ("arithmetic-multiplier")) * me->paper_l ()->get_var ("staffspace");
+ return (log_2 (d) + k) * gh_scm2double (me->get_elt_property ("arithmetic-multiplier"));
}
Real correction = 0.0;
Real ssc = gh_scm2double (me->get_elt_property("stem-spacing-correction"));
- ssc *= me->paper_l ()->get_var ("staffspace");
-
if (d1 && d2 && d1 * d2 == -1)
{
correction = d1 * ssc;
Score_element * st = staff_symbol_l (me);
if (st)
return Staff_symbol::staff_space (st);
- else if (me->pscore_l_ && me->paper_l ())
- return me->paper_l ()->get_var ("staffspace");
-
- return 0.0;
+
+
+ return 1.0;
}
Real
Staff_symbol::staff_space (Score_element*me )
{
- Real ss = me->paper_l ()->get_var ("staffspace");
+ Real ss = 1.0;
SCM s = me->get_elt_property ("staff-space");
if (gh_number_p (s))
// extender->set_elt_property("right-trim-amount", gh_double2scm(0.0));
// Right:
- Real ss = extender->paper_l ()->get_var ("staffspace");
+ Real ss = 1.0;
extender->set_elt_property("right-trim-amount",
gh_double2scm(-notehead_l_->extent(notehead_l_, X_AXIS).length()/ss));
}
*/
if (gh_symbol_p (gl) && gl == ly_symbol2scm ("brace")
&& gh_symbol_p (my_gl) && my_gl == ly_symbol2scm ("bracket"))
- inf.elem_l_->translate_axis ( -paper_l ()->get_var ("staffspace"), X_AXIS); // ugh
+ inf.elem_l_->translate_axis ( -1.0, X_AXIS); // ugh
}
}
System_start_delimiter::staff_bracket (Score_element*me,Real height)
{
Paper_def* p= me->paper_l ();
- SCM scmss = p->get_scmvar ("staffspace");
- Real ss = gh_scm2double (scmss);
- Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) * ss ;
+ Real arc_height = gh_scm2double (me->get_elt_property("arch-height")) ;
SCM at = gh_list (ly_symbol2scm ("bracket"),
- scm_product (me->get_elt_property ("arch-angle"), scmss),
- scm_product (me->get_elt_property ("arch-width"), scmss),
+ me->get_elt_property ("arch-angle"),
+ me->get_elt_property ("arch-width"),
gh_double2scm (arc_height),
- scm_product (me->get_elt_property ("bracket-width"),scmss),
+ me->get_elt_property ("bracket-width"),
gh_double2scm (height),
- scm_product (me->get_elt_property ("arch-thick"),scmss),
- scm_product (me->get_elt_property ("bracket-thick"),scmss),
+ me->get_elt_property ("arch-thick"),
+ me->get_elt_property ("bracket-thick"),
SCM_UNDEFINED);
Real h = height + 2 * arc_height;
- Box b (Interval (0, 1.5 * ss), Interval (-h/2, h/2));
+ Box b (Interval (0, 1.5), Interval (-h/2, h/2));
Molecule mol (b, at);
mol.align_to (X_AXIS, CENTER);
return mol;
text_style = ly_scm2string (s);
#endif
- SCM properties = gh_list (me->mutable_property_alist_,
- me->immutable_property_alist_,
- SCM_UNDEFINED);
+ SCM properties = Font_interface::font_alist_chain (me);
+
SCM edge_text = me->get_elt_property ("edge-text");
Drul_array<Molecule> edge;
if (gh_pair_p (edge_text))
r.distance_f_
= gh_scm2double (me->get_elt_property ("minimum-length"))
- * me->paper_l ()->get_var ("staffspace");
+ * 1.0;
r.add_to_cols ();
return SCM_UNSPECIFIED;
}
{
// First guess: s contains only the signature style
String symbolname = "timesig-" + s + to_str (n) + "/" + to_str (d);
+
+ /*
+ Randomly probing the font sucks?
+ */
Molecule m = Font_interface::get_default_font (me)->find_by_name (symbolname);
if (!m.empty_b())
Molecule
Time_signature::time_signature (Score_element*me,int num, int den)
{
- SCM chain = gh_list (me->mutable_property_alist_, me->immutable_property_alist_, SCM_UNDEFINED);
+ SCM chain = Font_interface::font_alist_chain (me);
Molecule n = Text_item::text2molecule (me,
ly_str02scm (to_str (num).ch_C ()),
return (daddy_trans_l_) ? daddy_trans_l_->where_defined (sym) : 0;
}
+/*
+ TODO: return SCM_EOL iso. SCM_UNDEFINED when not found.
+*/
SCM
Translator_group::get_property (SCM sym) const
{
Real ncw = column_arr.top ()->extent(column_arr.top (), X_AXIS).length ();
Real w = dynamic_cast<Spanner*>(me)->spanner_length () + ncw;
- Real staff_space = me->paper_l ()->get_var ("staffspace");
+ Real staff_space = 1.0;
Direction dir = Directional_element_interface::get (me);
Real dy = gh_scm2double (me->get_elt_property ("delta-y"));
SCM number = me->get_elt_property ("text");
if (gh_string_p (number) && number_visibility)
{
- SCM properties = gh_list ( me->mutable_property_alist_,
- me->immutable_property_alist_,
-
- SCM_UNDEFINED);
+ SCM properties = Font_interface::font_alist_chain (me);
Molecule num = Text_item::text2molecule (me, number, properties);
num.align_to (X_AXIS, CENTER);
num.translate_axis (w/2, X_AXIS);
if (bracket_visibility)
{
- SCM ss = me->paper_l ()->get_scmvar ("staffspace");
- SCM lt = me->paper_l ()->get_scmvar ("stafflinethickness");
+ Real lt = me->paper_l ()->get_var ("stafflinethickness");
SCM thick = me->get_elt_property ("thick");
SCM gap = me->get_elt_property ("number-gap");
SCM at =gh_list(ly_symbol2scm ("tuplet"),
- ss,
- scm_product (gap, ss),
+ gh_double2scm (1.0),
+ gap,
gh_double2scm (w),
gh_double2scm (dy),
- scm_product (thick, lt),
+ gh_double2scm (gh_scm2double (thick)* lt),
gh_int2scm (dir),
SCM_UNDEFINED);
no_vertical_end = false;
#endif
- Real staff_space = me->paper_l ()->get_var ("staffspace");
Real staff_thick = me->paper_l ()->get_var ("stafflinethickness");
- Real half_space = staff_space / 2;
+ Real half_space = 0.5;
/*
the volta spanner is attached to the bar-line, which is moved
*/
Real left = 0.0;
Real w = dynamic_cast<Spanner*>(me)->spanner_length () - left - half_space;
- Real h = staff_space * gh_scm2double (me->get_elt_property ("height"));
- Real t = staff_thick * gh_scm2double (me->get_elt_property ("thickness"));
+ Real h = gh_scm2double (me->get_elt_property ("height"));
+ Real t = staff_thick * gh_scm2double (me->get_elt_property ("thickness"));
/*
ugh: should build from line segments.
Molecule num = Text_item::text2molecule (me, text, properties);
mol.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length ()
- - staff_space);
+ - 1.0);
mol.translate_axis (left, X_AXIS);
return mol.create_scheme();
}
barAuto = ##t
voltaVisibility = ##t
- % name, glyph id, c0 position
+ % name, glyph id, clef position
supportedClefTypes = #'(
("treble" . ("clefs-G" -2))
("violin" . ("clefs-G" -2))
Key_item
Staff_bar
Time_signature
+ Custos
Stanza_number
)
Begin3
Title: LilyPond
-Version: 1.3.100
+Version: 1.3.101
Entered-date: 30OCT00
Description:
Keywords: music notation typesetting midi fonts engraving
janneke@gnu.org (Jan Nieuwenhuizen)
Maintained-by: hanwen@stack.nl (Han-Wen Nienhuys)
Primary-site: sunsite.unc.edu /pub/Linux/apps/sound/convert
- 1000k lilypond-1.3.100.tar.gz
+ 1000k lilypond-1.3.101.tar.gz
Original-site: ftp.cs.uu.nl /pub/GNU/LilyPond/development/
- 1000k lilypond-1.3.100.tar.gz
+ 1000k lilypond-1.3.101.tar.gz
Copying-policy: GPL
End
Name: lilypond
-Version: 1.3.100
+Version: 1.3.101
Release: 1
License: GPL
Group: Applications/Publishing
-Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.100.tar.gz
+Source0: ftp.cs.uu.nl:/pub/GNU/LilyPond/development/lilypond-1.3.101.tar.gz
Summary: A program for printing sheet music.
URL: http://www.cs.uu.nl/~hanwen/lilypond
# Icon: lilypond-icon.gif
# descent order into subdirectories:
#
-SUBDIRS = scripts buildscripts flower lily mf midi2ly po debian \
+SUBDIRS = buildscripts scripts flower lily mf midi2ly po debian \
Documentation ly input tex make mutopia intl $(builddir)/stepmake\
ps scm
#
--- /dev/null
+% -*-Fundamental-*-
+% feta-custodes.mf -- implement custos symbols
+%
+% source file of LilyPond's pretty-but-neat music font
+%
+% (C) 2000 Juergen Reuter <reuterj@ira.uka.de>
+%
+
+save black_notehead_width;
+numeric black_notehead_width;
+
+fet_begingroup("custodes");
+
+noteheight#:=staff_space#+ (1 + overdone_heads) *stafflinethickness#;
+define_pixels(noteheight);
+
+
+%%%%%%%%
+%
+% Hufnagel style
+%
+
+% stem up
+fet_beginchar("Custos Hufnagel", "hufnagel", "hufnagel")
+ save b_h,a_w;
+ a_b:=1.54; % b_h*a_b/a_w = wd/ht
+ b_h:=0.85;
+ a_w:=1.09;
+
+ save a, beta, ht, wd;
+ ht# =noteheight#;
+ 2beta#=ht#*b_h;
+ a# = beta#*a_b;
+ wd# = 2a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2);
+ black_notehead_width# := wd#;
+
+ save rh_width, rh_height, rh_edge; % rhombus dimensions
+ rh_width#=0.7ht#; % ht*tan(35)
+ rh_height#=1.0ht#;
+ rh_edge#=0.61ht#; % (ht/2)/cos(35)
+
+ define_pixels(rh_width, rh_height, rh_edge);
+ pickup pencircle
+ xscaled stafflinethickness
+ yscaled rh_edge rotated -35;
+ z1=(0.5rh_width,+0.25rh_height);
+ z2=(1.0rh_width,-0.25rh_height);
+ z3=(2.0rh_width,+0.50rh_height);
+ draw z1 -- z2 -- z3;
+fet_endchar;
+
+% stem down
+fet_beginchar("Reverse Custos Hufnagel", "rhufnagel", "rhufnagel")
+ save b_h,a_w;
+ a_b:=1.54; % b_h*a_b/a_w = wd/ht
+ b_h:=0.85;
+ a_w:=1.09;
+
+ save a, beta, ht, wd;
+ ht# =noteheight#;
+ 2beta#=ht#*b_h;
+ a# = beta#*a_b;
+ wd# = 2a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2);
+ black_notehead_width# := wd#;
+
+ save rh_width, rh_height, rh_edge; % rhombus dimensions
+ rh_width#=0.7ht#; % ht*tan(35)
+ rh_height#=1.0ht#;
+ rh_edge#=0.61ht#; % (ht/2)/cos(35)
+
+ define_pixels(rh_width, rh_height, rh_edge);
+ pickup pencircle
+ xscaled stafflinethickness
+ yscaled rh_edge rotated +35;
+ z1=(0.5rh_width,-0.25rh_height);
+ z2=(1.0rh_width,+0.25rh_height);
+ z3=(2.0rh_width,-0.50rh_height);
+ draw z1 -- z2 -- z3;
+fet_endchar;
+
+
+%%%%%%%%
+%
+% Medicaea style
+%
+
+% stem up
+fet_beginchar("Custos Med.", "medicaea", "medicaea")
+ save b_h, a_w;
+ a_b := 1.54; % b_h*a_b/a_w = wd/ht
+ b_h := 0.85;
+ a_w := 1.09;
+
+ save a, beta, ht, wd;
+ ht# = noteheight# * mag;
+ 2beta# = ht# * b_h;
+ a# = beta# * a_b;
+ wd# = 0.4a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
+ black_notehead_width# := wd#;
+
+ define_pixels(ht, wd);
+ pickup pencircle scaled stafflinethickness;
+
+ z1 = (0.0wd, +0.0ht);
+ z2 = (1.0wd + 0.5stafflinethickness, +0.0ht);
+ penpos1(1.0ht, 90);
+ penpos2(1.0ht, 90);
+ penstroke z1e{z2 - z1} .. {right}z2e;
+
+ z3=(1.0wd, +0.0ht);
+ z4=(1.0wd, +1.0ht);
+ draw z3 -- z4;
+fet_endchar;
+
+
+% stem down
+fet_beginchar("Reverse Custos Med.", "rmedicaea", "rmedicaea")
+ save b_h, a_w;
+ a_b := 1.54; % b_h*a_b/a_w = wd/ht
+ b_h := 0.85;
+ a_w := 1.09;
+
+ save a, beta, ht, wd;
+ ht# = noteheight# * mag;
+ 2beta# = ht# * b_h;
+ a# = beta# * a_b;
+ wd# = 0.4a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
+ black_notehead_width# := wd#;
+
+ define_pixels(ht, wd);
+ pickup pencircle scaled stafflinethickness;
+
+ z1 = (0.0wd, +0.0ht);
+ z2 = (1.0wd + 0.5stafflinethickness, -0.0ht);
+ penpos1(1.0ht, 90);
+ penpos2(1.0ht, 90);
+ penstroke z1e{z2 - z1} .. {right}z2e;
+
+ z3=(1.0wd, -0.0ht);
+ z4=(1.0wd, -1.0ht);
+ draw z3 -- z4;
+fet_endchar;
+
+
+%%%%%%%%
+%
+% Editio Vaticana style
+%
+
+% stem up
+fet_beginchar("Custos Ed. Vat.", "vaticana", "vaticana")
+ save b_h, a_w;
+ a_b := 1.54; % b_h*a_b/a_w = wd/ht
+ b_h := 0.85;
+ a_w := 1.09;
+
+ save a, beta, ht, wd;
+ ht# = noteheight# * mag;
+ 2beta# = ht# * b_h;
+ a# = beta# * a_b;
+ wd# = 0.4a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2);
+ black_notehead_width# := wd#;
+
+ define_pixels(ht, wd);
+ pickup pencircle scaled stafflinethickness;
+
+ z1 = (0.0wd, +0.05ht);
+ z2 = (1.0wd + 0.5stafflinethickness, 0.0ht);
+ penpos1(0.5ht, 90);
+ penpos2(0.5ht, 90);
+ penstroke z1e{z2 - z1} .. {right}z2e;
+
+ z3=(1.0wd, +0.0ht);
+ z4=(1.0wd, +1.0ht);
+ draw z3 -- z4;
+fet_endchar;
+
+
+% stem down
+fet_beginchar("Reverse Custos Ed. Vat.", "rvaticana", "rvaticana")
+ save b_h, a_w;
+ a_b := 1.54; % b_h*a_b/a_w = wd/ht
+ b_h := 0.85;
+ a_w := 1.09;
+
+ save a, beta, ht, wd;
+ ht# = noteheight# * mag;
+ 2beta# = ht# * b_h;
+ a# = beta# * a_b;
+ wd# = 0.4a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2);
+ black_notehead_width# := wd#;
+
+ define_pixels(ht, wd);
+ pickup pencircle scaled stafflinethickness;
+
+ z1 = (0.0wd, -0.05ht);
+ z2 = (1.0wd + 0.5stafflinethickness, -0.0ht);
+ penpos1(0.5ht, 90);
+ penpos2(0.5ht, 90);
+ penstroke z1e{z2 - z1} .. {right}z2e;
+
+ z3=(1.0wd, -0.0ht);
+ z4=(1.0wd, -1.0ht);
+ draw z3 -- z4;
+fet_endchar;
+
+
+%%%%%%%%
+%
+% Mensural style
+%
+
+% stem up
+fet_beginchar("Custos Mensural", "mensural", "mensural")
+ save b_h,a_w;
+ a_b:=1.54; % b_h*a_b/a_w = wd/ht
+ b_h:=0.85;
+ a_w:=1.09;
+
+ save a, beta, ht, wd;
+ ht# =noteheight#;
+ 2beta#=ht#*b_h;
+ a# = beta#*a_b;
+ wd# = 2a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
+ black_notehead_width# := wd#;
+
+ define_pixels(ht, wd);
+ pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated -35;
+ z1=(0.0wd,-0.2ht);
+ z2=(0.2wd,+0.2ht);
+ z3=(0.4wd,-0.2ht);
+ z4=(0.6wd,+0.2ht);
+ z5=(0.8wd,-0.2ht);
+ z6=(1.6wd,+1.4ht);
+ draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
+fet_endchar;
+
+% stem down
+fet_beginchar("Reverse Custos Mensural", "rmensural", "rmensural")
+ save b_h,a_w;
+ a_b:=1.54; % b_h*a_b/a_w = wd/ht
+ b_h:=0.85;
+ a_w:=1.09;
+
+ save a, beta, ht, wd;
+ ht# =noteheight#;
+ 2beta#=ht#*b_h;
+ a# = beta#*a_b;
+ wd# = 2a# / a_w;
+ set_char_box(0, wd#, ht#/2, ht#/2); % width intentionally too small
+ black_notehead_width# := wd#;
+
+ define_pixels(ht, wd);
+ pickup pencircle xscaled stafflinethickness yscaled 0.4ht rotated +35;
+ z1=(0.0wd,+0.2ht);
+ z2=(0.2wd,-0.2ht);
+ z3=(0.4wd,+0.2ht);
+ z4=(0.6wd,-0.2ht);
+ z5=(0.8wd,+0.2ht);
+ z6=(1.6wd,-1.4ht);
+ draw z1 -- z2 -- z3 -- z4 -- z5 -- z6;
+fet_endchar;
+
+fet_endgroup("custodes");
+define_pixels(black_notehead_width);
+
input feta-timesig;
input feta-pendaal;
input feta-accordion;
+ input feta-custodes;
else:
% input feta-bolletjes;
% input feta-banier;
\bar "||";
\time 2/4;
s2*18
- \bar ".|";
+ \bar "|.";
}
i = \context Staff \notes\relative c''{
;; See documentation of Item::visibility_lambda_
(define (begin-of-line-visible d) (if (= d 1) '(#f . #f) '(#t . #t)))
+(define (end-of-line-visible d) (if (= d -1) '(#f . #f) '(#t . #t)))
(define (spanbar-begin-of-line-invisible d) (if (= d -1) '(#t . #t) '(#f . #f)))
(define (all-visible d) '(#f . #f))
(define (all-invisible d) '(#t . #t))
;; (Measured in staff space)
(define default-break-align-space-alist
'(
+ ((Staff_bar Custos) . (minimum-space 2.0))
+ ((Custos begin-of-note) . (minimum-space 0.0))
((none Instrument_name) . (extra-space 1.0))
((Instrument_name Left_edge_item) . (extra-space 1.0))
((Left_edge_item Clef_item) . (extra-space 1.0))
-
; distances are given in stafflinethickness (thicknesses) and
; staffspace (distances)
(meta . ,(element-description "ChordNames" font-interface text-interface chord-name-interface))
))
- (NoteCollision . (
- (axes 0 1)
- (note-width . 1.65)
- (meta . ,(element-description "NoteCollision"
- note-collision-interface axis-group-interface
- ))
- ))
-
+ (Custos . (
+ (break-align-symbol . Custos)
+ (breakable . #t )
+ (molecule-callback . ,Custos::brew_molecule)
+ (visibility-lambda . ,end-of-line-visible)
+ (style . "vaticana")
+ (Y-offset-callbacks . (,Staff_symbol_referencer::callback))
+ (meta . ,(element-description "Custos" custos-interface staff-symbol-interface break-aligned-interface) )
+ ))
+
(Crescendo . (
(molecule-callback . ,Crescendo::brew_molecule)
(thickness . 1.0)
(DynamicLineSpanner . (
(axes . ( 1))
- (padding . 3)
- (minimum-space . 6)
+ (padding . 0.6)
+ (minimum-space . 1.2)
(meta . ,(element-description "DynamicLineSpanner" dynamic-interface axis-group-interface side-position-interface))
))
(Fingering . (
(molecule-callback . ,Text_item::brew_molecule)
(X-offset-callbacks . (,Side_position::centered_on_parent ,Side_position::aligned_on_self))
- (padding . 3.0)
+ (padding . 0.6)
(self-alignment-X . 0)
(font-family . number)
(font-relative-size . -3)
(font-family . number)
(font-relative-size . 1)
(visibility-lambda . ,end-of-line-invisible)
- (padding . 4.0)
+ (padding . 0.8)
(meta . ,(element-description "RehearsalMark" mark-interface side-position-interface))
))
(font-relative-size . 1)
(meta . ,(element-description "MultiMeasureRest" multi-measure-rest-interface font-interface ))
))
+ (NoteCollision . (
+ (axes 0 1)
+ (note-width . 1.65)
+ (meta . ,(element-description "NoteCollision"
+ note-collision-interface axis-group-interface
+ ))
+ ))
(NoteColumn . (
(axes . (0 1))
(Y-offset-callbacks . (,Side_position::aligned_side))
(thickness . 1.6) ; stafflinethickness
(height . 2.0) ; staffspace;
- (minimum-space . 25)
+ (minimum-space . 5)
(font-family . number)
(font-relative-size . -2)
(meta . ,(element-description "VoltaBracket" volta-bracket-interface side-position-interface font-interface))
((-3 medium upright roman cmr 6) . "cmr6" )
((-4 medium upright roman cmr 5) . "cmr5" )
((-5 medium upright roman cmr 4) . "cmr4" )
+ ((-3 medium italic roman cmti 5) . "cmti6")
+ ((-2 medium italic roman cmti 6) . "cmti7")
((-1 medium italic roman cmti 8) . "cmti8")
((0 medium italic roman cmti 10) . "cmti10")
((1 medium italic roman cmti 12) . "cmti12")
((-3 bold italic dynamic feta 10) . "feta-din6")
((-4 bold italic dynamic feta 10) . "feta-din5")
((-5 bold italic dynamic feta 10) . "feta-din4")
+ ((2 medium upright music feta 26) . "feta26")
+ ((1 medium upright music feta 23) . "feta23")
((0 medium upright music feta 20) . "feta20")
+ ((-0.5 medium upright music feta 20) . "feta19")
((-1 medium upright music feta 16) . "feta16")
((-2 medium upright music feta 13) . "feta13")
((-3 medium upright music feta 13) . "feta11")
((-4 medium upright music feta 13) . "feta11")
- ((1 medium upright music feta 23) . "feta23")
- ((2 medium upright music feta 26) . "feta26")
((-1 medium upright math msam 10) . "msam10")
((-2 medium upright math msam 10) . "msam10")
((-3 medium upright math msam 10) . "msam10")
(define font-list-alist
(map-alist-vals (lambda (x) (change-style-sheet-relative-size
paper20-style-sheet-alist x))
- '((paper11 . -3)
- (paper13 . -2)
- (paper16 . -1)
+ '((paper11 . -4)
+ (paper13 . -3)
+ (paper16 . -2)
+ (paper19 . -1)
(paper20 . 0)
(paper23 . 1)
(paper26 . 2)
same as setting molecule-callback to #f, but this retains the
dimensions of this element, which means that you can erase elements
individually. ")
- (property-description 'molecule-callback procedure? "Function taking graphical element as argument, returning a Scheme encoded Molecule")
+ (property-description 'molecule-callback procedure? "Function taking graphical element as argument, returning a Scheme encoded Molecule
+
+This function can be called more than once (for instance once for
+computing dimensions, and once for computing the output). Therefore,
+this function should have no side-effects on its argument.
+Caching of computed values is permissible, and generally useful, though.
+
+")
))
)
(list
(property-description 'note-width 'number? "unit for horizontal translation, measured in staff-space.")
) ) )
+
+
+(define custos-interface
+ (lily-interface
+ 'custos-interface
+ "A custos is a staff context symbol that appears at the end of a
+ staff line with monophonic musical contents (i.e. with a single
+ voice). It anticipates the pitch of the first note of the following
+ line and thus helps the player or singer to manage line breaks
+ during performance, thus enhancing readability of a score.
+
+ Custodes were frequently used in music notation until the 16th
+ century. There were different appearences for different notation
+ styles. Nowadays, they have survived only in special forms of
+ musical notation such as via the editio vaticana dating back to the
+ beginning of the 20th century.
+
+[TODO: add to glossary]"
+
+ (list
+ (property-description 'style string? "a string determining what glyph is
+typeset. Current choices are mensural,
+hufnagel, vaticana and medicaea [TODO: should use symbol] ")
+ ))
+ )
+
+
+
(define dot-interface
(lily-interface
'dots-interface
"The dots to go with a notehead/rest. A separate interface, since they
are a party in collision resolution."
(list
+ (property-description 'direction dir? "Direction to handle staff-line collisions in.")
(property-description 'dot-count integer? "number of dots")
)))