triad, \mudela{<c' e g>}, was created with this code:
\verb|\mudela{<c' e g>}|
+\def\obsolete{
Mudela-book defines the \verb|\mudela| command, and let you define
your own commands in a file specified by
the command line option \verb|--initfile=filename|. The format for the
\paper{linewidth = -1.\cm;}
}
\end{mudela}
+}
\section{More options}
\begin{itemize}
accordeon symbols
Music expression / music expression
+ property lists should be alphabetic.
+
)
cindex(properties!Voice)
description(
- dit(code(stemLength))indexcode(stemLength) nl()
- Set length of stems. Unit is `code(interline)/2', so
- code(stemLength) defaults bind(to)7.
-
- dit(code(stemLeftBeamCount))indexcode(stemLeftBeamCount) nl()
- Specify the number of beams to draw on the left side of the next
- note. Overrides automatic beaming. The value is only used once,
- and then it is erased.
+ dit(code(abbrev))indexcode(abbrev) nl()
+ Set length for tremolo to be used if no length is explicitly
+ specified.
- dit(code(stemRightBeamCount))indexcode(stemRightBeamCount) nl()
- Specify the number of beams to draw on the right side of the next
- note. Overrides automatic beaming. The value is only used once,
- and then it is erased.
+ dit(code(articulationScriptPadding))indexcode(articulationScriptPadding)
+ nl()
+ Determines the extra space added between articulation marks, such
+ as staccato, tenuto, trill, up/down bow or fermata, and the
+ closest staff line or note.
+ dit(code(articulationScriptVerticalDirection))
+ indexcode(articulationScriptVerticalDirection) nl()
+ Determines the location of articulation marks. Set to code(\up)
+ to print marks above the staff; set to code(\down) to print marks
+ below the staff. This property does not override explicit
+ directions marked with `code(^)' or `code(_)' in the mudela file.
+
dit(code(noAutoBeaming))indexcode(beamAuto) nl()
If set bind(to)1 then beams are not generated automatically.
Specifies when automatically generated beams can start. See
bind(section)ref(autobeam).
- dit(code(textEmptyDimension))indexcode(textEmptyDimension) nl()
- If set bind(to)1 then text placed above or below the staff is
- assumed to have zero width.
-
dit(code(beamquantisation))indexcode(beamquantisation) nl()
Set to code(\none) for no quantization. Set to code(\normal) to
quantize position and slope. Set to code(\traditional) to avoid
code(\beamslopezero)keyindex(beamslopezero) each set the
corresponding value.
- dit(code(restStyle))indexcode(restStyle) nl()
- Change the layout of rests shorter than quarter notes.
- Currently, the standard layout code("") and mensural notation
- code("mensural") are available. Mensural rests of duration
- 32 or shorter are not available.
+ dit(code(dynamicDirection))indexcode(dynamicDirection) nl()
+ Determines location of dynamic marks. Set to code(\up) to print
+ marks above the staff; set to code(\down) to print marks below
+ the staff.
+
+ dit(code(dynamicStyle))indexcode(dynamicStyle) nl()
+ Set the text style for dynamics.
+
+ dit(code(fontSize))indexcode(fontSize) nl()
+ Can be used to select smaller font sizes for music. The normal
+ font size bind(is)0, and the two smaller sizes are -1
+ bind(and)-2.
+
+
+ dit(code(forceHorizontalShift))indexcode(forceHorizontalShift) nl()
+ Force horizontal shift for collision resolution. It overrides
+ automatic collision resolution. The value is the shift amount
+ expressed in code(note_width), as set in the paper section.
+
+
+ dit(code(horizontalNoteShift))indexcode(horizontalNoteShift) nl()
+ Enable LilyPond to shift notes horizontally if they collide with
+ other notes. This is useful when typesetting many voices on one
+ staff. The identifier code(\shift)keyindex(shift) is defined to
+ enable this. Traditionally, the outer chords (the upmost and
+ downmost voices), should have no code(horizontalNoteShift).
+
+ dit(code(markScriptPadding))indexcode(markScriptPadding) nl()
+ Determines the extra space added between the mark and the closest
+ staff line or note.
+
+ dit(code(markDirection))indexcode(markDirection) nl()
+ Determines if marks should be printed above or below the staff.
+ Set to code(\up) to print marks above the staff; set to
+ code(\down) to print marks below the staff.
dit(code(midiInstrument))indexcode(midiInstrument) nl()
Sets the instrument for MIDI output. If this property is not set
appears in bind(section)ref(midilist). If you use a string which
is not listed, LilyPond will silently substitute piano.
- dit(code(transposing))indexcode(transposing) nl()
- Transpose the MIDI output. Set this property to the number of
- half-steps to transpose by.
dit(code(oldTieBehavior))indexcode(oldTieBehavior) nl()
Set bind(to)1 in order to get old tie behavior where ties would
connect unequal pitches. This property is deprecated, and its
use is not recommended.
- dit(code(verticalDirection))indexcode(verticalDirection) nl()
- Determines the direction of stems, subscripts, beams, slurs, and
- ties. Set to code(\down) to force them down, code(\up) to force
- them up, or code(\free) to let LilyPond decide. This can be used
- to distinguish between voices on the same staff. The
- code(\stemdown)keyindex(stemdown), code(\stemup)keyindex(stemup),
- and code(\stemboth)keyindex(stemboth) identifiers set this
- property.
-
+ dit(code(restStyle))indexcode(restStyle) nl()
+ Change the layout of rests shorter than quarter notes.
+ Currently, the standard layout code("") and mensural notation
+ code("mensural") are available. Mensural rests of duration
+ 32 or shorter are not available.
+
+ dit(code(scriptHorizontal))indexcode(scriptHorizontal) nl()
+ Put scripts left or right of note heads. Support for this is
+ limited. Accidentals will collide with scripts.
+
dit(code(slurVerticalDirection))indexcode(slurVerticalDirection) nl()
Set to code(\free) for free choice of slur direction, set to
code(\up) to force slurs up, set to code(\down) to force slurs
code(\slurdown)keyindex(slurdown), and
code(\slurboth)keyindex(slurboth) are available.
- dit(code(tieVerticalDirection))indexcode(tieVerticalDirection) nl()
- Set to code(\free) for free choice of tie direction, set to
- code(\up) to force ties up, set to code(\down) to force ties
- down.
dit(code(slurDash))indexcode(slurDash) nl()
Set bind(to)0 for normal slurs, bind(1)for dotted slurs, and a
code(\slurdotted)keyindex(slurdotted) are predefined to set the
first two settings.
- dit(code(horizontalNoteShift))indexcode(horizontalNoteShift) nl()
- Enable LilyPond to shift notes horizontally if they collide with
- other notes. This is useful when typesetting many voices on one
- staff. The identifier code(\shift)keyindex(shift) is defined to
- enable this. Traditionally, the outer chords (the upmost and
- downmost voices), should have no code(horizontalNoteShift).
+dit(code(stemLength))indexcode(stemLength) nl()
+ Set length of stems. Unit is `code(interline)/2', so
+ code(stemLength) defaults bind(to)7.
- dit(code(forceHorizontalShift))indexcode(forceHorizontalShift) nl()
- Force horizontal shift for collision resolution. It overrides
- automatic collision resolution. The value is the shift amount
- expressed in code(note_width), as set in the paper section.
+ dit(code(stemLeftBeamCount))indexcode(stemLeftBeamCount) nl()
+ Specify the number of beams to draw on the left side of the next
+ note. Overrides automatic beaming. The value is only used once,
+ and then it is erased.
- dit(code(dynamicDirection))indexcode(dynamicDirection) nl()
- Determines location of dynamic marks. Set to code(\up) to print
- marks above the staff; set to code(\down) to print marks below
- the staff.
+ dit(code(stemRightBeamCount))indexcode(stemRightBeamCount) nl()
+ Specify the number of beams to draw on the right side of the next
+ note. Overrides automatic beaming. The value is only used once,
+ and then it is erased.
+ dit(code(tieVerticalDirection))indexcode(tieVerticalDirection) nl()
+ Set to code(\free) for free choice of tie direction, set to
+ code(\up) to force ties up, set to code(\down) to force ties
+ down.
- dit(code(dynamicStyle))indexcode(dynamicStyle) nl()
- Set the text style for dynamics.
+ dit(code(transposing))indexcode(transposing) nl()
+ Transpose the MIDI output. Set this property to the number of
+ half-steps to transpose by.
+
+ dit(code(textEmptyDimension))indexcode(textEmptyDimension) nl()
+ If set bind(to)1 then text placed above or below the staff is
+ assumed to have zero width.
+
dit(code(textStyle))indexcode(textStyle) nl()
Set the text style for superscripts and subscripts. See above
for list of text styles.
Determines the extra space added between superscripted resp.
subscripted text and the closest staff line or note.
- dit(code(fontSize))indexcode(fontSize) nl()
- Can be used to select smaller font sizes for music. The normal
- font size bind(is)0, and the two smaller sizes are -1
- bind(and)-2.
-
- dit(code(abbrev))indexcode(abbrev) nl()
- Set length for tremolo to be used if no length is explicitly
- specified.
+ dit(code(verticalDirection))indexcode(verticalDirection) nl()
+ Determines the direction of stems, subscripts, beams, slurs, and
+ ties. Set to code(\down) to force them down, code(\up) to force
+ them up, or code(\free) to let LilyPond decide. This can be used
+ to distinguish between voices on the same staff. The
+ code(\stemdown)keyindex(stemdown), code(\stemup)keyindex(stemup),
+ and code(\stemboth)keyindex(stemboth) identifiers set this
+ property.
+
dit(code(tupletDirection))indexcode(tupletDirection) nl()
Determines the direction of triplets and other tuplets. Set to
it adds a bracket; setting bind(to)4 shows both a number and a
bracket unconditionally.
- dit(code(markScriptPadding))indexcode(markScriptPadding) nl()
- Determines the extra space added between the mark and the closest
- staff line or note.
-
- dit(code(markDirection))indexcode(markDirection) nl()
- Determines if marks should be printed above or below the staff.
- Set to code(\up) to print marks above the staff; set to
- code(\down) to print marks below the staff.
-
- dit(code(articulationScriptPadding))indexcode(articulationScriptPadding)
- nl()
- Determines the extra space added between articulation marks, such
- as staccato, tenuto, trill, up/down bow or fermata, and the
- closest staff line or note.
-
- dit(code(articulationScriptVerticalDirection))
- indexcode(articulationScriptVerticalDirection) nl()
- Determines the location of articulation marks. Set to code(\up)
- to print marks above the staff; set to code(\down) to print marks
- below the staff. This property does not override explicit
- directions marked with `code(^)' or `code(_)' in the mudela file.
)
subsubsubsect(Staff properties)
cindex(properties!Staff)
description(
- dit(code(createInitdefaultClef))indexcode(createInitdefaultClef) nl()
- Specify whether clefs are created on default? (Doesn't seem to
- do anything.)
+
+ dit(code(barNonAuto))indexcode(barNonAuto) nl()
+ If set bind(to)1 then bar lines will not be printed
+ automatically; they must be explicitly created with code(\bar)
+ keywords. Unlike with the code(\cadenza) keyword, measures are
+ still counted. Bar generation will resume according to that
+ count if this property is set to zero.
dit(code(barNumberDirection))indexcode(barNumberDirection) nl()
Set to code(\up) or code(\down) to put bar numbers above or below
Specify the height of the bar lines if it should be different
than the staff height.
+ dit(code(barAtLineStart))indexcode(barAtLineStart) nl()
+ Set bind(to)1 to produce a bar line after the clef at the start
+ of each line (but not at the beginning of the music).
+
+ dit(code(clefStyle))indexcode(clefStyle) nl()
+ Determines how clefs are typeset. If set to code(transparent),
+ the clefs are not printed at all, if set to
+ code(fullSizeChanges), clef changes in the middle of a line are
+ typeset with a full size clef. By default, clef changes are
+ typeset in smaller size.
+
+ dit(code(createKeyOnClefChange))indexcode(createKeyOnClefChange) nl()
+ Set to a nonempty string if you want key signatures to be printed
+ when the clef changes. Set to the empty string if you do not
+ want key signatures printed.
+
+ dit(code(createInitdefaultClef))indexcode(createInitdefaultClef) nl()
+ Specify whether clefs are created on default? (Doesn't seem to
+ do anything.)
+
+ dit(code(defaultClef))indexcode(defaultClef) nl()
+ Determines the default clef. See code(\clef) keyword.
+
dit(code(markHangOnClef))indexcode(markHangOnClef) nl()
Set bind(to)1 to cause marks to appear by clefs instead of by bar
lines. Deprecated, use is not recommended.
Extra space in points to be added after the clef, time signature
and key signature on the staff. Deprecated, do not use.
- dit(code(barAtLineStart))indexcode(barAtLineStart) nl()
- Set bind(to)1 to produce a bar line after the clef at the start
- of each line (but not at the beginning of the music).
-
dit(code(noVoltaBraces))indexcode(noVoltaBraces) nl()
Set to true to suppress the printing of brackets over alternate
endings specified by the command code(\alternative).
- dit(code(voltaSpannerDuration))indexcode(voltaSpannerDuration) nl()
- Set to an integer to control the size of the brackets printed by
- code(\alternative). The integer specifies the number of whole
- notes duration to use for the brackets. It is rounded to the
- nearest measure. This can be used to shrink the length of
- brackets in the situation where one alternative is very large.
- It may have odd effects if the specified duration is longer than
- the music given in an code(\alternative).
-
- dit(code(barNonAuto))indexcode(barNonAuto) nl()
- If set bind(to)1 then bar lines will not be printed
- automatically; they must be explicitly created with code(\bar)
- keywords. Unlike with the code(\cadenza) keyword, measures are
- still counted. Bar generation will resume according to that
- count if this property is set to zero.
-
- dit(code(defaultClef))indexcode(defaultClef) nl()
- Determines the default clef. See code(\clef) keyword.
-
dit(code(numberOfStaffLines))indexcode(numberOfStaffLines) nl()
Sets the number of lines that the staff has.
Sets the default type of bar line. See bind(Section)ref(barlines)
for a list of available bar types.
+ dit(code(instrument), code(instr))
+ indexcode(instrument)indexcode(instr) nl()
+ If code(Staff_margin_engraver)cindex(Staff_margin_engraver) is
+ added to the Staff translator, then the code(instrument) property
+ is used to label the first line of the staff and the code(instr)
+ property is used to label subsequent lines. If the
+ code(midiInstrument) property is not set, then code(instrument)
+ is used to determine the instrument for MIDI output.
+
dit(code(keyOctaviation))indexcode(keyOctaviation) nl()
If set bind(to)1, then keys are the same in all octaves. If set
bind(to)0 then the key signature for different octaves can be
The default value bind(is)1. Can be set to zero with
code(\specialkey) or reset bind(to)1 with code(\normalkey).
- dit(code(instrument), code(instr))
- indexcode(instrument)indexcode(instr) nl()
- If code(Staff_margin_engraver)cindex(Staff_margin_engraver) is
- added to the Staff translator, then the code(instrument) property
- is used to label the first line of the staff and the code(instr)
- property is used to label subsequent lines. If the
- code(midiInstrument) property is not set, then code(instrument)
- is used to determine the instrument for MIDI output.
-
- dit(code(createKeyOnClefChange))indexcode(createKeyOnClefChange) nl()
- Set to a nonempty string if you want key signatures to be printed
- when the clef changes. Set to the empty string if you do not
- want key signatures printed.
-
dit(code(timeSignatureStyle))indexcode(timeSignatureStyle) nl()
Changes the default two-digit layout for time signatures. The
following values are recognized:
}
)
- dit(code(clefStyle))indexcode(clefStyle) nl()
- Determines how clefs are typeset. If set to code(transparent),
- the clefs are not printed at all, if set to
- code(fullSizeChanges), clef changes in the middle of a line are
- typeset with a full size clef. By default, clef changes are
- typeset in smaller size.
+ dit(code(voltaSpannerDuration))indexcode(voltaSpannerDuration) nl()
+ Set to an integer to control the size of the brackets printed by
+ code(\alternative). The integer specifies the number of whole
+ notes duration to use for the brackets. It is rounded to the
+ nearest measure. This can be used to shrink the length of
+ brackets in the situation where one alternative is very large.
+ It may have odd effects if the specified duration is longer than
+ the music given in an code(\alternative).
)
subsubsect(GrandStaff properties)
-
-
WHAT'S NEW?
* Large cleanups, enhanced design and GUILE integration for smaller
Grep -i for TODO, FIXME and ugh/ugr/urg.
.* TODO
-. * don't take Dimension_cache::offset in Dimension_cache::extent
+. * use Rhythmic_head::position_i () for all Staff_referenced
. * Break_req handling is silly (break_forbid () + \break fucks up.)
-. * redo all --help messages.
+. * script engraver
+
. * HaraKiriStaffContext removes bar lines and doesn't remove
staff margin text on removed staff lines.
. * Mondrup:
-- I would like to avoid that ties across line breaks run _through_ the
-clef on the new line
-
- I would like the possibility of forcing clef- and key- changes to be
printed _after_ the new bar line
bar line fully drawn across the staves and after that keep to the
ChoirStaff bar line types in the rest of the scores
-- I would like to be able to define invisible melismatic slurs in order
-to avoid printing slurs conflicting with an original ms of printing. Of
-course I can achieve that by just inserting empty syllables in the
-lyrics. But this facility implemented in the MusiXTeX preprocessor M-tx
-is nice so ...
-
-- if I explicitly beam notes in a staff with auto beaming disabled I
+. * autoBeamMelisma: if I explicitly beam notes in a staff with auto beaming disabled I
would like to have these beams also to be melismatic.
-- do I need to get warnings on 'No one to print a repeat brace' when I
-issue a '\repeat fold 2 \alternative' statement with an empty leading
-text item in a \lyrics context in order to achieve multiple lyrics lines
-in a _section_ of a score ?
. * make all Feta (including dynamics) available to the user in
textual scripts. Examples: "D.S. al \coda", "\mf espress.".
. * Key_engraver, Local_key_item
. * Think of comprehensive solution for "if (grace_b == self_grace_b_)"
. * String[String.length] doesn't trap.
-. * y dimension units: staffspace vs. Point
. * Beam
. * Stem
. * Rhythmic_column and interaction stem/rhythmic_column/note_head/dots.
.* STUFF
. * We need feta-din*.mf files for more sizes than 10.
. *
-- It's clumsy to have to set Staff.instr = " " to get instrument name
- on only the first line.
-
- The syntax for chords looks clumsy with two different meanings of
'-' and different syntax for separating modifiers from the tonic
and from other modifiers. Why not use for example ':' between
# ugh autoconf
# urg, egcs: how to check for egcs >= 1.1?
changequote(<<, >>)dnl
- if $CXX --version | grep '2\.8' > /dev/null ||
+ if $CXX --version | egrep '2\.8|2\.9' > /dev/null ||
$CXX --version | grep 'egcs' > /dev/null
changequote([, ])dnl
then
AC_DEFINE(HAVE_LIBGUILE)], , $GUILE_LDFLAGS dnl
)
if test "$ac_cv_lib_guile_gh_scm2doubles" != yes ; then
- GUILE_LDFLAGS="`echo $GUILE_LDFLAGS | sed -e 's/-lreadline//g'`"
- AC_CHECK_LIB(guile, gh_doubles2scm,
- [LIBS="`echo $GUILE_LDFLAGS | sed -e 's/-L[[/-_a-zA-Z0-9]]\+ //g'` $LIBS"
- AC_DEFINE(HAVE_LIBGUILE)], , $GUILE_LDFLAGS dnl
- )
- if test "$ac_cv_lib_guile_gh_doubles2scm" != yes ; then
- AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
- fi
+ AC_STEPMAKE_WARN(You should install guile 1.3 or newer)
fi
])
AC_SUBST(GTK___CFLAGS)
AC_SUBST(GTK___LIBS)
])
-
-dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
-dnl
-dnl This macro runs the `guile-config' script, installed with Guile,
-dnl to find out where Guile's header files and libraries are
-dnl installed. It sets two variables, marked for substitution, as
-dnl by AC_SUBST.
-dnl
-dnl GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
-dnl code that uses Guile header files. This is almost
-dnl always just a -I flag.
-dnl
-dnl GUILE_LDFLAGS --- flags to pass to the linker to link a
-dnl program against Guile. This includes `-lguile' for
-dnl the Guile library itself, any libraries that Guile
-dnl itself requires (like -lqthreads), and so on. It may
-dnl also include a -L flag to tell the compiler where to
-dnl find the libraries.
-
-AC_DEFUN([GUILE_FLAGS],[
-## The GUILE_FLAGS macro.
- ## First, let's just see if we can find Guile at all.
- AC_MSG_CHECKING(for Guile)
- guile-config link > /dev/null || {
- echo "configure: cannot find guile-config; is Guile installed?" 1>&2
- exit 1
- }
- GUILE_CFLAGS="`guile-config compile`"
- GUILE_LDFLAGS="`guile-config link`"
- AC_SUBST(GUILE_CFLAGS)
- AC_SUBST(GUILE_LDFLAGS)
- AC_MSG_RESULT(yes)
-])
-
label = tags[0]
name = tags[1]
afm = self.afmfile
- print tags
+
if tags[0] == 'font':
self.texfile.write("% name\n")
xdim = tags[3:5]
ydim = tags[5:7]
- self.texfile.write("\\fetdef\\%s{%s}\n" % (texstr, code))
+ self.texfile.write("\\def\\feta%s{\\char%s}\n" % (texstr, code))
afm.def_symbol (code, id, texstr, xdim, ydim)
else:
raise 'unknown label: ' + label
testvar LILYPONDPREFIX lily $LILYPOND_SOURCEDIR
testvar MFINPUTS lily .:$MFINPUTS:$LILYPOND_SOURCEDIR/mf
testvar TEXINPUTS lily .:$TEXINPUTS:$LILYPOND_SOURCEDIR/ps:$LILYPOND_SOURCEDIR/tex
-testvar GS_LIB lily $HOME/usr/src/lilypond/ps
testvar GS_FONTPATH lily $HOME/usr/src/lilypond/mf/out
-testvar GUILE_LOAD_PATH lily $HOME/usr/src/lilypond/init
testvar MAILADDRESS "@" $USER@`hostname`
echo
echo Starting configuration
echo
-(set -x; TEX_TFMDIR=$TEX_TFMDIR ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise --enable-guile)
+(set -x; TEX_TFMDIR=$TEX_TFMDIR ./configure --prefix=$prefix --enable-debugging --enable-printing --enable-checking --disable-optimise)
--- /dev/null
+
+\score {
+\notes {\property Thread.scriptHorizontal = "1"
+ c4-4
+ }
+ \paper { \translator {
+ \VoiceContext
+ \remove Script_engraver;
+ \remove Text_engraver;
+
+ }
+ \translator {
+ \ThreadContext
+ \consists Script_engraver;
+ \consists Text_engraver;
+ }
+ }
+}
Link_array<Score_element> elems;
for (int i=0; i < elem_l_arr_.size(); i++)
{
- Interval y = elem_l_arr_[i]->extent(axis ());
+ Interval y = elem_l_arr_[i]->extent(axis ()) + elem_l_arr_[i]->relative_coordinate (this, axis ());
if (!y.empty_b())
{
-
Score_element *e =dynamic_cast<Score_element*>(elem_l_arr_[i]);
// todo: fucks up if item both in Halign & Valign.
}
int
-Align_element::get_priority (Score_element* e) const
+Align_element::get_priority (Score_element const * e) const
{
- if ( priority_i_hash_.elem_b (e))
- return priority_i_hash_[e];
+ Score_element * nonconst = (Score_element*) e;
+ if ( priority_i_hash_.elem_b (nonconst))
+ return priority_i_hash_[nonconst];
else
- return elem_l_arr_.find_i (e);
+ return elem_l_arr_.find_i (nonconst);
}
/*
- axis-align-spanner.cc -- implement
+ axis-align-spanner.cc -- implement Axis_align_spanner
source file of the GNU LilyPond music typesetter
Axis_group_element::set_axes (Axis a1, Axis a2)
{
Graphical_axis_group::set_axes (a1,a2);
- dim_cache_[X_AXIS]->set_empty ((a1 != X_AXIS && a2 != X_AXIS));
- dim_cache_[Y_AXIS]->set_empty ((a1 != Y_AXIS && a2 != Y_AXIS));
+ set_empty (a1 != X_AXIS && a2 != X_AXIS, X_AXIS);
+ set_empty (a1 != Y_AXIS && a2 != Y_AXIS, Y_AXIS);
}
urg->purge_extra (); // Yeah yeah, const correctness.
for (int i=0; i < extra_elems_.size (); i++)
{
- Interval ge = extra_elems_[i]->extent (a);
- ge += extra_elems_[i]->relative_coordinate (dim_cache_[a], a);
+ Interval ge = extra_elems_[i]->relative_coordinate (this, a)
+ + extra_elems_[i]->extent (a);
g.unite (ge);
}
return g;
i++;
}
}
+
+Interval
+Axis_group_element::extent (Axis a) const
+{
+ return Graphical_element::extent (a);
+}
+
#include "paper-column.hh"
#include "paper-def.hh"
#include "dimension-cache.hh"
+
+
Bar_script_engraver::Bar_script_engraver ()
{
axis_ = Y_AXIS;
Bar_script_engraver::do_acknowledge_element (Item *i)
{
Axis other_axis = Axis((axis_ + 1)%2);
- if (staff_side_p_ && !staff_side_p_->dim_cache_[other_axis]->parent_l_)
+ if (staff_side_p_ && !staff_side_p_->parent_l(other_axis))
{
- staff_side_p_->dim_cache_[other_axis]->parent_l_
- = i->dim_cache_[other_axis];
- staff_side_p_->dim_cache_[axis_]->parent_l_
- = i->dim_cache_[axis_];
+ staff_side_p_->set_parent (i,other_axis);
+ staff_side_p_->set_parent (i,axis_);
- if (!text_p_->dim_cache_[other_axis]->parent_l_)
- text_p_->dim_cache_[other_axis]->parent_l_ = i->dim_cache_[other_axis];
+ if (!text_p_->parent_l(other_axis))
+ text_p_->set_parent (i,other_axis);
staff_side_p_->add_support (i);
/*
}
if (type_str_ =="")
- dim_cache_[X_AXIS]->set_empty (true);
+ set_empty (true, X_AXIS);
}
*/
{
spanbar_p_ = get_span_bar_p();
- spanbar_p_->dim_cache_[Y_AXIS]->parent_l_ = bar_l_arr_[0]->dim_cache_[Y_AXIS];
+ spanbar_p_->set_parent (bar_l_arr_[0], Y_AXIS);
String visnam = String(name()) + "_visibility";
spanbar_p_->set_elt_property (visibility_lambda_scm_sym,
}
else
{
- spanbar_p_->dim_cache_[X_AXIS]->parent_l_ = bar_l_arr_[0]->dim_cache_[X_AXIS];
+ spanbar_p_->set_parent (bar_l_arr_[0], X_AXIS);
}
announce_element (Score_element_info (spanbar_p_,0));
Beam::add_stem (Stem*s)
{
#if 0
+ /*
+ should figure out why this didn't work.
+
+ --hwn.
+ */
if (!stems_.size ())
{
- dim_cache_[Y_AXIS]->parent_l_ = s->dim_cache_[Y_AXIS];
+ set_parent (s, Y_AXIS);
}
#endif
stems_.push (s);
mol_p->add_molecule (sb);
}
mol_p->translate_axis (x0
- - spanned_drul_[LEFT]->absolute_coordinate (X_AXIS), X_AXIS);
+ - spanned_drul_[LEFT]->relative_coordinate (0, X_AXIS), X_AXIS);
return mol_p;
}
cout << "Controls: ";
for (int i=0; i < control_.size (); i++)
cout << control_[i].str () << ", ";
-// cout << "\n";
}
}
#endif
Real pre_space = elems[0]->extent (X_AXIS)[LEFT]
- + elems[0]->relative_coordinate (column_l ()->dim_cache_[X_AXIS], X_AXIS);
+ + elems[0]->relative_coordinate (column_l (), X_AXIS);
Real spring_len = elems.top ()->extent (X_AXIS)[RIGHT]
- + elems.top ()->relative_coordinate (column_l ()->dim_cache_[X_AXIS], X_AXIS);
+ + elems.top ()->relative_coordinate (column_l (), X_AXIS);
Real stretch_distance =0.;
this is quite ridiculous, but we do this anyway, to ensure that no
warning bells about missing Y refpoints go off later on.
*/
- hg->dim_cache_[Y_AXIS]->parent_l_ = dim_cache_[Y_AXIS];
+ hg->set_parent (this, Y_AXIS);
hg->set_elt_property (ly_symbol ("origin"), ly_ch_C_to_scm (it->name ()));
pscore_l_->typeset_element (hg);
Breathing_sign::Breathing_sign ()
{
- vertical_position_i_ = UP;
+ dir_ = UP;
set_elt_property (breakable_scm_sym, SCM_BOOL_T);
set_elt_property (break_priority_scm_sym, gh_int2scm (-4));
set_elt_property (visibility_lambda_scm_sym,
assert(updown >= -1 && updown <= +1);
if(updown != 0)
- vertical_position_i_ = updown;
+ dir_ = updown;
}
Molecule*
{
Real dl = staff_line_leading_f();
- translate_axis(2.0 * dl * vertical_position_i_, Y_AXIS);
+ translate_axis(2.0 * dl * dir_, Y_AXIS);
}
void
Clef_item::do_pre_processing()
{
- dim_cache_[Y_AXIS]->translate (y_position_i_ * staff_line_leading_f () / 2.0);
+ translate_axis (y_position_i_ * staff_line_leading_f () / 2.0, Y_AXIS);
SCM style_sym =get_elt_property (style_scm_sym);
String style;
if (style_sym != SCM_BOOL_F)
if (style == "transparent")
{
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- dim_cache_[X_AXIS]->set_empty (true);
+ set_empty (true, X_AXIS);
}
}
g->text_str_ = "8";
g->style_str_ = "italic";
- g->dim_cache_[Y_AXIS]->parent_l_ = dim_cache_[Y_AXIS];
- g->dim_cache_[X_AXIS]->parent_l_ = dim_cache_[X_AXIS];
+ g->set_parent (this, Y_AXIS);
+ g->set_parent (this, X_AXIS);
+
add_dependency (g); // just to be sure.
Real r = do_height ()[d] - g->extent (Y_AXIS)[-d];
if (Note_column * c = dynamic_cast<Note_column *> (i.elem_l_))
{
/*should check Y axis? */
- if (c->rest_b () || c->dim_cache_[X_AXIS]->parent_l_)
+ if (c->rest_b () || c->parent_l(X_AXIS))
return ;
note_column_l_arr_.push (c);
bool merge =
downpos == uppos
&& nu_l->balltype_i_ == nd_l->balltype_i_
- && nu_l->dots_i_ == nd_l->dots_i_;
+ && nu_l->dots_i () == nd_l->dots_i ();
/*
notes are close, but can not be merged. Shift
}
bool
-Cadenza_req::do_equal_b (Request*r) const
+Cadenza_req::do_equal_b (Request const *r) const
{
- Cadenza_req*cad = dynamic_cast <Cadenza_req *> (r);
+ Cadenza_req*cad = dynamic_cast <Cadenza_req const *> (r);
return cad && cad->on_b_ == on_b_;
}
bool
-Bar_req::do_equal_b (Request*r) const
+Bar_req::do_equal_b (Request const *r) const
{
- Bar_req * b = dynamic_cast <Bar_req *> (r);
+ Bar_req * b = dynamic_cast <Bar_req const *> (r);
return b && type_str_ == b->type_str_;
}
}
bool
-Partial_measure_req::do_equal_b (Request* r) const
+Partial_measure_req::do_equal_b (Request const* r) const
{
- Partial_measure_req *p = dynamic_cast <Partial_measure_req *> (r);
+ Partial_measure_req *p = dynamic_cast <Partial_measure_req const*> (r);
return p&& p->length_mom_ == length_mom_;
}
bool
-Barcheck_req::do_equal_b (Request*r) const
+Barcheck_req::do_equal_b (Request const *r) const
{
- Barcheck_req *b = dynamic_cast<Barcheck_req*> (r);
+ Barcheck_req *b = dynamic_cast<Barcheck_req const*> (r);
return b;
}
}
bool
-Time_signature_change_req::do_equal_b (Request * r) const
+Time_signature_change_req::do_equal_b (Request const *r) const
{
Time_signature_change_req * m
- = dynamic_cast <Time_signature_change_req *> (r);
+ = dynamic_cast <Time_signature_change_req const*> (r);
return m && m->beats_i_ == beats_i_
&& one_beat_i_ == m->one_beat_i_;
bool
-Tempo_req::do_equal_b (Request *r) const
+Tempo_req::do_equal_b (Request const *r) const
{
- Tempo_req *t = dynamic_cast <Tempo_req *> (r);
+ Tempo_req *t = dynamic_cast <Tempo_req const*> (r);
return t&& t->dur_.length_mom ()== dur_.length_mom () && metronome_i_ == t->metronome_i_;
}
offset_ += x;
}
-
-Real
-Dimension_cache::absolute_coordinate () const
-{
- Real r = offset_;
- for (Dimension_cache * c = parent_l_;
- c; c = c->parent_l_)
- r += c->offset_;
- return r;
-}
-
-/*
- what *should* these functions *do* anyway.
- */
Real
-Dimension_cache::relative_coordinate (Dimension_cache *d) const
+Dimension_cache::relative_coordinate (Dimension_cache *refp) const
{
- Real r =0.0;
- if (d == this) // UGH
+ if (refp == this)
return 0.0;
- for (Dimension_cache* c = parent_l_;
- c != d;
- c = c->parent_l_)
- r += c->offset_;
- return r;
+ /*
+ We catch PARENT_L_ == nil case with this, but we crash if we did
+ not ask for the absolute coordinate (ie. REFP == nil.)
+
+ */
+ if (refp == parent_l_)
+ return offset_;
+ else
+ return offset_ + parent_l_->relative_coordinate (refp);
}
Dimension_cache *
-Dimension_cache::common_group (Dimension_cache const* s) const
+Dimension_cache::common_refpoint (Dimension_cache const* s) const
{
Link_array<Dimension_cache> my_groups;
for (Dimension_cache const *c = this; c ; c = c->parent_l_)
for (Dimension_cache const * d = s; !common && d; d = d->parent_l_)
common = (Dimension_cache const*)my_groups.find_l (d);
- return (Dimension_cache*)common;
+ return (Dimension_cache*) common;
}
}
}
-void
-Dimension_cache::set_dim (Interval v)
-{
- dim_ = v;
- valid_b_ = true;
-}
-
-
Interval
Dimension_cache::get_dim () const
{
}
r=dim_;
- if (!r.empty_b()) // float exception on DEC Alpha
- r += offset_;
return r;
}
callback_l_ =c;
}
-Real
-Dimension_cache::offset () const
-{
- return offset_;
-}
if (!dots_i_)
{
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- set_empty (true);
+ set_empty (true, X_AXIS, Y_AXIS);
}
}
*/
o_[Y_AXIS] += dir * slur_l->paper_l ()->get_var ("slur_y_free");
- Dimension_cache *common = stem_l->common_group (slur_l, Y_AXIS);
- Align_element * align = dynamic_cast<Align_element*> (common->element_l ());
+ Graphical_element *common = stem_l->common_refpoint (slur_l, Y_AXIS);
+ Align_element * align = dynamic_cast<Align_element*> (common);
if (align && align->axis() == Y_AXIS)
{
if (align->threshold_interval_[MIN] !=
interstaff_f_ = align->threshold_interval_[MIN];
- Dimension_cache * slur_refpoint = slur_l->dim_cache_[Y_AXIS];
- Dimension_cache * note_refpoint = note_column->dim_cache_[Y_AXIS];
-
- while (slur_refpoint->parent_l_ != common)
- slur_refpoint = slur_refpoint->parent_l_;
- while (note_refpoint->parent_l_ != common)
- note_refpoint = note_refpoint->parent_l_;
+ Graphical_element const * slur_refpoint = slur_l;
+ while (slur_refpoint->parent_l (Y_AXIS) != common)
+ slur_refpoint = slur_refpoint->parent_l (Y_AXIS);
+ Graphical_element const * note_refpoint = note_column;
+ while (note_refpoint->parent_l (Y_AXIS) != common)
+ note_refpoint = note_refpoint->parent_l (Y_AXIS);
int slur_prio =
- align->get_priority (dynamic_cast<Score_element*> (slur_refpoint->element_l ()));
+ align->get_priority ((Score_element*) dynamic_cast<Score_element const*> (slur_refpoint));
int stem_prio =
- align->get_priority (dynamic_cast<Score_element*> (note_refpoint->element_l ()));
+ align->get_priority ((Score_element*) dynamic_cast<Score_element const *> (note_refpoint));
/*
our staff is lower -> interstaff_f_ *= -1
/*
- global-ctor.cc -- implement
+ global-ctor.cc -- implement global constructors
source file of the GNU LilyPond music typesetter
/*
- global-translator.cc -- implement
+ global-translator.cc -- implement Global_translator
source file of the GNU LilyPond music typesetter
*/
int prev_break_i_;
+ /**
+ Which system number so far?
+ */
int line_i_;
+
Real energy_f_;
Column_x_positions line_config_;
+
Break_node ()
{
prev_break_i_ = -1;
/**
This algorithms is adapted from the OSU Tech report on breaking lines.
-
*/
-
Array<Column_x_positions>
Gourlay_breaking::do_solve () const
{
optimal_paths[0] = first_node;
int break_idx=1;
-
for (; break_idx< breaks.size (); break_idx++)
{
Array<int> candidates;
if (optimal_paths[start_idx].prev_break_i_ < 0
&& optimal_paths[start_idx].line_config_.energy_f_)
-
continue;
-
+
+
+
Line_of_cols line = all.slice (breaks[start_idx], breaks[break_idx]+1);
line[0] = dynamic_cast<Paper_column*>(line[0]->find_prebroken_piece (RIGHT));
if (ae)
ae->remove_element (align_l_);
else if (elt)
- align_l_->dim_cache_[X_AXIS]->parent_l_ = 0;
+ align_l_->set_parent (0, X_AXIS);
last_musical_col_l_->add_element (align_l_);
}
Graphical_axis_group at one time. */
Graphical_axis_group::Graphical_axis_group(Graphical_axis_group const&s)
{
-#if 0
- /*
- gcc-2.95: huh? why can't i assign a const value to a var?
- graphical-axis-group.cc:20: incompatible types in assignment of `const Axis[2]' to `Axis[2]'
- */
- axes_ = s.axes_;
-#else
axes_[0] = s.axes_[0];
axes_[1] = s.axes_[1];
-#endif
ordered_b_ = s.ordered_b_;
}
Graphical_axis_group::extent (Axis axis) const
{
Interval r;
- for (int i=0; i < elem_l_arr_.size(); i++)
- r.unite (elem_l_arr_[i]->extent (axis));
+ for (int i=0; i < elem_l_arr_.size(); i++)
+ {
+ r.unite (elem_l_arr_[i]->extent (axis)
+ + elem_l_arr_[i]->relative_coordinate (this, axis)
+ );
+ }
return r;
}
{
Axis a = axes_[i];
assert (a>=0);
- Dimension_cache * &d = e->dim_cache_[a]->parent_l_;
- assert (!d || d == dim_cache_[a]);
- d = dim_cache_[a];
- d->dependencies_l_arr_.push (dim_cache_[a]);
+ assert (!e->parent_l (a) || this == e->parent_l (a));
+ e->set_parent (this, a);
+
+ e->dim_cache_[a]->dependencies_l_arr_.push (dim_cache_[a]);
}
elem_l_arr_.push (e);
dim_cache_[X_AXIS]->elt_l_ = dim_cache_[Y_AXIS]->elt_l_ = this;
}
-Real
-Graphical_element::absolute_coordinate (Axis a) const
-{
- return dim_cache_[a]->absolute_coordinate ();
-}
void
Graphical_element::translate_axis (Real y, Axis a)
}
Real
-Graphical_element::relative_coordinate (Dimension_cache*e, Axis a) const
+Graphical_element::relative_coordinate (Graphical_element const*e, Axis a) const
{
- return dim_cache_[a]->relative_coordinate (e);
+ return dim_cache_[a]->relative_coordinate (e ? e->dim_cache_[a] : 0);
}
-Dimension_cache *
-Graphical_element::common_group (Graphical_element const* s, Axis a) const
+Graphical_element *
+Graphical_element::common_refpoint (Graphical_element const* s, Axis a) const
{
- return dim_cache_[a]->common_group (s->dim_cache_[a]);
+ return (dim_cache_[a]->common_refpoint (s->dim_cache_[a])) ->element_l ();
}
void
void
-Graphical_element::set_empty (bool b)
+Graphical_element::set_empty (bool b, Axis a1, Axis a2)
{
- dim_cache_[X_AXIS]->set_empty (b);
- dim_cache_[Y_AXIS]->set_empty (b);
+ if (a1 != NO_AXES)
+ dim_cache_[a1]->set_empty (b);
+ if (a2 != NO_AXES)
+ dim_cache_[a2]->set_empty (b);
+}
+
+/**
+ Return true if empty in either direction.
+ */
+bool
+Graphical_element::empty_b (Axis a1, Axis a2)
+{
+ bool b = false;
+ if (a1 != NO_AXES)
+ b = b || dim_cache_[a1]->empty_b ();
+ if (a2 != NO_AXES)
+ b = b || dim_cache_[a2]->empty_b ();
+ return b;
}
Interval
delete dim_cache_[Y_AXIS];
}
-Dimension_cache *
-Graphical_element::common_group (Link_array<Graphical_element> gs, Axis a) const
+Graphical_element *
+Graphical_element::common_refpoint (Link_array<Graphical_element> gs, Axis a) const
{
Dimension_cache * common = dim_cache_[a];
for (int i=0; i < gs.size (); i++)
{
- common = common->common_group (gs[i]->dim_cache_[a]);
+ common = common->common_refpoint (gs[i]->dim_cache_[a]);
}
- return common;
+ return common->element_l ();
}
char const *
DOUT << "}\n";
#endif
}
+
+void
+Graphical_element::set_parent (Graphical_element *g, Axis a)
+{
+ dim_cache_[a]->parent_l_ = g ? g->dim_cache_[a]: 0;
+}
for (int i = 0; i < childs.size (); i++)
{
childs[i]->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- childs[i]->set_empty (true);
+ childs[i]->set_empty (true, X_AXIS, Y_AXIS);
+
}
set_empty (true);
}
bool contains_b (Score_element const*) const;
Score_element *get_elt_by_priority (int) const;
- int get_priority (Score_element*) const;
+ int get_priority (Score_element const*) const;
protected:
void sort_elements ();
virtual void do_print() const;
virtual Interval do_width () const;
-Interval extra_extent (Axis a ) const;
-
+ Interval extra_extent (Axis a) const;
+
+
public:
+ /**
+ Override Graphical_axis_group::extent: make sure that
+ Graphical_element::extent() is used as the public entry point. */
+ Interval extent (Axis a) const;
+
/**
add an element that only influences size, but does not have X/Y parent
relationship with THIS.
virtual Molecule* do_brew_molecule_p () const;
private:
- Direction vertical_position_i_;
+ Direction dir_;
};
#endif // BREATHING_SIGN_HH
/*
- change-iterator.hh -- declare
+ change-iterator.hh -- declare Change_iterator
source file of the GNU LilyPond music typesetter
protected:
virtual void do_print () const;
VIRTUAL_COPY_CONS(Music);
- bool do_equal_b (Request *) const;
+ bool do_equal_b (Request const *) const;
};
class Partial_measure_req : public Timing_req {
protected:
VIRTUAL_COPY_CONS(Music);
virtual void do_print () const;
- bool do_equal_b (Request*) const;
+ bool do_equal_b (Request const *) const;
};
/**
Time_signature_change_req();
protected:
virtual void do_print () const;
- bool do_equal_b (Request*) const;
+ bool do_equal_b (Request const *) const;
VIRTUAL_COPY_CONS(Music);
};
protected:
virtual void do_print () const;
- bool do_equal_b (Request*) const;
+ bool do_equal_b (Request const *) const;
VIRTUAL_COPY_CONS(Music);
};
/// check if we're at start of a measure.
class Barcheck_req : public Timing_req {
public:
- bool do_equal_b (Request *) const;
+ bool do_equal_b (Request const *) const;
VIRTUAL_COPY_CONS(Music);
};
Bar_req (String);
protected:
virtual void do_print () const;
- bool do_equal_b (Request*) const;
+ bool do_equal_b (Request const *) const;
VIRTUAL_COPY_CONS(Music);
};
typedef Interval (*Dim_cache_callback)(Dimension_cache *);
/**
- Adminstration of offset dimension info.
+ Adminstration of offset dimension info.
*/
class Dimension_cache
{
void init ();
public:
- Real offset () const;
void set_callback (Dim_cache_callback);
/** The #offset_# is defined with regard to this graphical_element/
dimension_cache. */
Dimension_cache * parent_l_;
Link_array<Dimension_cache> dependencies_l_arr_;
Graphical_element *element_l () { return elt_l_; }
- Real absolute_coordinate () const;
+
void invalidate ();
void invalidate_dependencies ();
Dimension_cache(Dimension_cache const&);
Dimension_cache ();
+
+ /**
+ Find the offset relative to D. If D equals THIS, then it is 0.
+ Otherwise, it recursively defd as
+
+ OFFSET_ + PARENT_L_->relative_coordinate (D)
+ */
Real relative_coordinate (Dimension_cache *d) const;
- Dimension_cache*common_group (Dimension_cache const* s) const;
- Dimension_cache*common_group (Link_array<Dimension_cache> caches) const;
+ Dimension_cache*common_refpoint (Dimension_cache const* s) const;
+ Dimension_cache*common_refpoint (Link_array<Dimension_cache> caches) const;
void set_empty (bool);
void translate (Real);
+
+ // junkme.
void set_offset (Real);
+
bool valid_b () const { return valid_b_; }
bool empty_b() const { return empty_b_; }
- void set_dim (Interval);
Interval get_dim () const;
};
/*
- file-results.hh -- declare
+ file-results.hh -- declare functions for processing one input file.
source file of the GNU LilyPond music typesetter
/*
- grace-engraver-group.hh -- declare
+ grace-engraver-group.hh -- declare Grace_engraver_group
source file of the GNU LilyPond music typesetter
/*
- grace-iterator.hh -- declare
+ grace-iterator.hh -- declare Grace_iterator
source file of the GNU LilyPond music typesetter
/*
- grace-music.hh -- declare
+ grace-music.hh -- declare Grace_music
source file of the GNU LilyPond music typesetter
/*
- grace-performer-group.hh -- declare
+ grace-performer-group.hh -- declare Grace_performer_group
source file of the GNU LilyPond music typesetter
#include "interval.hh"
#include "virtual-methods.hh"
-/** The 2d geometric aspects of a score-element. It was put in a
- separate class, because Score_element got quite big.
+/** The 2d geometric aspects of a score-element.
*/
class Graphical_element
{
bool used_b_;
char const * name () const;
- void set_empty (bool);
+ /**
+ Set empty in direction a1 and a2. If an argument is NO_AXES, it is ignored.
+ */
+ void set_empty (bool b, Axis a1 = NO_AXES, Axis a2 = NO_AXES);
+ bool empty_b (Axis a1 = NO_AXES, Axis a2 = NO_AXES);
Graphical_element ();
Graphical_element (Graphical_element const&);
virtual ~Graphical_element ();
void translate_axis (Real, Axis);
- Real relative_coordinate (Dimension_cache*group, Axis) const;
- Real absolute_coordinate (Axis) const;
+ Real relative_coordinate (Graphical_element const* refp, Axis) const;
/**
Find the group-element which has both #this# and #s#
*/
- Dimension_cache*common_group (Graphical_element const* s, Axis a) const;
- Dimension_cache*common_group (Link_array<Graphical_element> elems, Axis a) const;
+ Graphical_element*common_refpoint (Graphical_element const* s, Axis a) const;
+ Graphical_element*common_refpoint (Link_array<Graphical_element> elems, Axis a) const;
+
+ /**
+ Set the parent refpoint of THIS to E
+ */
+ void set_parent (Graphical_element* e, Axis);
Graphical_element *parent_l (Axis a) const;
/*
- key-def.hh -- declare
+ key-def.hh -- declare Key_def
source file of the GNU LilyPond music typesetter
/*
- lyric-combine-music-iterator.hh -- declare
+ lyric-combine-music-iterator.hh -- declare Lyric_combine_music_iterator
source file of the GNU LilyPond music typesetter
public:
Stem * stem_l_;
int balltype_i_;
- int dots_i_;
int position_i_;
Dots * dots_l_;
void add_dots (Dots *);
Rhythmic_head ();
+
+ int dots_i ()const;
+ virtual int position_i () const;
protected:
virtual void do_post_processing ();
- virtual void do_add_processing ();
+ virtual void do_pre_processing ();
virtual void do_print () const;
virtual void do_substitute_element_pointer (Score_element*,Score_element*);
};
/*
- single-malt-grouping-item.hh -- declare
+ single-malt-grouping-item.hh -- declare Single_malt_grouping_item
source file of the GNU LilyPond music typesetter
Staff_symbol * staff_symbol_l () const;
int lines_i () const;
virtual void do_substitute_element_pointer (Score_element*,Score_element*);
+
+ virtual int position_i () const;
};
#endif /* STAFF_SYM_REFERENCER_HH */
/*
- tie-performer.hh -- declare
+ tie-performer.hh -- declare Tie_performer
source file of the GNU LilyPond music typesetter
/*
- transposed-music.hh -- declare
+ transposed-music.hh -- declare Transposed_music
source file of the GNU LilyPond music typesetter
Real
Item::hpos_f() const
{
- return absolute_coordinate (X_AXIS);
+ return relative_coordinate (0, X_AXIS);
}
Line_of_score *
int empty = gh_scm2bool (gh_cdr (result));
if (empty)
- set_empty (true);
+ set_empty (true, X_AXIS, Y_AXIS);
if (trans)
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
Item * broken_self = find_prebroken_piece (d);
Item * broken_parent = parent->find_prebroken_piece (d);
- broken_self->dim_cache_[X_AXIS]->parent_l_ =
- broken_parent->dim_cache_[X_AXIS];
+ broken_self->set_parent (broken_parent, X_AXIS);
/*
ugh. Should do this is after breaking?
programming_error ("Vertical refpoint lost!");
else if (yparenti)
{
- broken_self->dim_cache_[Y_AXIS]->parent_l_ =
- broken_yparent->dim_cache_[Y_AXIS];
+ broken_self->set_parent (broken_yparent, Y_AXIS);
}
}
}
/*
scm_m_quote doesn't use any env, but needs one for a good signature in GUILE.
-
- Why there is no gh_quote () in GUILE beats me.
*/
SCM
ly_quote_scm (SCM s)
{
- return scm_cons2 (scm_i_quote, s, SCM_EOL);
+ return scm_m_quote (scm_cons2 (SCM_EOL, s, SCM_EOL) ,SCM_EOL); // apparently env arg is ignored.
}
/*
(c) 1999 Jan Nieuwenhuizen <janneke@gnu.org>
*/
-#include "config.hh"
+#include "config.h"
#include "version.hh"
#include "lily-version.hh"
#include "string.hh"
#include "main.hh"
#include "file-path.hh"
-#include "config.hh"
+#include "config.h"
#include "file-results.hh"
#include "debug.hh"
#include "lily-guile.hh"
VIRTUAL_COPY_CONS(Translator);
bool do_try_music (Music *);
};
+
ADD_THIS_TRANSLATOR(Melisma_engraver);
bool
Molecule *mol_p = new Molecule;
Real x_off = 0.0;
-
- // Dimension_cache * col_ref = spanned_drul_[LEFT]->column_l ()->dim_cache_[X_AXIS];
-
- Real rx = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
+ Real rx = spanned_drul_[LEFT]->relative_coordinate (0, X_AXIS);
/*
we gotta stay clear of sp_iv, so move a bit to the right if
needed.
Note_column::Note_column()
{
- set_axes (X_AXIS,X_AXIS);
+ set_axes (X_AXIS, Y_AXIS);
stem_l_ = 0;
}
iv.set_empty ();
for (int i=0; i <head_l_arr_.size ();i ++)
{
- int j = head_l_arr_[i]->position_i_;
+ int j = head_l_arr_[i]->position_i ();
iv.unite (Slice (j,j));
}
return iv;
{
invalidate_cache (Y_AXIS);
for (int i=0; i < rest_l_arr_.size(); i++)
- rest_l_arr_[i]->position_i_ += dy_i;
+ rest_l_arr_[i]->translate_axis (dy_i * rest_l_arr_[i]->staff_line_leading_f ()/2.0,
+ Y_AXIS);
}
void
Interval x_int;
for (int i=0; i < support_l_arr_.size(); i++)
{
- Dimension_cache *common =
- common_group (support_l_arr_[i], X_AXIS);
-
+ Graphical_element *common =
+ common_refpoint (support_l_arr_[i], X_AXIS);
Real x = support_l_arr_[i]->relative_coordinate (common, X_AXIS)
- relative_coordinate (common, X_AXIS);
void
Note_head::do_pre_processing ()
{
+ Rhythmic_head::do_pre_processing ();
// 8 ball looks the same as 4 ball:
if (balltype_i_ > 2)
balltype_i_ = 2;
if (dots_l_) // move into Rhythmic_head?
- dots_l_->position_i_ = position_i_;
+ dots_l_->position_i_ = position_i ();
}
int
Note_head::compare (Note_head *const &a, Note_head * const &b)
{
- return a->position_i_ - b->position_i_;
+ return a->position_i () - b->position_i ();
}
/**
Real inter_f = staff_line_leading_f ()/2;
int sz = lines_i ()-1;
- int streepjes_i = abs (position_i_) < sz
+ int streepjes_i = abs (position_i ()) < sz
? 0
- : (abs(position_i_) - sz) /2;
+ : (abs(position_i ()) - sz) /2;
String type;
if (streepjes_i)
{
- Direction dir = (Direction)sign (position_i_);
+ Direction dir = (Direction)sign (position_i ());
Interval hd = out->dim_[X_AXIS];
Real hw = hd.length ()/4;
= lookup_l ()->ledger_line (Interval (hd[LEFT] - hw,
hd[RIGHT] + hw));
- int parity = abs(position_i_) % 2;
+ int parity = abs(position_i ()) % 2;
for (int i=0; i < streepjes_i; i++)
{
}
out->dim_ = b;
- out->translate_axis (inter_f*position_i_, Y_AXIS);
return out;
}
Note_head *note_p = new Note_head;
Note_req * note_req_l = note_req_l_arr_[i];
note_p->balltype_i_ = note_req_l->duration_.durlog_i_;
- note_p->dots_i_ = note_req_l->duration_.dots_i_;
- if (note_p->dots_i_)
+
+ if (note_req_l->duration_.dots_i_)
{
Dots * d = new Dots;
note_p->dots_l_ = d;
announce_element (Score_element_info (d,0));
dot_p_arr_.push (d);
}
- note_p->position_i_ = note_req_l->pitch_.steps ();
+ note_p->position_i_ = note_req_l->pitch_.steps ();
if (noteheadstyle == "transparent")
note_p->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
if (!dir)
{
- warning ("Must set minimum distance between differing columns.");
+ programming_error ("Must set minimum distance between differing columns.");
return;
}
Rest_collision::Rest_collision()
{
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- set_empty (true);
+ set_empty (true, X_AXIS, Y_AXIS);
}
{
rest_p_ = new Rest;
rest_p_->balltype_i_ = rest_req_l_->duration_.durlog_i_;
- rest_p_->dots_i_ = rest_req_l_->duration_.dots_i_;
- if (rest_p_->dots_i_)
+
+ if (rest_req_l_->duration_.dots_i_)
{
dot_p_ = new Dots;
rest_p_->dots_l_ =dot_p_;
bool ledger_b =false;
if (balltype_i_ == 0 || balltype_i_ == 1)
- ledger_b = abs(position_i_ - (2* balltype_i_ - 1)) > lines_i ();
+ ledger_b = abs(position_i () - (2* balltype_i_ - 1)) > lines_i ();
Molecule s(lookup_l ()->rest (balltype_i_, ledger_b, style));
Molecule * m = new Molecule ( Molecule (s));
- m->translate_axis (position_i_ * staff_line_leading_f ()/2.0, Y_AXIS);
+
return m;
}
for (int i=0; i < rhead_l_arr_.size (); i++)
{
- if (!rhead_l_arr_[i]->dim_cache_[X_AXIS]->parent_l_)
+ if (!rhead_l_arr_[i]->parent_l(X_AXIS))
ncol_p_->add_head (rhead_l_arr_[i]);
}
rhead_l_arr_.set_size (0);
if (ncol_p_)
{
if (dotcol_l_
- && !dotcol_l_->dim_cache_[X_AXIS]->parent_l_)
+ && !dotcol_l_->parent_l(X_AXIS))
{
ncol_p_->set_dotcol (dotcol_l_);
}
if (stem_l_
- && !stem_l_->dim_cache_[X_AXIS]->parent_l_)
+ && !stem_l_->parent_l(X_AXIS))
{
ncol_p_->set_stem (stem_l_);
stem_l_ = 0;
/*
- rhythmic-head.cc -- implement
+ rhythmic-head.cc -- implement Rhythmic_head
source file of the GNU LilyPond music typesetter
#include "paper-score.hh"
#include "stem.hh"
+
+
+int
+Rhythmic_head::dots_i () const
+{
+ return dots_l_ ? dots_l_->dots_i_ : 0;
+}
+
void
-Rhythmic_head::do_add_processing ()
+Rhythmic_head::do_post_processing ()
{
- if (dots_i_ && !dots_l_)
- {
- assert (false);
- }
if (dots_l_)
{
- dots_l_->dots_i_ = dots_i_;
+ dots_l_->position_i_ = position_i ();
}
}
void
-Rhythmic_head::do_post_processing ()
+Rhythmic_head::do_pre_processing ()
{
- if (dots_l_)
- {
- dots_l_->position_i_ = position_i_;
- }
+ translate_axis (position_i_ * staff_line_leading_f () /2.0, Y_AXIS);
+ position_i_ = 0;
+}
+
+int
+Rhythmic_head::position_i () const
+{
+ return position_i_ + Staff_symbol_referencer::position_i ();
}
{
dots_l_ =0;
balltype_i_ =0;
- dots_i_ = 0;
stem_l_ =0;
position_i_ =0;
}
void
Rhythmic_head::do_substitute_element_pointer (Score_element*o,Score_element*n)
{
+ Staff_symbol_referencer::do_substitute_element_pointer (o,n);
if (o == dots_l_)
dots_l_ = dynamic_cast<Dots *> (n) ;
else if (o == stem_l_)
Rhythmic_head::do_print () const
{
#ifndef NPRINT
- DOUT << "balltype = "<< balltype_i_ << "dots = " << dots_i_;
+ DOUT << "balltype = "<< balltype_i_ << "dots = " << dots_i ();
#endif
}
delete output_p_;
output_p_ = do_brew_molecule_p ();
- Offset o (absolute_coordinate (X_AXIS), absolute_coordinate (Y_AXIS));
+ Offset o (relative_coordinate (0, X_AXIS), relative_coordinate (0, Y_AXIS));
pscore_l_->outputter_l_->output_molecule (output_p_,
o,
musical_column_l_->add_element(item_p);
}
}
- if (!elem_p->dim_cache_[Y_AXIS]->parent_l_)
+ if (!elem_p->parent_l(Y_AXIS))
scoreline_l_->add_element (elem_p);
}
elem_p_arr_.clear();
{
if (Item * item_l = dynamic_cast <Item *> (inf.elem_l_))
{
- Dimension_cache * c = item_l->dim_cache_[X_AXIS];
- if (c->empty_b () || c->parent_l_)
+ if (item_l->empty_b (X_AXIS) || item_l->parent_l (X_AXIS))
return;
bool breakable
if (!thing)
return;
- Dimension_cache * parcache = thing->dim_cache_[Y_AXIS]->parent_l_;
- if (!parcache || !thing)
- return ;
-
- Graphical_element *parent = parcache->element_l ();
+ Graphical_element *parent = thing->parent_l(Y_AXIS);
+
if (Staff_side_item * ss = dynamic_cast<Staff_side_item*>(parent))
{
- if (!ss->breakable_b ())
+ if (!ss->breakable_b () && ss->axis_ == Y_AXIS)
{
script_l_arr_.push (thing);
}
static Staff_side_item *
get_Staff_side (Item *i)
{
- Graphical_element *e1 = i->dim_cache_[Y_AXIS]->parent_l_->element_l ();
+ Graphical_element *e1 = i->parent_l(Y_AXIS);
return dynamic_cast<Staff_side_item*>(e1);
}
padding = (Real)paddingprop;
}
- if (follow_staff)
+
+ Scalar axisprop = get_property ("scriptHorizontal",0);
+ if (axisprop.to_bool ())
+ ss->axis_ = X_AXIS;
+
+ if (follow_staff && !axisprop.to_bool ())
ss->set_elt_property (no_staff_support_scm_sym, SCM_BOOL_T);
+
p->set_staff_side (ss);
ss->set_elt_property (script_priority_scm_sym, priority);
if (padding)
{
Staff_side_item * ss = dynamic_cast<Staff_side_item*>(staff_side_p_arr_[i]);
- if (!ss->dim_cache_[X_AXIS]->parent_l_)
+ if (!ss->parent_l (X_AXIS))
{
- ss->dim_cache_[X_AXIS]->parent_l_ = inf.elem_l_->dim_cache_[X_AXIS];
+ ss->set_parent (inf.elem_l_, X_AXIS);
}
ss->add_support (rh);
}
/*
center my self on the note head.
*/
- Graphical_element * e
- = staff_side_l_->dim_cache_[X_AXIS]->parent_l_->element_l();
+ Graphical_element * e = staff_side_l_->parent_l(X_AXIS);
translate_axis (e->extent (X_AXIS).center (), X_AXIS);
}
{
staff_side_l_ = g;
add_dependency (g);
- dim_cache_[Y_AXIS]->parent_l_ = g->dim_cache_[Y_AXIS];
+ set_parent (g, Y_AXIS);
}
Molecule*
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
// this is weird! , but needed!
- set_empty (true);
+ set_empty (true, X_AXIS, Y_AXIS);
+
}
void
Interval iv (il->extent (X_AXIS));
if (!iv.empty_b ())
{
- Real off = il->relative_coordinate (pc->dim_cache_[X_AXIS], X_AXIS);
+ Real off = il->relative_coordinate (pc, X_AXIS);
w.unite (iv + off);
}
}
if (prop.isnum_b ())
s_p->set_elt_property (dashed_scm_sym, gh_int2scm(prop));
+
requests_arr_.push (slur_req_l);
start_slur_l_arr_.push (s_p);
announce_element (Score_element_info (s_p, slur_req_l));
else
{
dx_f_drul_[d] = stem_l->hpos_f ()
- - spanned_drul_[d]->absolute_coordinate (X_AXIS);
+ - spanned_drul_[d]->relative_coordinate (0, X_AXIS);
/*
side attached to beamed stem
*/
*/
Stem* stem_l = note_column_drul[d]->stem_l_;
snapx_f_drul[d] = stem_l->hpos_f ()
- - spanned_drul_[d]->absolute_coordinate (X_AXIS);
+ - spanned_drul_[d]->relative_coordinate (0, X_AXIS);
snapy_f_drul[d] = stem_l->extent (Y_AXIS)[dir_];
snapy_f_drul[d] += info_drul[d].interstaff_f_;
snapy_f_drul[d] += dir_ * 2 * y_gap_f;
}
bool interstaff_b = interstaff_i && (interstaff_i < encompass_arr_.size ());
- Offset origin (absolute_coordinate (X_AXIS), 0);
+ Offset origin (relative_coordinate (0, X_AXIS), 0);
int first = 1;
int last = encompass_arr_.size () - 2;
evaluate_empty ();
- dim_cache_[Y_AXIS]->set_empty (false); // a hack to make mark scripts work.
+ set_empty (false, Y_AXIS); // a hack to make mark scripts work.
}
void
Span_bar::do_post_processing ()
{
Bar::do_post_processing ();
+ Interval i(get_spanned_interval ());
+
+ translate_axis (i.center (), Y_AXIS);
}
void
if (spanning_l_arr_.size () < 1)
{
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
- set_empty (true);
+ set_empty (true, X_AXIS, Y_AXIS);
+
}
if (type_str_.empty_b ())
{
Span_bar::get_spanned_interval () const
{
Interval y_int;
+
for (int i=0; i < spanning_l_arr_.size (); i++)
{
- Dimension_cache*common =
- common_group (spanning_l_arr_[i], Y_AXIS);
-
- Real y = spanning_l_arr_[i]->dim_cache_[Y_AXIS]->relative_coordinate (common)
- -dim_cache_[Y_AXIS]->relative_coordinate (common);
+ Graphical_element*common = common_refpoint (spanning_l_arr_[i], Y_AXIS);
+ Real y = spanning_l_arr_[i]->relative_coordinate (common, Y_AXIS)
+ - relative_coordinate (common, Y_AXIS);
y_int.unite (y + spanning_l_arr_[i]->extent(Y_AXIS));
}
if (!iv.empty_b())
{
output->add_molecule (lookup_l ()->bar (type_str_, iv.length (), paper_l ()));
- output->translate_axis (iv.center (), Y_AXIS);
}
else
{
Piano_bar_engraver::get_span_bar_p () const
{
Span_bar *s= new Span_bar;
- s->dim_cache_[X_AXIS]->set_empty (true);
+ s->set_empty (true, X_AXIS);
s->type_str_ = "brace";
return s;
}
Staff_group_bar_engraver::get_span_bar_p () const
{
Span_bar *s= new Span_bar;
- s->dim_cache_[X_AXIS]->set_empty (true);
+ s->set_empty (true, X_AXIS);
s->type_str_ = "bracket";
return s;
}
if (d== LEFT)
{
- dim_cache_[X_AXIS]->parent_l_ = i->dim_cache_[X_AXIS];
+ set_parent ( i, X_AXIS);
}
if (spanned_drul_[Direction(-d)] == spanned_drul_[d]
Interval
Spanner::do_width() const
{
- Real l = spanned_drul_[LEFT]->absolute_coordinate (X_AXIS);
- Real r = spanned_drul_[RIGHT]->absolute_coordinate (X_AXIS);
+ Real l = spanned_drul_[LEFT]->relative_coordinate (0, X_AXIS);
+ Real r = spanned_drul_[RIGHT]->relative_coordinate (0, X_AXIS);
if (r< l)
warning ("Spanner with negative length");
Spanner::handle_broken_dependents ()
{
Spanner *unbrok = dynamic_cast<Spanner*> (original_l_);
- if (!unbrok || dim_cache_[Y_AXIS]->parent_l_)
+ if (!unbrok || parent_l(Y_AXIS))
return;
Spanner *refpoint = dynamic_cast<Spanner*> (unbrok->parent_l (Y_AXIS));
{
Spanner * broken_refpoint = refpoint->find_broken_piece (line_l ());
if (broken_refpoint)
- dim_cache_[Y_AXIS]->parent_l_ = broken_refpoint->dim_cache_[Y_AXIS];
+ set_parent ( broken_refpoint,Y_AXIS);
else
programming_error ("Spanner y -refpoint lost.");
}
void
Spring_spacer::connect (int i, int j, Real d, Real h)
{
- assert(d >= 0 && d <= 100 CM);
+ if (d > 100 CM)
+ {
+ programming_error( _f("Improbable distance: %f point, setting to 10 mm", d));
+ d = 1 CM;
+ }
+ if(d < 0)
+ {
+ programming_error (_("Negative distance. Setting to 10 mm"));
+ d = 10 MM;
+ }
+
assert(h >=0);
Idealspacing * s = new Idealspacing;
String long_str = get_property ("instrument", 0);
- String str = get_property ("instr", 0);
- if (now_mom () > Moment (0) && str.length_i ())
- long_str = str;
+ String short_str = get_property ("instr", 0);
+ if (now_mom () > Moment (0))
+ long_str = short_str;
if (long_str.empty_b ())
return;
axis_ = Y_AXIS;
}
-
-
void
Staff_side_element::do_pre_processing ()
{
{
add_dependency (e);
to_position_l_ = e;
- to_position_l_->dim_cache_[axis_]->parent_l_ = dim_cache_[axis_];
+ to_position_l_->set_parent (this, axis_);
}
void
return;
Interval dim;
- Dimension_cache *common = 0;
+ Graphical_element *common = 0;
if (support_l_arr_.size ())
{
- common = common_group (typecast_array (support_l_arr_, (Graphical_element*)0),
- axis_);
+ common = common_refpoint (typecast_array (support_l_arr_, (Graphical_element*)0),
+ axis_);
for (int i=0; i < support_l_arr_.size (); i++)
{
}
}
else
- common = dim_cache_[axis_]->parent_l_;
+ common = parent_l (axis_);
if (dim.empty_b ())
{
? to_position_l_->extent (axis_)
: Interval(0,0);
- Real off = dim_cache_[axis_]->relative_coordinate (common);
+ Real off = relative_coordinate (common, axis_);
(c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
+#include <math.h>
+
#include "staff-symbol-referencer.hh"
#include "staff-symbol.hh"
#include "paper-def.hh"
+#include "dimension-cache.hh"
Staff_symbol_referencer::Staff_symbol_referencer ()
{
{
return (staff_sym_l_) ? staff_sym_l_->staff_line_leading_f_ : paper_l ()->get_realvar (interline_scm_sym);
}
+
+
+int
+Staff_symbol_referencer::position_i () const
+{
+ if (!staff_sym_l_ )
+ return 0;
+
+ Graphical_element * c = common_refpoint (staff_sym_l_, Y_AXIS);
+ Real y = relative_coordinate (c, Y_AXIS) - staff_sym_l_->relative_coordinate (c, Y_AXIS);
+
+ return int (2.0 * y / staff_line_leading_f ());
+}
// interstaff beam
Beam* beam_l = stem_l_->beam_l_;
- Dimension_cache *common = stem_l_->common_group (beam_l, Y_AXIS);
- Align_element * align = dynamic_cast<Align_element*> (common->element_l ());
+ Graphical_element *common = stem_l_->common_refpoint (beam_l, Y_AXIS);
+ Align_element * align = dynamic_cast<Align_element*> (common);
if (align && align->axis() == Y_AXIS)
{
if (align->threshold_interval_[MIN] !=
interstaff_f_ = align->threshold_interval_[MIN] / internote_f;
- Dimension_cache * beam_refpoint = beam_l->dim_cache_[Y_AXIS];
- Dimension_cache * stem_refpoint = stem_l_->dim_cache_[Y_AXIS];
+ Graphical_element * beam_refpoint = beam_l;
+ Graphical_element * stem_refpoint = stem_l_;
- while (beam_refpoint->parent_l_ != common)
- beam_refpoint = beam_refpoint->parent_l_;
- while (stem_refpoint->parent_l_ != common)
- stem_refpoint = stem_refpoint->parent_l_;
+ while (beam_refpoint->parent_l (Y_AXIS) != common)
+ beam_refpoint = beam_refpoint->parent_l (Y_AXIS);
+ while (stem_refpoint->parent_l (Y_AXIS) != common)
+ stem_refpoint = stem_refpoint->parent_l (Y_AXIS);
int beam_prio =
- align->get_priority (dynamic_cast<Score_element*> (beam_refpoint->element_l ()));
+ align->get_priority (dynamic_cast<Score_element*> (beam_refpoint));
int stem_prio =
- align->get_priority (dynamic_cast<Score_element*> (stem_refpoint->element_l ()));
+ align->get_priority (dynamic_cast<Score_element*> (stem_refpoint));
/*
our staff is lower -> interstaff_f_ *= -1
*/
if (get_elt_property (no_staff_support_scm_sym) != SCM_BOOL_F)
{
- Dimension_cache * c =common_group (staff_symbol_l (), Y_AXIS);
- Real staff_coord = staff_symbol_l ()->relative_coordinate (c, Y_AXIS) +
- staff_symbol_l ()->dim_cache_[Y_AXIS]->offset ();
- Real self_coord = relative_coordinate (c, Y_AXIS)
- + dim_cache_[Y_AXIS]->offset ();
+ Graphical_element * c =common_refpoint (staff_symbol_l (), Y_AXIS);
+ Real staff_coord = staff_symbol_l ()->relative_coordinate (c, Y_AXIS);
+ Real self_coord = relative_coordinate (c, Y_AXIS);
Real now_coord = self_coord - staff_coord;
Real desired_coord = ceil (dir_ * 2.0 * now_coord / staff_line_leading_f ());
Interval_t<int> r;
for (int i =0; i < head_l_arr_.size (); i++)
{
- int p = head_l_arr_[i]->position_i_;
+ int p = head_l_arr_[i]->position_i ();
r[BIGGER] = r[BIGGER] >? p;
r[SMALLER] = r[SMALLER] <? p;
}
head_l_arr_.top ()->set_elt_property (extremal_scm_sym, SCM_BOOL_T);
int parity=1;
- int lastpos = beginhead->position_i_;
+ int lastpos = beginhead->position_i ();
for (int i=1; i < head_l_arr_.size (); i ++)
{
- int dy =abs (lastpos- head_l_arr_[i]->position_i_);
+ int dy =abs (lastpos- head_l_arr_[i]->position_i ());
if (dy <= 1)
{
}
else
parity = 1;
- lastpos = head_l_arr_[i]->position_i_;
+ lastpos = head_l_arr_[i]->position_i ();
}
}
{
set_elt_property (transparent_scm_sym, SCM_BOOL_T);
}
- set_empty (invisible_b ());
+ set_empty (invisible_b (), X_AXIS, Y_AXIS);
set_spacing_hints ();
}
for (int i=0; i < positionings_.size (); i++)
{
positionings_[i]->add_support (n);
+ if (positionings_[i]->axis_ == X_AXIS
+ && !positionings_[i]->parent_l (Y_AXIS))
+ positionings_[i]->set_parent (n, Y_AXIS);
}
}
if (Stem *n = dynamic_cast<Stem*> (i.elem_l_))
Text_item *text = new Text_item;
Staff_side_item *ss = new Staff_side_item;
+
+
+ Scalar axisprop = get_property ("scriptHorizontal",0);
+ if (axisprop.to_bool ())
+ {
+ ss->axis_ = X_AXIS;
+ text->set_parent (ss, Y_AXIS);
+
+ }
ss->set_victim (text);
ss->set_elt_property (script_priority_scm_sym,
gh_int2scm (200));
Scalar empty = get_property ("textEmptyDimension", 0);
if (empty.to_bool ())
{
- text->dim_cache_[X_AXIS]->set_empty (true);
+ text->set_empty (true, X_AXIS);
}
-
+
announce_element (Score_element_info (text, r));
announce_element (Score_element_info (ss, r));
/*
- tie-performer.cc -- implement
+ tie-performer.cc -- implement Tie_performer
source file of the GNU LilyPond music typesetter
Direction
Tie::get_default_dir () const
{
- int m = (head_l_drul_[LEFT]->position_i_
- + head_l_drul_[RIGHT]->position_i_) /2;
+ int m = (head_l_drul_[LEFT]->position_i ()
+ + head_l_drul_[RIGHT]->position_i ()) /2;
/*
If dir is not determined: inverse of stem: down
for smal slurs
*/
- int ypos_i = head_l_drul_[LEFT] ? head_l_drul_[LEFT]->position_i_
- : head_l_drul_[RIGHT]->position_i_;
+ int ypos_i = head_l_drul_[LEFT] ? head_l_drul_[LEFT]->position_i ()
+ : head_l_drul_[RIGHT]->position_i ();
Real y_f = internote_f * ypos_i;
$(PYTHON) $(step-bindir)/add-html-footer.py --package=$(topdir) --index=$(depth)/../index.html $@ $(wildcard $(basename $@)[0-9][0-9].html)
$(outdir)/%.dvi: $(outdir)/%.texi
- cd $(outdir); texi2dvi --clean ../$<
+ # --clean only in >= 3.12s
+ # cd $(outdir); texi2dvi --clean ../$<
+ cd $(outdir); texi2dvi ../$<
#include <assert.h>
#include <locale.h>
-#include "config.hh"
+#include "config.h"
#include "string-convert.hh"
#include "getopt-long.hh"
#include "file-path.hh"
// copyright 1997 Jan Nieuwenhuizen <janneke@gnu.org>
#include <stdio.h>
-#include "config.hh"
+#include "config.h"
#include "version.hh"
#define VERSION_SZ MAJOR_VERSION "." MINOR_VERSION "." PATCH_LEVEL "." MY_PATCH_LEVEL
(define (select-font font-name magnification)
(if (not (equal? font-name current-font))
- (begin
+ (let* ((font-cmd (assoc font-name font-alist)))
(set! current-font font-name)
- (define font-cmd (assoc font-name font-alist))
(if (eq? font-cmd #f)
(begin
(set! font-cmd (cached-fontname font-count))
;;
;; need to do something to make this really safe.
;;
- (if security-paranoia
- (define (output-tex-string s)
- (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post))
- (define (output-tex-string s) s))
+ (define (output-tex-string s)
+ (if security-paranoia
+ (regexp-substitute/global #f "\\\\" s 'pre "$\\backslash$" 'post)
+ s))
+
(define (lily-def key val)
(string-append
(apply string-append (map control->string l))
(number->string thick)
" [ "
- (if (> 1 dash) (number->string (- (* thick dash) thick)) "0") " "
+ (if (> 1 dash)
+ (number->string (- (* thick dash) thick))
+ "0")
+ " "
(number->string (* 2 thick))
" ] 0 draw_dashed_slur"))
# ugh autoconf
# urg, egcs: how to check for egcs >= 1.1?
changequote(<<, >>)dnl
- if $CXX --version | grep '2\.8' > /dev/null ||
+ if $CXX --version | egrep '2\.8|2\.9' > /dev/null ||
$CXX --version | grep 'egcs' > /dev/null
changequote([, ])dnl
then
AC_SUBST(GTK___CFLAGS)
AC_SUBST(GTK___LIBS)
])
-
-dnl GUILE_FLAGS --- set flags for compiling and linking with Guile
-dnl
-dnl This macro runs the `guile-config' script, installed with Guile,
-dnl to find out where Guile's header files and libraries are
-dnl installed. It sets two variables, marked for substitution, as
-dnl by AC_SUBST.
-dnl
-dnl GUILE_CFLAGS --- flags to pass to a C or C++ compiler to build
-dnl code that uses Guile header files. This is almost
-dnl always just a -I flag.
-dnl
-dnl GUILE_LDFLAGS --- flags to pass to the linker to link a
-dnl program against Guile. This includes `-lguile' for
-dnl the Guile library itself, any libraries that Guile
-dnl itself requires (like -lqthreads), and so on. It may
-dnl also include a -L flag to tell the compiler where to
-dnl find the libraries.
-
-AC_DEFUN([GUILE_FLAGS],[
-## The GUILE_FLAGS macro.
- ## First, let's just see if we can find Guile at all.
- AC_MSG_CHECKING(for Guile)
- guile-config link > /dev/null || {
- echo "configure: cannot find guile-config; is Guile installed?" 1>&2
- exit 1
- }
- GUILE_CFLAGS="`guile-config compile`"
- GUILE_LDFLAGS="`guile-config link`"
- AC_SUBST(GUILE_CFLAGS)
- AC_SUBST(GUILE_LDFLAGS)
- AC_MSG_RESULT(yes)
-])
-
-$(configheader): $(depth)/config.h
- cp $< $@
TAGS_FILES += $(TCC_FILES) $(HH_FILES) $(INL_FILES) $(CC_FILES)
-# hmm
-configheader=$(outdir)/config.hh
CFLAGS = $(ICFLAGS) $(DEFINES) $(addprefix -I,$(INCLUDES)) $(USER_CFLAGS) $(EXTRA_CFLAGS) $(MODULE_CFLAGS)
-# hmm
-configheader=$(outdir)/config.h
default: $(EXECUTABLE)
-$(EXECUTABLE): $(configheader) $(O_FILES) $(outdir)/version.hh
+$(EXECUTABLE): $(depth)/config.h $(O_FILES) $(outdir)/version.hh
$(foreach a, $(MODULE_LIBS), $(MAKE) -C $(a) && ) true
$(LD_COMMAND) $(O_FILES) $(LOADLIBES)
#
ARFLAGS = ru
-INCLUDES = include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
+INCLUDES = $(depth) include $(outdir) $($(PACKAGE)_INCLUDES) $(MODULE_INCLUDES)
# urg: for windows ?
# LOADLIBES = $(MODULE_LIBES) $($(PACKAGE)_LIBES) $(EXTRA_LIBES) -lstdc++
default: $(LIBRARY)
-$(outdir)/library.a: $(configheader) $(O_FILES) $(MODULE_LIBES)
+$(outdir)/library.a: $(depth)/config.h $(O_FILES) $(MODULE_LIBES)
$(AR_COMMAND) $(O_FILES)
$(RANLIB_COMMAND)
-$(SHAREDLIBRARY): $(configheader) $(O_FILES) $(MODULE_LIBES)
+$(SHAREDLIBRARY): $(depth)/config.h $(O_FILES) $(MODULE_LIBES)
$(LD_COMMAND) $(O_FILES) -o $@.$(VERSION)
rm -f $@
ln -sf $(outdir)/$(LIB_PREFIX)$(NAME).so.$(VERSION) $@.$(MAJOR_VERSION)
% ``compiles'' operatorname binding in the body of foo, making
% the code faster, and more reliable (less flexible)
+
+%
+% TODO : use GUILE for this kind of muckery.
+%
+
{%
\def\par{ }% %Ugh. Don't try this at home, kids!
% neat file-include trick by Piet van Oostrum <piet@cs.uu.nl>
%
\def\botalign#1{\vbox to 0pt{\vss #1}}
\def\leftalign#1{\hbox to 0pt{#1\hss}}
+
+\input feta20.tex
\font\textmusic=cmmi10
\def\textsharp{\raise.4ex\hbox{\textmusic\char"5D}}
\def\textnatural{\raise.4ex\hbox{\textmusic\char"5C}}
+
% stacked horizontal lines
\def\interscoreline{\vskip 16pt}
\def\placebox#1#2#3{%