and user properties.
2004-02-11 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/*: rename brew_molecule -> print , molecule-callback -> print-function
+
* scm/define-grob-properties.scm: cleanup. Separate into internal
and user properties.
#(ly:set-option 'old-relative)
-\version "2.1.11"
+\version "2.1.21"
% ASCII Art output
%
% Process as:
raggedright = ##t
\translator {
\StaffContext
- StaffSymbol \override #'molecule-callback = #(lambda (x) '())
+ StaffSymbol \override #'print-function = #(lambda (x) '())
}
}
}
-\version "2.1.19"
+\version "2.1.21"
% #(ly:set-point-and-click 'line-column)
interscoreline=4.0\mm
\translator {
\ScoreContext
-% System \override #'molecule-callback = #box-grob-molecule
+% System \override #'print-function = #box-grob-molecule
}
}
\include "deutsch.ly"
#(set-global-staff-size 16)
-\version "2.1.13"
+\version "2.1.21"
\header {
title = "Romanzen"
\pianoCautionaries
\property PianoStaff.NoteCollision \override #'merge-differently-dotted = ##t
\property PianoStaff.connectArpeggios = ##t
- \property PianoStaff.Arpeggio \override #'molecule-callback = \arpeggioBracket
+ \property PianoStaff.Arpeggio \override #'print-function = \arpeggioBracket
\property PianoStaff.InstrumentName \set #'font-size = #6
\property PianoStaff.InstrumentName \set #'font-shape = #'italic
-\version "2.1.7"
+\version "2.1.21"
\header {
texidoc = "The @code{\applyoutput} expression is the most flexible way to
(if (and (memq 'note-head-interface ifs)
(memq sp '(-2 -3 -5)))
(begin
- (ly:set-grob-property! gr 'molecule-callback brew-new-markup-molecule)
+ (ly:set-grob-property! gr 'print-function brew-new-markup-molecule)
(ly:set-grob-property! gr 'font-family 'roman)
(ly:set-grob-property!
gr 'text
-\version "2.1.7"
+\version "2.1.21"
\header{
texidoc="
A square bracket on the left indicates that the player should not
\score{
\notes\relative c''{
- \property Staff.Arpeggio \override #'molecule-callback = \arpeggioBracket
+ \property Staff.Arpeggio \override #'print-function = \arpeggioBracket
<fis, d a >\arpeggio
}
texidoc = "With balloon texts, objects in the output can be marked,
with lines and explanatory text added."
}
-\version "2.1.11"
+\version "2.1.21"
\score {
\notes {
\relative c' {
%% by hand:
- \once\property Voice.Stem \set #'molecule-callback = #Balloon_interface::brew_molecule
+ \once\property Voice.Stem \set #'print-function = #Balloon_interface::brew_molecule
\once\property Voice.Stem \set #'balloon-original-callback = #Stem::brew_molecule
\once\property Voice.Stem \set #'balloon-text = #"I'm a stem"
\once\property Voice.Stem \set #'balloon-text-offset = #'(3 . 4)
-\version "2.1.7"
+\version "2.1.21"
\header { texidoc=" You can write molecule callbacks in Scheme, thus
providing custom glyphs for notation elements. A simple example is
"Construct a function that will do CALLBACK and add parentheses.
Example usage:
- \\property Voice.NoteHead \\override #'molecule-callback
+ \\property Voice.NoteHead \\override #'print-function
=
#(parenthesize-callback Note_head::brew_molecule)
\score {
\notes \relative c' { c4 e
- \property Voice.NoteHead \override #'molecule-callback
+ \property Voice.NoteHead \override #'print-function
=
#(parenthesize-callback Note_head::brew_molecule)
g bes
- \property Voice.NoteHead \revert #'molecule-callback
- \property Voice.Beam \override #'molecule-callback
+ \property Voice.NoteHead \revert #'print-function
+ \property Voice.Beam \override #'print-function
=
#(parenthesize-callback Beam::brew_molecule)
-\version "2.1.7"
+\version "2.1.21"
\header {
texidoc = "A clef can be folded below notes in a different staff, if
\paper { raggedright = ##t
\translator { \ScoreContext
- NonMusicalPaperColumn \override #'molecule-callback = #Paper_column::brew_molecule
- PaperColumn \override #'molecule-callback = #Paper_column::brew_molecule
+ NonMusicalPaperColumn \override #'print-function = #Paper_column::brew_molecule
+ PaperColumn \override #'print-function = #Paper_column::brew_molecule
NonMusicalPaperColumn \override #'font-family = #'roman
PaperColumn \override #'font-family = #'roman
-\version "2.1.7"
+\version "2.1.21"
\header {
texidoc = "LilyPond correctly determines the size of every
\paper {
\translator {
\ScoreContext
- System \override #'molecule-callback = #box-grob-molecule
+ System \override #'print-function = #box-grob-molecule
}
}
}
" }
-\version "2.1.7"
+\version "2.1.21"
\score {
\context Staff \notes \transpose c c' {
\property Score.BarNumber \override #'break-visibility = #end-of-line-invisible
\property Score.barNumberVisibility = #(every-nth-bar-number-visible 4)
- \property Score.BarNumber \override #'molecule-callback =
+ \property Score.BarNumber \override #'print-function =
#(make-molecule-boxer 0.1 0.25 0.25 Text_item::brew_molecule)
\property Score.BarNumber \override #'font-size = #2
-\version "2.1.7"
+\version "2.1.21"
\header {
texidoc = "@cindex Boxed Molecule
You can override the molecule callback to draw a box around
\score { \notes \relative c'' {
- \property Voice.TextScript \override #'molecule-callback =
+ \property Voice.TextScript \override #'print-function =
#(make-molecule-boxer 0.1 0.3 0.2 brew-new-markup-molecule)
c'4^"foo"
-\property Voice.Stem \override #'molecule-callback =
+\property Voice.Stem \override #'print-function =
#(make-molecule-boxer 0.05 0.25 0.25 Stem::brew_molecule)
-\property Score.RehearsalMark \override #'molecule-callback =
+\property Score.RehearsalMark \override #'print-function =
#(make-molecule-boxer 0.15 0.3 0.3 brew-new-markup-molecule)
c8
-\property Voice.Stem \revert #'molecule-callback
+\property Voice.Stem \revert #'print-function
c4. c4 \mark "F" c1
}
-\version "2.1.7"
+\version "2.1.21"
\header {
texidoc = "@cindex Embedded Postscript
By inserting the @TeX{} command \embeddedps, you can
%
-%TODO: make molecule-callback to do this.
+%TODO: make print-function to do this.
%
\score {
-\version "2.1.7"
+\version "2.1.21"
\header { texidoc= "
\score { \notes \relative c'
{
- \property Staff.TimeSignature \override #'molecule-callback = #Text_item::brew_molecule
+ \property Staff.TimeSignature \override #'print-function = #Text_item::brew_molecule
\property Staff.TimeSignature \override #'text = #tsMarkup
return style + to_string (alteration);
}
-MAKE_SCHEME_CALLBACK (Accidental_interface,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Accidental_interface,print,1);
SCM
-Accidental_interface::brew_molecule (SCM smob)
+Accidental_interface::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
bool smaller = false;
}
}
-MAKE_SCHEME_CALLBACK (Ambitus,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Ambitus,print,1);
SCM
-Ambitus::brew_molecule (SCM smob)
+Ambitus::print (SCM smob)
{
Item *me = (Item *)unsmob_grob (smob);
Molecule molecule = Molecule ();
#include "lookup.hh"
-MAKE_SCHEME_CALLBACK (Arpeggio, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Arpeggio, print, 1);
SCM
-Arpeggio::brew_molecule (SCM smob)
+Arpeggio::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
/*
- We have to do a callback, because brew_molecule () triggers a
+ We have to do a callback, because print () triggers a
vertical alignment if it is cross-staff.
This callback also adds padding.
*/
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static bool has_interface (Grob*);
};
-MAKE_SCHEME_CALLBACK (Balloon_interface, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Balloon_interface, print, 1);
SCM
-Balloon_interface::brew_molecule (SCM smob)
+Balloon_interface::print (SCM smob)
{
Grob *me= unsmob_grob (smob);
#include "item.hh"
#include "staff-symbol-referencer.hh"
-MAKE_SCHEME_CALLBACK (Bar_line,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Bar_line,print,1);
SCM
-Bar_line::brew_molecule (SCM smob)
+Bar_line::print (SCM smob)
{
Grob * me = unsmob_grob (smob);
if (!gh_string_p (g))
{
- me->set_grob_property ("molecule-callback", SCM_EOL);
+ me->set_grob_property ("print-function", SCM_EOL);
me->set_extent (SCM_EOL, X_AXIS);
// leave y_extent for spanbar?
}
/*
TODO: should not make beams per stem, but per Y-level.
*/
-MAKE_SCHEME_CALLBACK (Beam, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Beam, print, 1);
SCM
-Beam::brew_molecule (SCM grob)
+Beam::print (SCM grob)
{
Grob *me = unsmob_grob (grob);
position_beam (me);
-MAKE_SCHEME_CALLBACK (Clef,brew_molecule,1)
+MAKE_SCHEME_CALLBACK (Clef,print,1)
SCM
-Clef::brew_molecule (SCM smob)
+Clef::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
SCM glyph_scm = me->get_grob_property ("glyph-name");
return out;
}
-MAKE_SCHEME_CALLBACK (Cluster,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Cluster,print,1);
SCM
-Cluster::brew_molecule (SCM smob)
+Cluster::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
Spanner *spanner = dynamic_cast<Spanner*> (me);
if (!spanner)
{
- me->programming_error ("Cluster::brew_molecule(): not a spanner");
+ me->programming_error ("Cluster::print(): not a spanner");
return SCM_EOL;
}
* of the ligature (to preemptively avoid collision with adjacent
* notes); or maybe just additionally create a
* mensural/vaticana/whatever-ligature grob (e.g. via
- * Mensural_ligature::brew_molecule(SCM)) that just consists of a
+ * Mensural_ligature::print(SCM)) that just consists of a
* bounding box around all primitives of the ligature.
*
* TODO: Maybe move functions fold_up_primitives() and
#include "font-interface.hh"
#include "math.h" // rint
-MAKE_SCHEME_CALLBACK (Custos,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Custos,print,1);
SCM
-Custos::brew_molecule (SCM smob)
+Custos::print (SCM smob)
{
Item *me = (Item *)unsmob_grob (smob);
#include "staff-symbol-referencer.hh"
#include "directional-element-interface.hh"
-MAKE_SCHEME_CALLBACK (Dots,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Dots,print,1);
SCM
-Dots::brew_molecule (SCM d)
+Dots::print (SCM d)
{
Grob *sc = unsmob_grob (d);
Molecule mol;
*/
if (cb != SCM_BOOL_F
&& !gh_procedure_p (cb) && !gh_pair_p (cb)
- && gh_procedure_p (get_grob_property ("molecule-callback"))
+ && gh_procedure_p (get_grob_property ("print-function"))
)
cb = molecule_extent_proc;
SCM
Grob::get_uncached_molecule ()const
{
- SCM proc = get_grob_property ("molecule-callback");
+ SCM proc = get_grob_property ("print-function");
SCM mol = SCM_EOL;
if (gh_procedure_p (proc))
"anything.\n"
,
"X-offset-callbacks Y-offset-callbacks X-extent-callback molecule cause "
-"Y-extent-callback molecule-callback extra-offset spacing-procedure "
+"Y-extent-callback print-function extra-offset spacing-procedure "
"staff-symbol interfaces dependencies X-extent Y-extent extra-X-extent "
"meta layer before-line-breaking-callback "
"after-line-breaking-callback extra-Y-extent minimum-X-extent "
#include "paper-column.hh"
#include "lookup.hh"
-MAKE_SCHEME_CALLBACK (Hairpin, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Hairpin, print, 1);
SCM
-Hairpin::brew_molecule (SCM smob)
+Hairpin::print (SCM smob)
{
Grob *me= unsmob_grob (smob);
Spanner *spanner = dynamic_cast<Spanner*> (me);
Direction grow_dir = to_dir (s);
- /* Ugh, must be same as Text_spanner::brew_molecule. */
+ /* Ugh, must be same as Text_spanner::print. */
/*
Ugh. property name is not general.
struct Horizontal_bracket
{
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static bool has_interface (Grob*);
};
*/
-MAKE_SCHEME_CALLBACK(Horizontal_bracket, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK(Horizontal_bracket, print, 1);
SCM
-Horizontal_bracket::brew_molecule (SCM smob)
+Horizontal_bracket::print (SCM smob)
{
Grob * me = unsmob_grob (smob);
Spanner *sp = dynamic_cast<Spanner*> (me);
class Accidental_interface
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
static bool has_interface (Grob*);
struct Ambitus
{
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM smob));
+ DECLARE_SCHEME_CALLBACK (print, (SCM smob));
static bool has_interface (Grob*);
};
class Arpeggio
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (brew_chord_bracket, (SCM));
DECLARE_SCHEME_CALLBACK (width_callback, (SCM,SCM));
static bool has_interface (Grob*);
static Molecule compound_barline (Grob*, String, Real height) ;
static Molecule simple_barline (Grob*, Real wid, Real height) ;
DECLARE_SCHEME_CALLBACK (get_staff_bar_size, (SCM ));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
};
#endif // BAR_HH
static Molecule compound_barline (Grob*, String, Real height) ;
static Molecule simple_barline (Grob*, Real wid, Real height) ;
DECLARE_SCHEME_CALLBACK (get_staff_bar_size, (SCM ));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
};
#endif // BAR_HH
static void connect_beams (Grob*me);
DECLARE_SCHEME_CALLBACK (space_function, (SCM, SCM));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
class Breathing_sign
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (railtracks, (SCM ));
DECLARE_SCHEME_CALLBACK (divisio_minima, (SCM ));
DECLARE_SCHEME_CALLBACK (divisio_maior, (SCM ));
struct Clef
{
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
};
class Cluster
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
// DECLARE_SCHEME_CALLBACK (after_line_breaking, (SCM));
static bool has_interface (Grob *);
// DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
struct Custos
{
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
private:
class Dots
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
bool has_interface (Grob*);
};
struct Hairpin
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static bool has_interface (Grob*);
};
class Line_spanner
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK(after_line_breaking, (SCM));
static Molecule line_molecule (Grob* me, Offset f, Offset t);
static bool has_interface (Grob*);
public:
static bool is_visible (Grob*);
static bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
};
#endif // EXTENDER_SPANNER_HH
public:
DECLARE_SCHEME_CALLBACK(set_spacing_rods, (SCM));
bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
};
#endif // HYPHEN_SPANNER_HH
class Measure_grouping
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
};
struct Mensural_ligature
{
DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM ));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
};
DECLARE_UNSMOB(Molecule,molecule);
SCM fontify_atom (Font_metric const*, SCM atom);
-Molecule create_molecule (SCM brew_molecule);
+Molecule create_molecule (SCM print);
{
public:
static bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (percent, (SCM));
static void add_column (Grob*,Item*);
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
class Note_head
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static Interval head_extent (Grob*, Axis);
static Molecule brew_ledger_lines (Grob *me, int pos, int interspaces,
Interval x_extent, Real, bool);
static int get_rank (Grob*);
- DECLARE_SCHEME_CALLBACK(brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK(print, (SCM));
DECLARE_SCHEME_CALLBACK(before_line_breaking, (SCM));
Paper_column (SCM);
static String glyph_name (Grob*, int, String);
static SCM brew_internal_molecule (SCM);
DECLARE_SCHEME_CALLBACK (extent_callback, (SCM,SCM));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
};
#endif // REST_HH
static Molecule get_molecule (Grob*,Direction d);
static bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
};
{
public:
static void add_column (Grob *me, Grob *col);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static void set_interface (Grob*);
static bool has_interface (Grob*);
static Array<Offset> get_encompass_offsets (Grob *me);
static void evaluate_empty (Grob*);
DECLARE_SCHEME_CALLBACK (width_callback, (SCM smob, SCM axis));
DECLARE_SCHEME_CALLBACK (get_bar_size, (SCM ));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM ));
DECLARE_SCHEME_CALLBACK (center_on_spanned_callback, (SCM element, SCM axis));
};
static int get_steps (Grob*) ;
static int line_count (Grob*);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
};
static bool has_interface (Grob*);
DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
DECLARE_SCHEME_CALLBACK (height, (SCM,SCM));
static void set_stem (Grob*me, Grob *st);
static Molecule raw_molecule (Grob*);
static bool has_interface (Grob *);
static void set_spacing_hints (Grob *);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (off_callback, (SCM element, SCM axis));
DECLARE_SCHEME_CALLBACK (before_line_breaking, (SCM));
DECLARE_SCHEME_CALLBACK (dim_callback, (SCM smob, SCM axis));
class System_start_delimiter
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
class Text_item
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (interpret_markup, (SCM, SCM, SCM));
static bool has_interface (Grob*);
static bool markup_p (SCM) ;
class Text_spanner
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static bool has_interface (Grob*);
private:
static void setup_pedal_bracket(Spanner *s);
static void set_direction (Grob*);
static Grob * head (Grob*,Direction) ;
static Real get_position (Grob*) ;
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static Direction get_default_dir (Grob*) ;
static SCM get_control_points (SCM);
DECLARE_SCHEME_CALLBACK (set_spacing_rods, (SCM ));
static bool has_interface (Grob*);
static Molecule special_time_signature (Grob*,SCM,int,int) ;
static Molecule numbered_time_signature (Grob*,int, int);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
};
#endif // METER_HH
class Tuplet_bracket
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
static void add_column (Grob*me,Item*);
struct Vaticana_ligature
{
DECLARE_SCHEME_CALLBACK (brew_ligature_primitive, (SCM ));
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob *);
};
-
/*
volta-spanner.hh -- part of GNU LilyPond
{
public:
static bool has_interface (Grob*);
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static void add_column (Grob*, Grob*col);
static void add_bar (Grob*me, Item*bar);
};
set_extent (SCM_EOL, Y_AXIS);
}
else if (trans)
- set_grob_property ("molecule-callback", SCM_EOL);
+ set_grob_property ("print-function", SCM_EOL);
}
}
struct Key_signature_interface
{
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM ));
+ DECLARE_SCHEME_CALLBACK (print, (SCM ));
static bool has_interface (Grob*);
};
TODO
- space the `natural' signs wider
*/
-MAKE_SCHEME_CALLBACK (Key_signature_interface,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Key_signature_interface,print,1);
SCM
-Key_signature_interface::brew_molecule (SCM smob)
+Key_signature_interface::print (SCM smob)
{
Grob*me =unsmob_grob (smob);
* This method should do something that comes close to the following
* .ly snippet:
*
- * \property Voice.NoteHead \override #'molecule-callback =
+ * \property Voice.NoteHead \override #'print-function =
* < value of #'ligature-primitive-callback of Voice.NoteHead >
*
* TODO: What we are doing here on the c++ level, should actually be
* performed on the SCM level. However, I do not know how to teach
- * lilypond to apply an \override and \revert on #'molecule-callback,
+ * lilypond to apply an \override and \revert on #'print-function,
* whenever lily encounters a \[ and \] in an .ly file, respectively.
* Also encounter, that lily should not crash if a user erronously
* nests \[ and \].
void
Ligature_engraver::override_molecule_callback ()
{
- SCM target_callback = ly_symbol2scm ("molecule-callback");
+ SCM target_callback = ly_symbol2scm ("print-function");
SCM source_callback = ly_symbol2scm ("ligature-primitive-callback");
SCM noteHeadProperties = updated_grob_properties (daddy_trans_, ly_symbol2scm ("NoteHead"));
SCM value = ly_cdr (scm_sloppy_assq (source_callback, noteHeadProperties));
* This method should do something that comes close to the following
* .ly snippet:
*
- * \property Voice.NoteHead \revert #'molecule-callback
+ * \property Voice.NoteHead \revert #'print-function
*
* TODO: What we are doing here on the c++ level, should actually be
* performed on the SCM level. However, I do not know how to teach
- * lilypond to apply an \override and \revert on #'molecule-callback,
+ * lilypond to apply an \override and \revert on #'print-function,
* whenever lily encounters a \[ and \] in an .ly file, respectively.
* Also encounter, that lily should not crash if a user erronously
* nests \[ and \].
Ligature_engraver::revert_molecule_callback ()
{
SCM symbol = ly_symbol2scm ("NoteHead");
- SCM key = ly_symbol2scm ("molecule-callback");
+ SCM key = ly_symbol2scm ("print-function");
execute_pushpop_property (daddy_trans_, symbol, key, SCM_UNDEFINED);
}
if (Note_head::has_interface (info.grob_))
{
primitives_.push (info);
- info.grob_->set_grob_property ("molecule-callback",
+ info.grob_->set_grob_property ("print-function",
brew_ligature_primitive_proc);
}
if (Rest::has_interface (info.grob_))
/*
Can't do suicide, since this mucks up finding the trend.
*/
- me->set_grob_property ("molecule-callback", SCM_EOL);
+ me->set_grob_property ("print-function", SCM_EOL);
}
return SCM_EOL;
*/
-MAKE_SCHEME_CALLBACK (Line_spanner, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Line_spanner, print, 1);
SCM
-Line_spanner::brew_molecule (SCM smob)
+Line_spanner::print (SCM smob)
{
Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (smob));
return true;
}
-MAKE_SCHEME_CALLBACK (Lyric_extender,brew_molecule,1)
+MAKE_SCHEME_CALLBACK (Lyric_extender,print,1)
SCM
-Lyric_extender::brew_molecule (SCM smob)
+Lyric_extender::print (SCM smob)
{
Spanner *me = unsmob_spanner (smob);
Item *l = me->get_bound (LEFT);
#include "lyric-hyphen.hh"
#include "moment.hh"
-MAKE_SCHEME_CALLBACK (Hyphen_spanner,brew_molecule,1)
+MAKE_SCHEME_CALLBACK (Hyphen_spanner,print,1)
SCM
-Hyphen_spanner::brew_molecule (SCM smob)
+Hyphen_spanner::print (SCM smob)
{
Spanner * me = unsmob_spanner (smob);
Drul_array<Item*> bounds (me->get_bound (LEFT),
#include "item.hh"
#include "staff-symbol-referencer.hh"
-MAKE_SCHEME_CALLBACK (Measure_grouping, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Measure_grouping, print, 1);
SCM
-Measure_grouping::brew_molecule (SCM grob)
+Measure_grouping::print (SCM grob)
{
Spanner * me = dynamic_cast<Spanner*> (unsmob_grob (grob));
return internal_brew_primitive (me, false).smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Mensural_ligature, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Mensural_ligature, print, 1);
SCM
-Mensural_ligature::brew_molecule (SCM)
+Mensural_ligature::print (SCM)
{
return SCM_EOL;
}
return r.smobbed_copy ();
}
-MAKE_SCHEME_CALLBACK (Multi_measure_rest,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Multi_measure_rest,print,1);
SCM
-Multi_measure_rest::brew_molecule (SCM smob)
+Multi_measure_rest::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
Spanner * sp = dynamic_cast<Spanner*> (me);
}
Molecule
-internal_brew_molecule (Grob *me, bool with_ledgers)
+internal_print (Grob *me, bool with_ledgers)
{
SCM style = me->get_grob_property ("style");
if (!gh_symbol_p (style))
}
-MAKE_SCHEME_CALLBACK (Note_head,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Note_head,print,1);
SCM
-Note_head::brew_molecule (SCM smob)
+Note_head::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
/*
ledgers don't take space. See top of file.
*/
- return internal_brew_molecule (me, true).smobbed_copy ();
+ return internal_print (me, true).smobbed_copy ();
}
/*
Interval
Note_head::head_extent (Grob *me, Axis a)
{
- SCM brewer = me->get_grob_property ("molecule-callback");
- if (brewer == Note_head::brew_molecule_proc)
+ SCM brewer = me->get_grob_property ("print-function");
+ if (brewer == Note_head::print_proc)
{
- Molecule mol = internal_brew_molecule (me, false);
+ Molecule mol = internal_print (me, false);
if (!mol.is_empty ())
return mol.extent (a);
Real
Note_head::stem_attachment_coordinate (Grob *me, Axis a)
{
- SCM brewer = me->get_grob_property ("molecule-callback");
+ SCM brewer = me->get_grob_property ("print-function");
Font_metric * fm = Font_interface::get_default_font (me);
- if (brewer == Note_head::brew_molecule_proc)
+ if (brewer == Note_head::print_proc)
{
SCM style = me->get_grob_property ("style");
if (!gh_symbol_p (style))
struct Ottava_bracket
{
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
static bool has_interface (Grob*);
};
*/
-MAKE_SCHEME_CALLBACK (Ottava_bracket, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Ottava_bracket, print, 1);
SCM
-Ottava_bracket::brew_molecule (SCM smob)
+Ottava_bracket::print (SCM smob)
{
Spanner*me = dynamic_cast<Spanner*> (unsmob_grob (smob));
Print a vertical line and the rank number, to aid debugging.
*/
-MAKE_SCHEME_CALLBACK(Paper_column,brew_molecule,1);
+MAKE_SCHEME_CALLBACK(Paper_column,print,1);
SCM
-Paper_column::brew_molecule (SCM p)
+Paper_column::print (SCM p)
{
Grob *me = unsmob_grob (p);
struct Piano_pedal_bracket
{
- DECLARE_SCHEME_CALLBACK(brew_molecule,(SCM));
+ DECLARE_SCHEME_CALLBACK(print,(SCM));
static bool has_interface (Grob*);
};
-MAKE_SCHEME_CALLBACK(Piano_pedal_bracket,brew_molecule,1);
+MAKE_SCHEME_CALLBACK(Piano_pedal_bracket,print,1);
SCM
-Piano_pedal_bracket::brew_molecule (SCM smob)
+Piano_pedal_bracket::print (SCM smob)
{
Spanner *me = dynamic_cast<Spanner*> (unsmob_grob (smob));
}
-MAKE_SCHEME_CALLBACK (Rest,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Rest,print,1);
SCM
Rest::brew_internal_molecule (SCM smob)
}
SCM
-Rest::brew_molecule (SCM smob)
+Rest::print (SCM smob)
{
return brew_internal_molecule (smob);
}
}
-MAKE_SCHEME_CALLBACK (Script_interface,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Script_interface,print,1);
SCM
-Script_interface::brew_molecule (SCM smob)
+Script_interface::print (SCM smob)
{
Grob *me= unsmob_grob (smob);
/*
Ugh should have dash-length + dash-period
*/
-MAKE_SCHEME_CALLBACK (Slur, brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Slur, print,1);
SCM
-Slur::brew_molecule (SCM smob)
+Slur::print (SCM smob)
{
Grob * me = unsmob_grob (smob);
if (!scm_ilength (me->get_grob_property ("note-columns")))
we can't kill the children, since we don't want to the
previous note to bump into the span arpeggio; so we make
it transparent. */
- arpeggios_[i]->set_grob_property ("molecule-callback", SCM_EOL);
+ arpeggios_[i]->set_grob_property ("print-function", SCM_EOL);
}
typeset_grob (span_arpeggio_);
me->add_dependency (b);
}
-MAKE_SCHEME_CALLBACK (Span_bar,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Span_bar,print,1);
/* Limitations/Bugs:
/* This routine was originally by Juergen Reuter, but it was a on the
bulky side. Rewritten by Han-Wen. */
SCM
-Span_bar::brew_molecule (SCM smobbed_me)
+Span_bar::print (SCM smobbed_me)
{
Grob *me = unsmob_grob (smobbed_me);
SCM first_elt = me->get_grob_property ("elements");
assert (a == Y_AXIS);
Interval i (get_spanned_interval (me));
- /* Bar_line::brew_molecule delivers a barline of y-extent (-h/2,h/2), so
+ /* Bar_line::print delivers a barline of y-extent (-h/2,h/2), so
we have to translate ourselves to be in the center of the
interval that we span. */
if (i.is_empty ())
-MAKE_SCHEME_CALLBACK (Staff_symbol,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Staff_symbol,print,1);
SCM
-Staff_symbol::brew_molecule (SCM smob)
+Staff_symbol::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
Spanner* sp = dynamic_cast<Spanner*> (me);
}
-MAKE_SCHEME_CALLBACK (Stem_tremolo,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Stem_tremolo,print,1);
SCM
-Stem_tremolo::brew_molecule (SCM grob)
+Stem_tremolo::print (SCM grob)
{
Grob *me = unsmob_grob (grob);
Grob *stem = unsmob_grob (me->get_grob_property ("stem"));
}
else
{
- me->set_grob_property ("molecule-callback", SCM_EOL);
+ me->set_grob_property ("print-function", SCM_EOL);
}
return SCM_UNSPECIFIED;
* Staff_symbol_referencer::line_thickness (me);
}
-MAKE_SCHEME_CALLBACK (Stem,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Stem,print,1);
SCM
-Stem::brew_molecule (SCM smob)
+Stem::print (SCM smob)
{
Grob*me = unsmob_grob (smob);
Molecule mol;
Properties:
- glyph -- text string (TODO: make one large glyph of the Ped symbol, removes need for member_brew_molecule ())
+ glyph -- text string (TODO: make one large glyph of the Ped symbol, removes need for member_print ())
*/
struct Sustain_pedal
{
public:
- DECLARE_SCHEME_CALLBACK (brew_molecule, (SCM));
+ DECLARE_SCHEME_CALLBACK (print, (SCM));
};
-MAKE_SCHEME_CALLBACK (Sustain_pedal,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Sustain_pedal,print,1);
SCM
-Sustain_pedal::brew_molecule (SCM smob)
+Sustain_pedal::print (SCM smob)
{
Grob * e = unsmob_grob (smob);
}
-MAKE_SCHEME_CALLBACK (System_start_delimiter,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (System_start_delimiter,print,1);
SCM
-System_start_delimiter::brew_molecule (SCM smob)
+System_start_delimiter::print (SCM smob)
{
Grob * me = unsmob_grob (smob);
}
}
-MAKE_SCHEME_CALLBACK(Text_item,brew_molecule,1);
+MAKE_SCHEME_CALLBACK(Text_item,print,1);
SCM
-Text_item::brew_molecule (SCM grob)
+Text_item::print (SCM grob)
{
Grob * me = unsmob_grob (grob);
- more texts/positions
*/
-MAKE_SCHEME_CALLBACK (Text_spanner, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Text_spanner, print, 1);
/*
TODO: this function is too long
*/
SCM
-Text_spanner::brew_molecule (SCM smob)
+Text_spanner::print (SCM smob)
{
Grob *me= unsmob_grob (smob);
Spanner *spanner = dynamic_cast<Spanner*> (me);
- /* Ugh, must be same as Hairpin::brew_molecule. */
+ /* Ugh, must be same as Hairpin::print. */
Grob *common = spanner->get_bound (LEFT)->common_refpoint (spanner->get_bound (RIGHT), X_AXIS);
Paper_def * paper = me->get_paper();
}
-MAKE_SCHEME_CALLBACK (Tie,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Tie,print,1);
SCM
-Tie::brew_molecule (SCM smob)
+Tie::print (SCM smob)
{
Grob*me = unsmob_grob (smob);
*/
-MAKE_SCHEME_CALLBACK (Time_signature, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Time_signature, print, 1);
SCM
-Time_signature::brew_molecule (SCM smob)
+Time_signature::print (SCM smob)
{
Grob * me = unsmob_grob (smob);
SCM st = me->get_grob_property ("style");
follow beam precisely for determining tuplet number location.
*/
-MAKE_SCHEME_CALLBACK (Tuplet_bracket,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Tuplet_bracket,print,1);
SCM
-Tuplet_bracket::brew_molecule (SCM smob)
+Tuplet_bracket::print (SCM smob)
{
Grob *me= unsmob_grob (smob);
Molecule mol;
return primitive;
}
-MAKE_SCHEME_CALLBACK (Vaticana_ligature, brew_molecule, 1);
+MAKE_SCHEME_CALLBACK (Vaticana_ligature, print, 1);
SCM
-Vaticana_ligature::brew_molecule (SCM)
+Vaticana_ligature::print (SCM)
{
return SCM_EOL;
}
*/
-MAKE_SCHEME_CALLBACK (Volta_bracket_interface,brew_molecule,1);
+MAKE_SCHEME_CALLBACK (Volta_bracket_interface,print,1);
SCM
-Volta_bracket_interface::brew_molecule (SCM smob)
+Volta_bracket_interface::print (SCM smob)
{
Grob *me = unsmob_grob (smob);
Link_array<Item> bars
-\version "2.1.19"
+\version "2.1.21"
%
EasyNotation = \translator {
\ScoreContext
- NoteHead \override #'molecule-callback = #Note_head::brew_ez_molecule
+ NoteHead \override #'print-function = #Note_head::brew_ez_molecule
NoteHead \override #'Y-extent-callback = #'()
NoteHead \override #'X-extent-callback = #'()
}
\description "Context for drawing notes in a Tab staff. "
Slur \override #'font-family = #'roman
- Slur \override #'molecule-callback = #hammer-molecule-callback
+ Slur \override #'print-function = #hammer-print-function
Slur \override #'direction = #-1
% Draws all stems/beams out of the staff (and not in the middle of the staff !)
-\version "2.1.1"
+\version "2.1.21"
%%%%%%%%
%%%%%%%% shortcuts common for all styles of gregorian chant notation
\breathe
}
divisioMinima = {
- \once \property Voice.BreathingSign \override #'molecule-callback = #Breathing_sign::divisio_minima
+ \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::divisio_minima
% Workaround: add padding. Correct fix would be spacing engine handle this.
\once \property Voice.BreathingSign \override #'extra-X-extent = #'(-1.0 . 0)
\breathe
}
divisioMaior = {
- \once \property Voice.BreathingSign \override #'molecule-callback = #Breathing_sign::divisio_maior
+ \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::divisio_maior
\once \property Voice.BreathingSign \override #'Y-offset-callbacks = #'()
% Workaround: add padding. Correct fix would be spacing engine handle this.
\breathe
}
divisioMaxima = {
- \once \property Voice.BreathingSign \override #'molecule-callback = #Breathing_sign::divisio_maxima
+ \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::divisio_maxima
\once \property Voice.BreathingSign \override #'Y-offset-callbacks = #'()
% Workaround: add padding. Correct fix would be spacing engine handle this.
\breathe
}
finalis = {
- \once \property Voice.BreathingSign \override #'molecule-callback = #Breathing_sign::finalis
+ \once \property Voice.BreathingSign \override #'print-function = #Breathing_sign::finalis
\once \property Voice.BreathingSign \override #'Y-offset-callbacks = #'()
% Workaround: add padding. Correct fix would be spacing engine handle this.
% property-init.ly
-\version "1.9.8"
+\version "2.1.21"
stemUp = \property Voice.Stem \set #'direction = #1
stemDown = \property Voice.Stem \set #'direction = #-1
turnOff = #(cons '() '())
% For drawing vertical chord brackets with \arpeggio
-% This is a shorthand for the value of the molecule-callback property
+% This is a shorthand for the value of the print-function property
% of either Staff.Arpeggio or PianoStaff.Arpeggio, depending whether
% cross-staff brackets are desired.
Also works as a scaling parameter for the length of hyphen. .")
(minimum-space ,ly:dimension? "minimum distance that the victim should move (after padding).")
- (molecule-callback ,procedure? "Function taking grob as argument,
+ (print-function ,procedure? "Function taking grob as argument,
returning a Molecule object.")
- (molecule ,ly:molecule? "Cached output of the molecule-callback.")
+ (molecule ,ly:molecule? "Cached output of the print-function.")
(new-accidentals ,list? "list of (pitch, accidental) pairs.")
(no-spacing-rods ,boolean? "read from grobs: boolean that makes Separation_item ignore this item (MOVE ME TO ITEM).")
(threshold ,number-pair? "(cons MIN MAX), where MIN and MAX are dimensions in staffspace.")
(transparent ,boolean? "This is almost the
-same as setting molecule-callback to #f, but this retains the
+same as setting print-function to #f, but this retains the
dimensions of this grob, which means that you can erase grobs
individually. .")
(bracket-visibility ,boolean-or-symbol? " This controls the
(define all-internal-grob-properties
(map
(lambda (x)
- (display x)
(apply define-internal-grob-property x))
`(
(all-elements ,grob-list? "list of all grobs in this line. Needed for protecting grobs from GC.")
(arpeggio ,ly:grob? "pointer to arpeggio object.")
(beam ,ly:grob? "pointer to the beam, if applicable.")
- (center-element ,ly:grob? "grob which will
-be at the center of the group after aligning (when using
-Align_interface::center_on_element). .")
- (direction-source ,ly:grob? "in case side-relative-direction is set, which grob to get the direction from .")
+ (center-element ,ly:grob? "grob which will be at the center of
+the group after aligning (when using
+Align_interface::center_on_element).")
+ (direction-source ,ly:grob? "in case side-relative-direction is
+set, which grob to get the direction from .")
(dot ,ly:grob? "reference to Dots object.")
(pedal-text ,ly:grob? "Pointer to the text of a mixed-style piano pedal.")
(stem ,ly:grob? "pointer to Stem object.")
(tremolo-flag ,ly:grob? "The tremolo object on a stem.")
- (tie ,ly:grob? "")
+ (tie ,ly:grob? "")
(staff-symbol ,ly:grob? "the staff symbol grob that we're in.")
(rest ,ly:grob? "the staff symbol grob that we're in.")
(rest-collision ,ly:grob? "rest collision that a rest is in.")
`(
(Accidental
. (
- (molecule-callback . ,Accidental_interface::brew_molecule)
+ (print-function . ,Accidental_interface::print)
(font-family . music)
(cautionary-style . parentheses)
(after-line-breaking-callback . ,Accidental_interface::after_line_breaking) (meta . ((interfaces . (item-interface accidental-interface font-interface))))
. (
(breakable . #t)
(break-align-symbol . ambitus)
- (molecule-callback . ,Ambitus::brew_molecule)
+ (print-function . ,Ambitus::print)
(font-family . music)
(note-head-style . "noteheads-2")
(visibility-lambda . ,begin-of-line-visible)
. (
(X-extent-callback . ,Arpeggio::width_callback)
(Y-extent-callback . #f)
- (molecule-callback . ,Arpeggio::brew_molecule)
+ (print-function . ,Arpeggio::print)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(X-offset-callbacks . (,Side_position_interface::aligned_side))
(direction . -1)
(glyph . "|")
(break-glyph-function . ,default-break-barline)
(bar-size-procedure . ,Bar_line::get_staff_bar_size)
- (molecule-callback . ,Bar_line::brew_molecule)
+ (print-function . ,Bar_line::print)
(break-visibility . ,all-visible)
(breakable . #t)
(before-line-breaking-callback . ,Bar_line::before_line_breaking)
(BarNumber
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(breakable . #t)
(break-visibility . ,begin-of-line-visible)
(padding . 1.0)
(BassFigure
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
(direction . 1)
(font-family . number)
. (
;; todo: clean this up a bit: the list is getting
;; rather long.
- (molecule-callback . ,Beam::brew_molecule)
+ (print-function . ,Beam::print)
(concaveness-gap . 2.0)
(concaveness-threshold . 0.08)
(gap . 0.8)
(first-note . (fixed-space . 1.0)) ;huh?
(right-edge . (extra-space . 0.1))
))
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(text . ,(make-musicglyph-markup "scripts-rcomma"))
(Y-offset-callbacks . (,Breathing_sign::offset_callback))
(break-visibility . ,begin-of-line-invisible)
(Clef
. (
- (molecule-callback . ,Clef::brew_molecule)
+ (print-function . ,Clef::print)
(before-line-breaking-callback . ,Clef::before_line_breaking)
(breakable . #t)
(font-family . music)
(ClusterSpannerBeacon
. (
- (molecule-callback . #f)
+ (print-function . #f)
(meta . ((interfaces . (cluster-beacon-interface item-interface))))
))
(ClusterSpanner
. (
- (molecule-callback . ,Cluster::brew_molecule)
+ (print-function . ,Cluster::print)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 0.0)
(padding . 0.25)
(ChordName
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(after-line-breaking-callback . ,Chord_name::after_line_breaking)
(word-space . 0.0)
(font-family . sans)
. (
(break-align-symbol . custos)
(breakable . #t)
- (molecule-callback . ,Custos::brew_molecule)
+ (print-function . ,Custos::print)
(break-visibility . ,end-of-line-visible)
(style . vaticana)
(neutral-position . 0)
(Dots
. (
- (molecule-callback . ,Dots::brew_molecule)
+ (print-function . ,Dots::print)
(dot-count . 1)
(meta . ((interfaces . (font-interface staff-symbol-referencer-interface dots-interface item-interface ))))
))
(DoublePercentRepeat .
(
- (molecule-callback . ,Percent_repeat_item_interface::double_percent)
+ (print-function . ,Percent_repeat_item_interface::double_percent)
(breakable . #t)
(slope . 1.0)
(font-family . music)
(DynamicText
. (
(Y-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
,Self_alignment_interface::centered_on_parent))
(self-alignment-X . 0)
(Fingering
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(padding . 0.6)
(staff-padding . 0.6)
(self-alignment-X . 0)
(Hairpin
. (
- (molecule-callback . ,Hairpin::brew_molecule)
+ (print-function . ,Hairpin::print)
(thickness . 1.0)
(height . 0.6666)
(spacing-procedure . ,Spanner::set_spacing_rods)
(HorizontalBracket
. (
(thickness . 1.0)
- (molecule-callback . ,Horizontal_bracket::brew_molecule)
+ (print-function . ,Horizontal_bracket::print)
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(padding . 0.2)
(direction . -1)
))
(self-alignment-Y . 0)
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(break-align-symbol . instrument-name)
(break-visibility . ,begin-of-line-visible)
(baseline-skip . 2)
(direction . 0)
(space-alist . ((left-edge . (extra-space . 1.0))
))
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(break-align-symbol . clef)
(break-visibility . ,begin-of-line-visible)
(baseline-skip . 2)
(KeySignature
. (
- (molecule-callback . ,Key_signature_interface::brew_molecule)
+ (print-function . ,Key_signature_interface::print)
(space-alist . (
(time-signature . (extra-space . 1.25))
(staff-bar . (extra-space . 1.1))
(LigatureBracket
. (
- (ligature-primitive-callback . ,Note_head::brew_molecule)
+ (ligature-primitive-callback . ,Note_head::print)
(direction . 1)
(gap . 0.0)
(padding . 2.0)
(shorten-pair . (-0.2 . -0.2))
(before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
(after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
- (molecule-callback . ,Tuplet_bracket::brew_molecule)
+ (print-function . ,Tuplet_bracket::print)
(meta . ((interfaces . (tuplet-bracket-interface spanner-interface))))
))
(dash-period . 10.0)
(length . 0.66)
(spacing-procedure . ,Hyphen_spanner::set_spacing_rods)
- (molecule-callback . ,Hyphen_spanner::brew_molecule)
+ (print-function . ,Hyphen_spanner::print)
(Y-extent-callback . ,Grob::point_dimension_callback)
(meta . ((interfaces . (lyric-interface lyric-hyphen-interface
spanner-interface))))
(LyricExtender
. (
- (molecule-callback . ,Lyric_extender::brew_molecule)
+ (print-function . ,Lyric_extender::print)
(thickness . 0.8) ; linethickness
(minimum-length . 1.5)
(Y-extent-callback . ,Grob::point_dimension_callback)
))
(LyricText
- . ((molecule-callback . ,Text_item::brew_molecule)
+ . ((print-function . ,Text_item::print)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_parent))
(self-alignment-X . 0)
(word-space . 0.6)
(thickness . 1.4)
(flexa-width . 2.0)
(ligature-primitive-callback . ,Mensural_ligature::brew_ligature_primitive)
- (molecule-callback . ,Mensural_ligature::brew_molecule)
+ (print-function . ,Mensural_ligature::print)
(meta . ((interfaces . (mensural-ligature-interface font-interface))))
))
(RehearsalMark
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(after-line-breaking-callback . ,shift-right-at-line-begin)
))
(MetronomeMark
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(direction . 1)
(breakable . #t)
(MeasureGrouping
. (
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
- (molecule-callback . ,Measure_grouping::brew_molecule)
+ (print-function . ,Measure_grouping::print)
(padding . 2)
(direction . 1)
(thickness . 1)
(MultiMeasureRest
. (
(spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
- (molecule-callback . ,Multi_measure_rest::brew_molecule)
+ (print-function . ,Multi_measure_rest::print)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(staff-position . 0)
(expand-limit . 10)
(MultiMeasureRestNumber
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
,Self_alignment_interface::centered_on_other_axis_parent))
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
))
(MultiMeasureRestText
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self
,Self_alignment_interface::centered_on_other_axis_parent))
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(NoteHead
. (
(style . default)
- (molecule-callback . ,Note_head::brew_molecule)
- (ligature-primitive-callback . ,Note_head::brew_molecule)
+ (print-function . ,Note_head::print)
+ (ligature-primitive-callback . ,Note_head::print)
(glyph-name-procedure . ,find-notehead-symbol)
(X-extent-callback . ,Note_head::extent)
(Y-extent-callback . ,Note_head::extent)
(X-extent-callback . #f)
(Y-extent-callback . #f)
(after-line-breaking-callback . ,Line_spanner::after_line_breaking)
- (molecule-callback . ,Line_spanner::brew_molecule)
+ (print-function . ,Line_spanner::print)
(meta . ((interfaces . (line-spanner-interface spanner-interface))))
))
(breakable . #t)
(X-extent-callback . #f)
(Y-extent-callback . #f)
- (molecule-callback . ,Line_spanner::brew_molecule)
+ (print-function . ,Line_spanner::print)
(after-line-breaking-callback . ,Line_spanner::after_line_breaking)
(meta . ((interfaces . (line-spanner-interface spanner-interface))))
))
(NoteName
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(font-family . roman)
(meta . ((interfaces . (note-name-interface text-interface font-interface item-interface ))))
))
(break-visibility . ,begin-of-line-visible)
(X-offset-callbacks . (,Self_alignment_interface::centered_on_parent ,Self_alignment_interface::aligned_on_self))
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(font-shape . italic)
(padding . 0.4)
(staff-padding . 0.2)
(before-line-breaking-callback . ,Paper_column::before_line_breaking)
(X-extent-callback . ,Axis_group_interface::group_extent_callback)
-; (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
+; (print-function . ,Paper_column::print) (font-name . "cmr8") (Y-extent-callback . #f)
(meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
))
(PhrasingSlur
. (
- (molecule-callback . ,Slur::brew_molecule)
+ (print-function . ,Slur::print)
(thickness . 1.2)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 1.5)
(X-extent-callback . ,Axis_group_interface::group_extent_callback)
(before-line-breaking-callback . ,Paper_column::before_line_breaking)
;; debugging stuff: print column number.
-; (molecule-callback . ,Paper_column::brew_molecule) (font-name . "cmr8") (Y-extent-callback . #f)
+; (print-function . ,Paper_column::print) (font-name . "cmr8") (Y-extent-callback . #f)
(meta . ((interfaces . (paper-column-interface axis-group-interface spaceable-grob-interface item-interface ))))
(PercentRepeat
. (
(spacing-procedure . ,Multi_measure_rest::set_spacing_rods)
- (molecule-callback . ,Multi_measure_rest::percent)
+ (print-function . ,Multi_measure_rest::percent)
(slope . 1.0)
(thickness . 0.48)
(minimum-width . 12.5) ; staffspace
(PianoPedalBracket ;; an example of a text spanner
. (
- (molecule-callback . ,Piano_pedal_bracket::brew_molecule)
+ (print-function . ,Piano_pedal_bracket::print)
(font-family . roman)
(style . line)
(if-text-padding . 1.0)
(RepeatSlash
. (
- (molecule-callback . ,Percent_repeat_item_interface::beat_slash)
+ (print-function . ,Percent_repeat_item_interface::beat_slash)
(thickness . 0.48)
(slope . 1.7)
(meta . ((interfaces . (percent-repeat-interface item-interface ))))
(after-line-breaking-callback . ,Rest::after_line_breaking)
(X-extent-callback . ,Rest::extent_callback)
(Y-extent-callback . ,Rest::extent_callback)
- (molecule-callback . ,Rest::brew_molecule)
+ (print-function . ,Rest::print)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(minimum-distance . 0.25)
(meta . (
(Script
. (
;; don't set direction here: it breaks staccato.
- (molecule-callback . ,Script_interface::brew_molecule)
+ (print-function . ,Script_interface::print)
;; This value is sensitive: if too large, staccato dots will move a
;; space a away.
(Slur
. (
- (molecule-callback . ,Slur::brew_molecule)
+ (print-function . ,Slur::print)
(thickness . 1.2)
(spacing-procedure . ,Spanner::set_spacing_rods)
(minimum-length . 1.5)
. (
(break-align-symbol . staff-bar)
(bar-size-procedure . ,Span_bar::get_bar_size)
- (molecule-callback . ,Span_bar::brew_molecule)
+ (print-function . ,Span_bar::print)
(break-visibility . ,begin-of-line-invisible)
(X-extent-callback . ,Span_bar::width_callback)
(Y-extent-callback . ())
))
(StanzaNumber
- . ((molecule-callback . ,Text_item::brew_molecule)
+ . ((print-function . ,Text_item::print)
(font-family . roman)
(font-series . bold)
(padding . 1.0)
(StaffSymbol
. (
- (molecule-callback . ,Staff_symbol::brew_molecule)
+ (print-function . ,Staff_symbol::print)
(line-count . 5)
(ledger-line-thickness . (1.0 . 0.1))
(layer . 0)
(SostenutoPedal
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(direction . 1)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
(no-spacing-rods . #t)
;; this list is rather long. Trim --hwn
(before-line-breaking-callback . ,Stem::before_line_breaking)
- (molecule-callback . ,Stem::brew_molecule)
+ (print-function . ,Stem::print)
(thickness . 1.3)
;; 3.5 (or 3 measured from note head) is standar length
(StemTremolo
. (
- (molecule-callback . ,Stem_tremolo::brew_molecule)
+ (print-function . ,Stem_tremolo::print)
(Y-extent-callback . ,Stem_tremolo::height)
(X-extent-callback . #f)
(SustainPedal
. (
(no-spacing-rods . #t)
- (molecule-callback . ,Sustain_pedal::brew_molecule)
+ (print-function . ,Sustain_pedal::print)
(self-alignment-X . 0)
(direction . 1)
(padding . 0.0) ;; padding relative to SustainPedalLineSpanner
(SystemStartBrace
. (
(glyph . "brace")
- (molecule-callback . ,System_start_delimiter::brew_molecule)
+ (print-function . ,System_start_delimiter::print)
(collapse-height . 5.0)
(font-family . braces)
(Y-extent-callback . #f)
(SystemStartBracket
. (
(Y-extent-callback . #f)
- (molecule-callback . ,System_start_delimiter::brew_molecule)
+ (print-function . ,System_start_delimiter::print)
(glyph . "bracket")
(arch-height . 1.5)
(arch-angle . 50.0)
(SystemStartBar
. (
(Y-extent-callback . #f)
- (molecule-callback . ,System_start_delimiter::brew_molecule)
+ (print-function . ,System_start_delimiter::print)
(glyph . "bar-line")
(thickness . 1.6)
(after-line-breaking-callback . ,System_start_delimiter::after_line_breaking)
(TextScript
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(no-spacing-rods . #t)
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
(direction . -1)
))
(CombineTextScript
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(no-spacing-rods . #t)
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
(X-offset-callbacks . (,Self_alignment_interface::aligned_on_self))
))
(TextSpanner
. (
- (molecule-callback . ,Text_spanner::brew_molecule)
+ (print-function . ,Text_spanner::print)
(font-family . roman)
(style . dashed-line)
(staff-padding . 0.1)
(OttavaBracket
. (
(Y-offset-callbacks . (,Side_position_interface::aligned_side))
- (molecule-callback . ,Ottava_bracket::brew_molecule)
+ (print-function . ,Ottava_bracket::print)
(font-shape . italic)
(font-family . roman)
(text-repeat-if-broken . #t)
. (
(font-family . roman)
(style . default)
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
(extra-offset . (0 . -0.65)) ;; UGH! TODO: Clean this up!
(stem-attachment-function . ,tablature-stem-attachment-function)
(Tie
. (
- (molecule-callback . ,Tie::brew_molecule)
+ (print-function . ,Tie::print)
(spacing-procedure . ,Spanner::set_spacing_rods)
(staffline-clearance . 0.35)
(details . ((ratio . 0.333) (height-limit . 1.0)))
(TimeSignature
. (
- (molecule-callback . ,Time_signature::brew_molecule)
-; (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Time_signature::print)
+; (print-function . ,Text_item::print)
(break-align-symbol . time-signature)
(break-visibility . ,all-visible)
(space-alist . (
(shorten-pair . (-0.2 . -0.2))
(before-line-breaking-callback . ,Tuplet_bracket::before_line_breaking)
(after-line-breaking-callback . ,Tuplet_bracket::after_line_breaking)
- (molecule-callback . ,Tuplet_bracket::brew_molecule)
+ (print-function . ,Tuplet_bracket::print)
(font-family . roman)
(font-shape . italic)
(font-series . bold)
(UnaCordaPedal
. (
- (molecule-callback . ,Text_item::brew_molecule)
+ (print-function . ,Text_item::print)
(font-family . roman)
(font-shape . italic)
(no-spacing-rods . #t)
(thickness . 0.6)
(flexa-width . 2.0)
(ligature-primitive-callback . ,Vaticana_ligature::brew_ligature_primitive)
- (molecule-callback . ,Vaticana_ligature::brew_molecule)
+ (print-function . ,Vaticana_ligature::print)
(meta . ((interfaces . (vaticana-ligature-interface font-interface))))
))
(VoltaBracket
. (
- (molecule-callback . ,Volta_bracket_interface::brew_molecule)
+ (print-function . ,Volta_bracket_interface::print)
(direction . 1)
(padding . 1)
(font-family . number)
(let*
((meta (ly:get-grob-property grob 'meta))
(nm (if (pair? meta) (cdr (assoc 'name meta)) "nonexistant"))
- (cb (ly:get-grob-property grob 'molecule-callback)))
+ (cb (ly:get-grob-property grob 'print-function)))
(if (equal? nm object-name)
(begin
- (ly:set-grob-property! grob 'molecule-callback Balloon_interface::brew_molecule)
+ (ly:set-grob-property! grob 'print-function Balloon_interface::brew_molecule)
(ly:set-grob-property! grob 'balloon-original-callback cb)
(ly:set-grob-property! grob 'balloon-text text)
(ly:set-grob-property! grob 'balloon-text-offset off)
; The TabNoteHead molecule callback.
; Create a text molecule
-(define-public (tablature-molecule-callback grob)
+(define-public (tablature-print-function grob)
(let ((molecule (fontify-text
(ly:get-default-font grob)
(ly:get-grob-property grob 'text)
)
) ) )
-(define-public (hammer-molecule-callback grob)
+(define-public (hammer-print-function grob)
(let* ((note-collums (ly:get-grob-property grob 'note-columns))
(note-column1 (cadr note-collums))
(note-column2 (car note-collums))
conversions.append (((2,1,20), conv, """nonevent-skip -> skip-music""" ))
+def conv (str):
+ str = re.sub (r'molecule-callback', 'print-function', str)
+ str = re.sub (r'brew_molecule', 'print', str)
+ return str
+
+conversions.append (((2,1,21), conv, """molecule-callback -> print-function,
+brew_molecule -> print
+""" ))
+