+2002-11-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * input/regression/apply-context.ly (texidoc): new file
+
+ * lily/parser.yy (Simple_music): \applycontext #FUNCTION allows
+ code to be executed during interpretation. Possible applications:
+ smart octavation, more advanced bar checks.
+
+ * lily/apply-context-iterator.cc: new file.
+
+2002-11-18 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * input/test/new-markup.ly: new file.
+
+ * lily/text-item.cc (text_to_molecule): new function
+
+ * scm/new-markup.scm (lambda): new file
+
+ * lily/function-documentation.cc (ly_add_function_documentation):
+ add proc property as well
+
+2002-11-17 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+
+ * Documentation/user/music-glossary.tely (Top): add custos.
+
2002-11-16 Heikki Junes <hjunes@cc.hut.fi>
* Documentation/topdocs/INSTALL.texi: advise how to include source
released.
@itemize @bullet
-@item @uref{ftp://ftp.cs.uu.nl/pub/GNU/LilyPond/binaries/RedHat-7.x/, Red Hat i386}
+@item @uref{http://www-ccrma.stanford.edu/planetccrma/software/soundapps.html#lilypond,Red Hat i386}
@item @uref{ftp://ftp.lilypond.org/pub/LilyPond/binaries/SuSE, SuSE}
@item @uref{ftp://ftp.lilypond.org/pub/LilyPond/binaries/linuxppc/,
LinuxPPC}
In a separate part notes belonging to another part with the purpose of hinting
when to start playing. Usually printed in a smaller type.
+@aitem{custos}
+
+A custos is a staff symbol that appears at the end of a staff line
+with monophonic musical contents (i.e. with a single voice). It
+anticipates the pitch of the first note of the following line and thus
+helps the player or singer to manage line breaks during performance,
+thus enhancing readability of a score.
+
+Custodes were frequently used in music notation until the 16th
+century. There were different appearences for different notation
+styles. Nowadays, they have survived only in special forms of musical
+notation such as via the editio vaticana dating back to the beginning
+of the 20th century
+
+@lilypond[13pt]
+\score {
+ \notes {
+ \property Staff.Custos \set #'neutral-position = #4
+ \property Staff.Custos \set #'neutral-direction = #-1
+ \property Staff.Custos \set #'adjust-if-on-staffline = ##t
+
+ \property Staff.Custos \set #'style = #'hufnagel
+ c'1^"Custos style = \#'hufnagel"
+ \break << d' a' f''>>1
+ }
+ \paper {
+ \translator {
+ \StaffContext
+ \consists Custos_engraver
+ }
+ }
+}
+@end lilypond
+
@aitem{D}
ES: Re,
I: re,
--- /dev/null
+\version "1.7.6"
+\header {
+ texidoc = "custodes in various styles."
+}
+
+\score {
+ \notes {
+ \property Staff.Custos \set #'neutral-position = #4
+ \property Staff.Custos \set #'neutral-direction = #-1
+ \property Staff.Custos \set #'adjust-if-on-staffline = ##t
+
+ \property Staff.Custos \set #'style = #'hufnagel
+ c'1^"Custos style = \#'hufnagel"
+ \break << d' a' f''>>1
+
+ \property Staff.Custos \set #'style = #'medicaea
+ c'1^"Custos style = \#'medicaea"
+ \break << d' a' f''>>1
+
+ \property Staff.Custos \set #'style = #'vaticana
+ c'1^"Custos style = \#'vaticana"
+ \break << d' a' f''>>1
+
+ \property Staff.Custos \set #'style = #'mensural
+ c'1^"Custos style = \#'mensural"
+ \break << d' a' f''>>1
+ }
+ \paper {
+ \translator {
+ \StaffContext
+ \consists Custos_engraver
+ }
+ }
+}
+%% new-chords-done %%
+
\version "1.7.7"
\header {
+++ /dev/null
-\version "1.7.6"
-\header {
- texidoc = "custodes in various styles."
-}
-
-\score {
- \notes {
- \property Staff.Custos \set #'neutral-position = #4
- \property Staff.Custos \set #'neutral-direction = #-1
- \property Staff.Custos \set #'adjust-if-on-staffline = ##t
-
- \property Staff.Custos \set #'style = #'hufnagel
- c'1^"Custos style = \#'hufnagel"
- \break << d' a' f''>>1
-
- \property Staff.Custos \set #'style = #'medicaea
- c'1^"Custos style = \#'medicaea"
- \break << d' a' f''>>1
-
- \property Staff.Custos \set #'style = #'vaticana
- c'1^"Custos style = \#'vaticana"
- \break << d' a' f''>>1
-
- \property Staff.Custos \set #'style = #'mensural
- c'1^"Custos style = \#'mensural"
- \break << d' a' f''>>1
- }
- \paper {
- \translator {
- \StaffContext
- \consists Custos_engraver
- }
- }
-}
-%% new-chords-done %%
--- /dev/null
+\version "1.7.7"
+\header {
+ texidoc =" New markup scheme. Semantically more sane. We haven't
+ invented a nice syntax yet."
+}
+
+\score {
+ \notes \context Voice {
+ \property Voice.TextScript \set #'molecule-callback = #brew-new-markup-molecule
+ c4^#`(,simple-markup "foo")
+ c4^#`(,column-markup (
+ (,bold-markup (,simple-markup "foo"))
+ (,simple-markup "bar")))
+ }
+}
--- /dev/null
+#include "simple-music-iterator.hh"
+#include "translator-group.hh"
+#include "music.hh"
+
+/**
+ Iterate a property.
+ */
+class Apply_context_iterator : public Simple_music_iterator
+{
+public:
+ VIRTUAL_COPY_CONS (Music_iterator);
+ DECLARE_SCHEME_CALLBACK(constructor, ());
+protected:
+ virtual void process (Moment);
+};
+
+
+void
+Apply_context_iterator::process (Moment m)
+{
+ SCM proc = get_music ()->get_mus_property ("procedure");
+
+ scm_call_1 (proc, report_to()->self_scm());
+
+ Simple_music_iterator::process(m);
+}
+
+IMPLEMENT_CTOR_CALLBACK (Apply_context_iterator);
+
ADD_INTERFACE (Beam, "beam-interface",
- "A beam.
-
-#'thickness= weight of beams, in staffspace
-
-
-We take the least squares line through the ideal-length stems, and
-then damp that using
-
- damped = tanh (slope)
-
-this gives an unquantized left and right position for the beam end.
-Then we take all combinations of quantings near these left and right
-positions, and give them a score (according to how close they are to
-the ideal slope, how close the result is to the ideal stems, etc.). We
-take the best scoring combination.
-
-",
+ "A beam. \n\n"
+" "
+"#'thickness= weight of beams, in staffspace "
+" "
+" "
+"We take the least squares line through the ideal-length stems, and "
+"then damp that using "
+" \n"
+" damped = tanh (slope) \n"
+" \n"
+"this gives an unquantized left and right position for the beam end. "
+"Then we take all combinations of quantings near these left and right "
+"positions, and give them a score (according to how close they are to "
+"the ideal slope, how close the result is to the ideal stems, etc.). We "
+"take the best scoring combination. "
+,
"knee french-beaming position-callbacks concaveness-gap concaveness-threshold dir-function quant-score auto-knee-gap gap chord-tremolo beamed-stem-shorten shorten least-squares-dy damping flag-width-function neutral-direction positions space-function thickness");
static Keyword_ent the_key_tab[]={
{"alias", ALIAS},
{"apply", APPLY},
+ {"applycontext", APPLYCONTEXT},
{"autochange", AUTOCHANGE},
{"simultaneous", SIMULTANEOUS},
{"sequential", SEQUENTIAL},
/* tokens which are not keywords */
%token AUTOCHANGE
%token ALIAS
+%token APPLYCONTEXT
%token APPLY
%token ACCEPTS
%token ALTERNATIVE
Simple_music:
event_chord { $$ = $1; }
+ | APPLYCONTEXT embedded_scm {
+ if (!gh_procedure_p ($2))
+ THIS->parser_error (_ ("\applycontext takes function argument"));
+ $$ = MY_MAKE_MUSIC ("ApplyContext");
+ $$->set_mus_property ("procedure", $2);
+ $$->set_spot (THIS->here_input());
+ }
| OUTPUTPROPERTY embedded_scm embedded_scm '=' embedded_scm {
SCM pred = $2;
if (!gh_symbol_p ($3))
(music-property-description 'pitch ly:pitch? "the pitch of this note")
(music-property-description 'pitch-alist list? "list of pitches jointly forming the scale of a key signature")
(music-property-description 'pop-first boolean? "Do a revert before we try to do a override on some grob property.")
-
+(music-property-description 'procedure procedure?
+ "The function to run with \\applycontext. It must take a single argument, being the context.")
(music-property-description 'predicate procedure? "the predicate of a \outputproperty")
(music-property-description 'type symbol? "The type of this music object. Determines iteration in some cases.")
(music-property-description 'types list? "The types of this music object. Determines iteration in some cases.")
(internal-class-name . "Event")
(types . (general-music event dynamic-event absolute-dynamic-event))
))
+ (ApplyContext
+ . (
+ (description . "Call the argument with the current context during interpreting phase")
+ (internal-class-name . "Music")
+ (types . (general-music apply-context))
+ (iterator-ctor . ,Apply_context_iterator::constructor)
+ ))
(ArpeggioEvent
. (
(description . "Make an arpeggio on this note. Syntax: