@subsubsection I've got a simple question, but this FAQ doesn't help!
-Please have a look in the searchable mail achives of
-@uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org/,
-gnu-music-discuss} and
-@uref{http://www.mail-archive.com/help-gnu-music@@gnu.org/, help-gnu-music}.
-Your question may well have been answered before.
+Please have a look in the searchable mail archives of gnu-music-discuss
+and help-gnu-music (see next FAQ entry). Your question may well have
+been answered before.
+
+@subsubsection Are there archives of the mailing list?
+
+Yes. Currently, all information on the mailing lists is available at
+gnu.org:
+
+@itemize
+@item @uref{http://mail.gnu.org/mailman/listinfo/gnu-music-discuss}
+@item @uref{http://mail.gnu.org/mailman/listinfo/info-gnu-music}
+@item @uref{http://mail.gnu.org/mailman/listinfo/bug-gnu-music}
+@item @uref{http://mail.gnu.org/mailman/listinfo/help-gnu-music}
+@end itemize
+
+Archives of mail before September 12, 2000 are at
+@code{mail-archive.com}:
+
+@itemize
+@item @uref{http://www.mail-archive.com/info-gnu-music@@gnu.org}
+@item @uref{http://www.mail-archive.com/help-gnu-music@@gnu.org}
+@item @uref{http://www.mail-archive.com/bug-gnu-music@@gnu.org})
+@item @uref{http://www.mail-archive.com/gnu-music-discuss@@gnu.org}
+@end itemize
@node Installing,, ,top
@section Installing
@end example
+@subsubsection How do I get a fermata on a barline
+
+The trick is to specify the fermata as a \mark. Use the following macro
+before the bar line where you want the fermata:
+
+@example
+barFermata = \mark "\\font\\fetafont=feta20\\fetafont\\char40";
+@end example
+
+The problem is that marks that occur at a line break are typeset only at
+the beginning of the next line, opposite to what you want for the
+fermata. This can be corrected by the following code
+
+@example
+ \property basicMarkProperties \push #'visibility-lambda = #begin-of-line-i\nvisible
+@end example
+
+You can use a similar trick to put coda signs and comma's on barline.
+
@subsubsection How do I combine multiple pieces into one document?
There are several solutions:
@cindex properties!Voice
-@table @samp
+@table @samp
@item @code{abbrev}@indexcode{abbrev} @propertytype{integer}
Set length for tremolo to be used if no length is explicitly
specified.
Note that the notes move, but the locations of accidentals stay
the same.
+ Vertical position of squashing can be controlled through
+@indexcode{squashedPosition}.
+
@item @code{Priority_horizontal_align_engraver}
@indexcode{Priority_horizontal_align_engraver}
--- /dev/null
+\score {
+ \notes \context Thread {
+ c1 \< c1 \break c1 c1 \! c1
+ }
+}
--- /dev/null
+%{
+
+Kludge for half-assed tab notation (you need to fill the numbers
+yourself.)
+
+%}
+
+bla = \notes \relative c' { <c4 e g> <c4. e g> <c8 f a> <c4 f a> <c1 e g> }
+
+\score { \notes
+<
+ \context Voice = BLA \bla
+ \context TabStaff \context Thread \bla
+>
+
+\paper {
+ \translator {
+ \StaffContext
+ \name TabStaff;
+ basicStaffSymbolProperties \push #'line-count = #6
+ \remove "Clef_engraver";
+ \remove "Time_signature_engraver";
+ \consists "Pitch_squash_engraver";
+ basicNoteHeadProperties \push #'transparent = ##t
+ basicNoteHeadProperties \push #'staff-position = #-6
+ basicDotsProperties \push #'transparent = ##t
+ squashedPosition = #-4
+ basicStemProperties \push #'length = #12
+}
+\translator {
+\ScoreContext
+\accepts TabStaff;
+}
+}
+}
void translate_axis (Real,Axis);
Interval extent (Axis) const;
+ Box extent_box () const;
/**
codify THIS into a Scheme expression.
*/
#include "lily-proto.hh"
#include "lily-guile.hh"
+/*
+ properties:
+
+ elements -- list of elts (both rests and notes) participating in the
+ collision.
+
+*/
class Rest_collision // interface
{
#include "smobs.hh"
#include "input.hh"
+/*
+ The definition of a interpretation context as given in the
+ input. The lists are stored in order of definition.
+*/
struct Translator_def : public Input
{
+private:
+ /*
+ these lists store the definition, in opposite order of entry
+ */
+
SCM consists_name_list_;
SCM end_consists_name_list_;
SCM accepts_name_list_;
SCM property_ops_;
+public:
SCM type_name_;
SCM translator_group_type_;
SCM modify_definition (SCM, SCM, bool);
+ SCM default_child_context_name ();
void set_acceptor (SCM accepts, bool add);
void add_element (SCM name);
static void apply_pushpop_property (Translator_group*, SCM syms, SCM eprop, SCM val);
SCM clone_scm ()const;
- DECLARE_SMOBS(Translator_def,foo);
-private:
+ void apply_property_operations (Translator_group*);
+private:
+ DECLARE_SMOBS(Translator_def,foo);
Translator_def ();
Translator_def (Translator_def const&);
events. Due to interaction with ties (which don't come together
with note heads), this needs to be in a context higher than Tie_engraver.
(FIXME).
- */
+
+ FIXME: should not compute vertical positioning of accidentals, but
+ get them from the noteheads
+
+*/
+
+
struct Local_key_engraver : Engraver {
Item *key_item_p_;
protected:
Side_position::add_support (key_item_p_,support_l);
}
- if (!forget)
+ /*
+ We should not record the accidental if it is the first
+ note and it is tied from the previous measure.
+
+ Checking whether it is tied also works mostly, but will it
+ always do the correct thing?
+
+ */
+ if (!forget && !tie_changes)
{
/*
not really really correct if there are more than one
gh_int2scm (n)),
gh_int2scm (a));
-#if 0
- /*
- TESTME!
- */
- if (!tied_l_arr_.find_l (support_l))
- {
- local_key_.clear_internal_forceacc (note_l->pitch_);
- }
- else if (tie_changes)
- {
- local_key_.set_internal_forceacc (note_l->pitch_);
- }
-#endif
}
}
gh_cons (ly_interval2scm (dim_[X_AXIS]),
ly_interval2scm (dim_[Y_AXIS])));
}
+
+Box
+Molecule::extent_box () const
+{
+ return dim_;
+}
void
Multi_measure_rest_engraver::do_post_move_processing ()
{
- Moment now (now_mom ());
-
SCM smp = get_property ("measurePosition");
Moment mp = (unsmob_moment (smp)) ? *unsmob_moment (smp) : Moment (0);
void
Multi_measure_rest::set_interface (Score_element*me)
{
- me->set_elt_property ("columns", SCM_EOL);
+ me->set_interface (ly_symbol2scm ("multi-measure-rest-interface"));
}
-/*
+bool
+Multi_measure_rest::has_interface (Score_element*me)
+{
+ return me->has_interface (ly_symbol2scm ("multi-measure-rest-interface"));
+}
+
+ /*
[TODO] 17
* variable-sized multi-measure rest symbol: |====| ??
*/
SCM style = me->get_elt_property ("style");
if (!gh_symbol_p (style))
{
- style = ly_symbol2scm("default");
+ return SCM_EOL;
}
-
// ugh: use gh_call ()
Molecule out = me->lookup_l()->afm_find (String ("noteheads-") +
void
Pitch_squash_engraver::acknowledge_element (Score_element_info i)
{
+ SCM newpos = get_property ("squashedPosition");
if (Note_head::has_interface (i.elem_l_))
{
- Staff_symbol_referencer::set_position (i.elem_l_,0);
+ i.elem_l_->set_elt_property ("staff-position", newpos);
}
}
mutable_property_alist_ = SCM_EOL;
smobify_self ();
- set_elt_property ("dependencies", SCM_EOL);
-
- if (get_elt_property ("interfaces") == SCM_UNDEFINED)
- set_elt_property ("interfaces", SCM_EOL);
}
if (gh_procedure_p (proc))
mol = gh_apply (proc, gh_list (this->self_scm (), SCM_UNDEFINED));
-
+
SCM origin =get_elt_property ("origin");
if (!unsmob_input (origin))
origin =ly_symbol2scm ("no-origin");
mol = gh_cons (gh_list (origin, gh_car (mol), SCM_UNDEFINED), gh_cdr (mol));
}
-
- return create_molecule (mol);
+
+ Molecule m (create_molecule (mol));
+
+ /*
+ This is almost the same as setting molecule-callback to #f, but
+ this retains the dimensions of this element, which means that you
+ can erase elements individually. */
+ if (to_boolean (get_elt_property ("transparent")))
+ m = Molecule (m.extent_box (), SCM_EOL);
+
+ return m;
}
Translator_def::set_acceptor (SCM name, bool add)
{
if (add)
- this->accepts_name_list_ = gh_append2 (this->accepts_name_list_, gh_cons (name, SCM_EOL));
+ this->accepts_name_list_ = gh_cons (name, this->accepts_name_list_);
else
this->accepts_name_list_ = scm_delete_x (name, this->accepts_name_list_);
}
Translator_def::add_push_property (SCM props, SCM syms, SCM vals)
{
this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, vals, SCM_UNDEFINED),
- this->property_ops_);
+ this->property_ops_);
}
void
Translator_def::add_pop_property (SCM props, SCM syms)
{
this->property_ops_ = gh_cons (gh_list (push_sym, props, syms, SCM_UNDEFINED),
- this->property_ops_);
+ this->property_ops_);
}
/*
accepted_arr.push (t);
}
-
Link_array<Translator_def> best_result;
for (int i=0; i < accepted_arr.size (); i++)
if (scm_equal_p (accepted_arr[i]->type_name_, type_str) == SCM_BOOL_T)
tg->output_def_l_ = md;
tg->definition_ = self_scm ();
tg->type_str_ = ly_scm2string (type_name_);
+ SCM l1 = trans_list (consists_name_list_, tg);
+ SCM l2 =trans_list (end_consists_name_list_,tg);
+ l1 = scm_reverse_x (l1, l2);
+
+ tg->simple_trans_list_ = l1;
+
+ return tg;
+}
+
+
+void
+Translator_def::apply_property_operations (Translator_group*tg)
+{
SCM correct_order = scm_reverse (property_ops_); // pity of the mem.
for (SCM s = correct_order; gh_pair_p (s); s = gh_cdr (s))
{
tg->set_property (gh_car(entry), gh_cadr (entry));
}
}
-
- SCM l1 = trans_list (consists_name_list_, tg);
- SCM l2 =trans_list (end_consists_name_list_,tg);
- l1 = scm_reverse_x (l1, l2);
-
- tg->simple_trans_list_ = l1;
-
- return tg;
}
SCM
this->property_ops_);
}
+/*
+ Default child context as a SCM string, or something else if there is
+ none.
+*/
+SCM
+Translator_def::default_child_context_name ()
+{
+ SCM d = accepts_name_list_;
+ return gh_pair_p (d) ? gh_car (scm_last_pair (d)) : SCM_EOL;
+}
return existing;
Link_array<Translator_def> path
- = unsmob_translator_def (definition_)->path_to_acceptable_translator (gh_str02scm (n.ch_C()), output_def_l ());
+ = unsmob_translator_def (definition_)->path_to_acceptable_translator (ly_str02scm ((char*)n.ch_C()), output_def_l ());
if (path.size ())
{
bool
Translator_group::is_bottom_translator_b () const
{
- return unsmob_translator_def (definition_)->accepts_name_list_ == SCM_EOL;
+ return !gh_string_p (unsmob_translator_def (definition_)->default_child_context_name ());
+
}
Translator_group*
{
if (!is_bottom_translator_b ())
{
- SCM nm = unsmob_translator_def (definition_)->accepts_name_list_;
- SCM st = output_def_l ()->find_translator_l (gh_car (nm));
+ SCM nm = unsmob_translator_def (definition_)->default_child_context_name ();
+ SCM st = output_def_l ()->find_translator_l (nm);
Translator_def *t = unsmob_translator_def (st);
if (!t)
void
Translator_group::do_add_processing ()
{
+ unsmob_translator_def (definition_)->apply_property_operations (this);
for (SCM s = simple_trans_list_; gh_pair_p (s) ; s = gh_cdr (s))
{
Translator * t = unsmob_translator (gh_car (s));
)
basicDynamicLineSpannerProperties = #`(
- (interfaces . (dynamic-interface axis-group-interface))
+ (interfaces . (dynamic-interface axis-group-interface side-position-interface))
(axes . ( 1))
(padding . 3)
(minimum-space . 6)
(name . "lyric syllable")
)
basicMarkProperties = #`(
- (interfaces . (mark-interface))
+ (interfaces . (mark-interface side-position-interface))
(molecule-callback . ,Text_item::brew_molecule)
(breakable . #t)
(visibility-lambda . ,end-of-line-invisible)
)
basicNoteHeadProperties = #`(
(interfaces . (note-head-interface rhythmic-head-interface))
+ (style . default)
(molecule-callback . ,Note_head::brew_molecule)
(name . "note head")
)
)
basicScriptProperties = #`(
(molecule-callback . ,Script::brew_molecule)
- (interfaces . (script-interface))
+ (interfaces . (script-interface side-position-interface))
(name . "script")
)
basicScriptColumnProperties = #`(
basicTextScriptProperties = #`(
(molecule-callback . ,Text_item::brew_molecule)
(no-spacing-rods . #t)
- (interfaces . (text-script-interface text-item-interface))
+ (interfaces . (text-script-interface text-item-interface side-position-interface))
(padding . 3.0)
(name . "text script")
)
(name . "separation spanner")
)
basicSustainPedalProperties = #`(
- (interfaces . (sustain-pedal-interface))
+ (interfaces . (sustain-pedal-interface side-position-interface))
(no-spacing-rods . #t)
(molecule-callback . ,Sustain_pedal::brew_molecule)
(self-alignment-X . 0)
(self-alignment-X . 0)
(name . "una chorda pedal")
)
-
+
basicVoltaSpannerProperties = #`(
(molecule-callback . ,Volta_spanner::brew_molecule)
(interfaces . (volta-spanner-interface side-position-interface))
--- /dev/null
+% legal.ly
+
+hsize = 8.5 \in;
+vsize = 14.0 \in;
#!@PYTHON@
-# TODO: Rewrite this. The control structure is too hairy.
-#
-
# TODO:
-# Should use files in /tmp/ only. This potentially messes with
+#
+# * Rewrite this. The control structure is too hairy.
+# * (c) on page 1
+# * more helpful info on lily crashes
+# * Should use files in /tmp/ only. This potentially messes with
# usergenerated files in the CWD