-1.3.142.hwn2
+1.3.143.jcn3
============
+* LilyPond-mode: show what's going on (font building) in *view* buffer.
+
+* Added environment settings to ly2dvi and lilypond-book.
+
+* Bugfix: make diff links diff into patch-dir, like make release.
+
+* Bugfix: make diff/release for different configs.
+
+* Bugfix: convert-ly: don't change item name ChordName to ChordNames.
+
+* Added flag (LilyPond-kick-xdvi) to LilyPond emacs mode to allow
+simultaneous view processes.
+
+* Small doco fixes.
+
+* Cosmetic bugfixes to chord names.
+
+* Fixed order of piano pedal strings (Amelie).
+
+* Changed embarrassing 'chorda' to corda (Thanks, Amelie).
+
+* Bugfixes: ly2dvi: empty tagline, don't fail if gettext.py can't be
+imported, check for linewidth before indexing, copy midi output.
+
+1.3.142.rz1
+===========
+
+* Added "hacky" drum notation/midi. See input/tricks/drums.ly and
+ ly/drumpitch.ly. Moved midi-instruments to scm.
+
+* Added temporary nested staffgroups/choirstaffs support
+ use Context InnerStaffGroup / InnerChoirStaff.
+
+1.3.143.uu1
+===========
+
+* Bugfix: hairpin that hangs on otherwise empty column should not
+collapse into flat line. Inserted sanity check in Interval::center().
+
+* Programmable stem-attachments for note heads.
+
+* Set default empty instrument name for Staff, to avoid weird effects for
+named grand staffs.
+
+* remove various entries from mutopia/
+
+1.3.143
+=======
+
* Glossary bugfixes for lilypond code.
-* Bugfix: don't crash if dy or y not set.
+* Bugfix: don't crash if dy or y not set in Beam.
* Doco updates: moved contents of tricks chapter to input/tricks,
inserted lilypond-book tutorial, added polyphony section.
* Cleanups in (de)crescendo code, fixed continued (de)crescendi.
-* German chords (Rune Zedler)
+* German chords (Rune Zedeler)
1.3.141
=======
1.3.140
=======
+
+
1.3.139.jcn5
============
@lilypondfile[printfilename]{rest-ledger.ly}
-@lilypondfile[printfilename]{noteheadstyle.ly}
+@lilypondfile[printfilename]{note-head-style.ly}
+
+@lilypondfile[printfilename]{mensural.ly}
@lilypondfile[printfilename]{easy-notation.ly}
@lilypondfile[printfilename]{lyrics-multi-stanza.ly}
+@lilypondfile[printfilename]{lyric-phrasing.ly}
+
@section Multiple notes
with 32nd notes (and no shorter notes), you would use @code{(end * * 1
32)}.
-[say something about irregular meters. eg 5/8 = 2+3/8, 3+2/8]
+@c not true
+@c Automatic beams can not be put on the last note in a score.
-Automatic beams can not be put on the last note in a score.
+If a score ends while an automatic beam has not been ended and is still
+accepting notes, this last beam will not be typeset at all.
@cindex automatic beam generation
@cindex autobeam
@refbugs
-It is not possible to specify beaming for beams with mixed durations,
-that differs from the beaming of all separate durations, ie, you'll
-have to specify manual beams to get:
+It is not possible to specify beaming parameters for beams with mixed
+durations, that differ from the beaming parameters of all separate
+durations, ie, you'll have to specify manual beams to get:
@lilypond[fragment,singleline,relative]
\property Voice.autoBeamSettings
- \override #'(end * * * *) = #(make-moment 3 8)
- \time 12/8; c'8 c c c16 c c c c c [c c c c] c8 c c4
+ \override #'(end * * * *) = #(make-moment 3 8)
+ \time 12/8; c'8 c c c16 c c c c c [c c c c] c8 c c4
@end lilypond
+It is not possible to specify beaming parameters that act differently in
+different parts of a measure, eg, in irregular meters such as @code{5/8}
+that breaks down to @code{2/8 +3/8} or @code{3/8 + 2/8}, automatic beams
+won't act according to the broken down parts @code{2/8} and @code{3/8}.
@c . {Manual beams}
@cindex Automatic beams
@end lilypond
-@refbugs
-
-When using spacer notes to subdivide note dynamics and @code{linewidth =
--1}, starting a hairpin on the first spacer note (the one coinciding
-with the real note) exposes an embarassing bug.
-
-
@c . {Repeats}
@node Repeats
@cindex Pedals
Piano pedal instruction can be expressed using
-@code{\sustainDown}, @code{\sustainUp}, @code{\unaChorda},
-@code{\treChorde}, @code{\sostenutoDown} and @code{\sostenutoUp}.
+@code{\sustainDown}, @code{\sustainUp}, @code{\unaCorda},
+@code{\treCorde}, @code{\sostenutoDown} and @code{\sostenutoUp}.
These identifiers are shorthands for spanner commands of the types
-@code{Sustain}, @code{UnaChorda} and @code{Sostenuto}:
+@code{Sustain}, @code{UnaCorda} and @code{Sostenuto}:
@lilypond[fragment,verbatim]
c''4 \spanrequest \start "Sustain" c''4 c''4 \spanrequest \stop "Sustain"
LilyPond examines chords specified as lists of notes to determine a name
to give the chord. LilyPond will not try to identify chord inversions or
-added base, which may result in strange chord names when chords are
-entered as a list of pitches:
-
-[base vs. bass ?]
+an added bass note, which may result in strange chord names when chords
+are entered as a list of pitches:
@lilypond[verbatim,center,singleline]
scheme = \notes {
Routines that determine the names to be printed are written in Scheme,
and may be customized by the user. The code can be found in
-@file{scm/chord-name.scm}.
+@file{scm/chord-name.scm}. Here's an example showing the differences in
+chord name styles:
+
+@c too long?
+@c maybe just junk verbatim option?
+@lilypond[verbatim,singleline]
+scheme = \chords {
+ c1 c:5^3 c:4^3 c:5+
+ c:m7+ c:m5-.7
+ c:5-.7 c:5+.7
+ c:9^7
+}
+
+\score {
+ \notes <
+ \context ChordNames = banter \scheme
+ \context ChordNames = american {
+ \property ChordNames.ChordName \override
+ #'style = #'american \scheme }
+ \context ChordNames = jazz {
+ \property ChordNames.ChordName \override
+ #'style = #'jazz \scheme }
+ \context Staff \transpose c'' \scheme
+ >
+}
+@end lilypond
-[3 short examples showing differences between american, banter and jazz]
@node Writing parts
@section Writing parts
@end lilypond
This requires that you add the @code{Instrument_name_engraver} to the
-staff context. You can also use markup texts:
+staff context. You can also use markup texts to construct more
+complicated instrument names:
@lilypond[verbatim,singleline]
@end lilypond
+@refbugs
+
+When you put a name on a grand staff or piano staff (By adding an
+@code{Instrument_name_engraver} to that context and setting
+e.g. @code{\property GrandStaff.instrument}), the width of the brace is
+not taken into account. You must add extra spaces to the end of the name
+to avoid a collision.
+
@node Transpose
@subsection Transpose
@cindex Transpose
@end example
where the pieces of music @var{musicexpr1} and @var{musicexpr2} will be
-combined into one context @var{context}. The names of the music
+combined into one context @var{context}. The context names of the music
expressions must start with the prefixes @code{one} and @code{two}.
-[Name of music expressions? is that context name? ]
-
The most useful function of the part combiner to combining threads into
one voice, as common for wind parts in orchestral scores:
* What to tune?::
* Font selection::
* Text markup::
+* Embedded @TeX{}::
@end menu
@node Tuning groups of grobs
}
@end lilypond
+@node Embedded @TeX{}
+@subsection Embeded @TeX{}
+@cindex embedded tex
+@cindex embedded tex
+
+You can use @TeX{} commands in text scripts, but this should be avoided
+because this makes it impossible for LilyPond to compute the exact
+length of the string, which may lead to collisions. Also, @TeX{}
+commands won't work with direct PostScript output.
+
+@lilypond[fragment,relative,verbatim]
+ a''^"3 $\\times$ \\`a deux"
+@end lilypond
+
+@subsection Embedded PostScript
+@cindex embedded postscript
+@cindex embedded postscript
+
+You can also use raw PostScript commands embedded in text scripts. This
+offers ultimate flexibitily, but you'll have to learn the arcane
+PostScript language. Currently, embedded PostScript will @strong{not}
+work with direct PostScript output. Note that all dimensions that you
+use are in @code{staff-space}s.
+
+@lilypond[verbatim]
+\score {
+ \notes \relative c'' {
+ a-#"\\embeddedps{3 4 moveto 5 3 rlineto stroke}"
+ -#"\\embeddedps{ [ 0 1 ] 0 setdash 3 5 moveto 5 -3 rlineto stroke}"
+ b-#"\\embeddedps{3 4 moveto 0 0 1 2 8 4 20 3.5 rcurveto stroke}"
+ s2
+ a'1
+ }
+ \paper { linewidth = 70 * \staffspace; }
+}
+@end lilypond
@c . {Page layout}
@cindex Sound
LilyPond can produce MIDI output. The performance lacks lots of
-interesting effects, such as swing, articulation, slurring, tieing,
-etc., but it is good enough for proof-hearing the music you enter.
-
-Dynamics and tempo changes are interpreted.
-
-[TODO: mention volume control/Instrument Equaliser]
-
+interesting effects, such as swing, articulation, slurring, etc., but it
+is good enough for proof-hearing the music you have entered. Ties,
+dynamics and tempo changes are interpreted.
+
+The MIDI volume is composed of two elements: the current dynamics of the
+voice and the type of musical instrument.
+
+Dynamic marks, crescendi and decrescendi translate into MIDI volume
+levels. Dynamic marks translate to a fixed fraction of the available
+MIDI volume range, crescendi and decrescendi make the the volume vary
+linearly between their two extremities. The fractions be adjusted by
+overriding the @code{absolute-volume-alist} defined in
+@file{scm/midi.scm}.
+
+For each type of musical instrument (that MIDI supports), a volume range
+can be defined. This gives you basic equaliser control, which can
+enhance the quality of the MIDI output remarkably. You can add
+instruments and ranges or change the default settings by overriding
+the @code{instrument-equaliser-alist} defined in @file{scm/midi.scm}.
@refbugs
@item emacs
@end itemize
-
Add one these lines to the top of your .ly file. The first one is for
line location only. The second one is more convenient, but requires
patching @code{emacsclient}.
static T infinity () ;
static String T_to_str (T arg);
- T center () { return (elem (LEFT) + elem (RIGHT)) / T (2);}
+ T center () {
+ assert (!empty_b ());
+ return (elem (LEFT) + elem (RIGHT)) / T (2);
+ }
void translate (T t)
{
elem (LEFT) += t;
--- /dev/null
+\header {
+texidoc = "There is limited support for mensural notation: note head shapes are available. Mensural stems are centered on the note heads, both for up and down stems.";
+}
+
+\score {\notes { \context Voice {
+\property Voice.NoteHead \override #'style = #'mensural
+\transpose d''' { c4 c2 c8 c16 c16 c1 c\breve c\longa }
+\transpose c'' { c4 c2 c8 c16 c16 c1 c\breve c\longa }
+}}}
--- /dev/null
+\header{
+texidoc="
+Note head shapes are settable. The stem endings should be adjusted
+per note head. If you want different note head styles on one stem,
+you must create a special context called Thread.
+
+Harmonic notes have a different shape and different
+dimensions. Nevertheless, noteheads in both styles can be combined, on
+either up or down stems.
+";
+}
+
+
+
+
+\score { \notes \relative c{
+
+c''4 c2 c8 c16 c16 c1 c\breve
+\property Voice.NoteHead \set #'style = #'diamond
+c4 c2 c8 c16 c16 c1 c\breve
+\property Voice.NoteHead \set #'style = #'transparent
+c4 c2 c8 c16 c16 c1 c\breve
+\property Voice.NoteHead \set #'style = #'cross
+c4 c2 c8 c16 c16 c1 c\breve
+\property Voice.NoteHead \set #'style = #'mensural
+c4 c2 c8 c16 c16 c1 c\breve c\longa
+\property Voice.NoteHead \set #'style = #'harmonic
+c4 c2 c8 c16 c16 c1 c\breve
+\property Voice.NoteHead \set #'style = #'baroque
+c4 c2 c8 c16 c16 c1 c\breve c\longa
+
+
+ \context Voice <
+ \context Thread = TA
+ {
+ \property Thread.NoteHead \set #'style = #'cross
+ \property Voice.Stem \set #'direction = #1
+ c16
+ }
+ \context Thread = TB
+ { \property Thread.NoteHead \set #'style = #'default a16 }
+
+ \context Thread = TC
+ { \property Thread.NoteHead \set #'style = #'mensural d16 }
+
+ >
+
+
+ \context Voice <\context Thread = TA {
+ \property Thread.NoteHead \set #'style = #'default
+ c4 c4 }
+\context Thread = TB {
+ \property Thread.NoteHead \set #'style = #'mensural
+ c'4 \stemDown c
+} >
+
+}
+
+ \paper {
+
+
+}
+}
make the padding a little smaller, here.
*/
Interval e =b->extent (common, X_AXIS);
+ if (e.empty_b ())
+ e = Interval (0,0) + b->relative_coordinate (common, X_AXIS);
+
x_points[d] = e.center () - d * padding /3; // ugh.
}
else
static Molecule ledger_line (Interval, Grob*) ;
DECLARE_SCHEME_CALLBACK (brew_ez_molecule, (SCM ));
static bool has_interface (Grob*);
+ static Real stem_attachment_coordinate (Grob *, Axis a);
};
#endif // NOTEHEAD_HH
return SCM_EOL;
}
- // ugh: use gh_call ()
+ /*
+ ugh: use gh_call ()
+
+ UGH: use grob-property.
+ */
Molecule out = Font_interface::get_default_font (me)->find_by_name (String ("noteheads-") +
ly_scm2string (scm_eval2 (gh_list (ly_symbol2scm ("find-notehead-symbol"),
me->get_grob_property ("duration-log"),
return m.smobbed_copy ();
}
+
+
+Real
+Note_head::stem_attachment_coordinate (Grob *me, Axis a)
+{
+ SCM v = me->get_grob_property ("stem-attachment-function");
+
+ if (!gh_procedure_p (v))
+ return 0.0;
+
+ SCM st = me->get_grob_property ("style");
+ SCM result = gh_apply (v, gh_list (st, SCM_UNDEFINED));
+
+ if (!gh_pair_p (result))
+ return 0.0;
+
+ result = (a == X_AXIS) ? gh_car (result) : gh_cdr (result);
+
+ return gh_number_p (result) ? gh_scm2double (result) : 0.0;
+}
*/
- Real slope =0.0;
if (Grob *hed = support_head (me))
{
- head_wid = hed->extent (hed,X_AXIS).length ();
+ Real slope =0.0;
+
+ Interval head_height = hed->extent (hed,Y_AXIS);
+ Real y_attach = Note_head::stem_attachment_coordinate ( hed, Y_AXIS);
- slope = gh_scm2double (hed->get_grob_property ("attachment-slope"));
+ y_attach = head_height.linear_combination (y_attach);
+ stem_y[Direction (-d)] += d * y_attach;
}
- stem_y[Direction (-d)] += d * head_wid * slope/ (2*dy);
+
if (!invisible_b (me))
{
Real r=0;
if (Grob * f = first_head (me))
{
- Interval head_wid (0, f->extent (f,X_AXIS).length ());
+ Interval head_wid = f->extent (f,X_AXIS);
+
+ Real attach =
+ Note_head::stem_attachment_coordinate(f, X_AXIS);
- if (to_boolean (me->get_grob_property ("stem-centered")))
- return gh_double2scm (head_wid.center ());
-
- Real rule_thick = gh_scm2double (me->get_grob_property ("thickness")) * me->paper_l ()->get_var ("stafflinethickness");
Direction d = get_direction (me);
- r = head_wid[d] - d * rule_thick * 0.5;
+
+ Real real_attach = head_wid.linear_combination (d * attach);
+
+ r = real_attach;
+
+ /*
+ If not centered: correct for stem thickness.
+ */
+ if (attach)
+ {
+ Real rule_thick
+ = gh_scm2double (me->get_grob_property ("thickness"))
+ * me->paper_l ()->get_var ("stafflinethickness");
+
+
+ r += - d * rule_thick * 0.5;
+ }
}
return gh_double2scm (r);
}
(list 'verticalDirection dir? 'direction)
(list 'stemLength number? 'length)
(list 'flagStyle string? 'flag-style)
- (list 'stemCentered boolean? 'stem-centered)
(list 'noStemExtend boolean? 'no-stem-extend)
(list 'stemShorten number? 'shorten)
))
(DynamicText . (
(Y-offset-callbacks . (,Side_position_interface::aligned_on_self))
(molecule-callback . ,Text_item::brew_molecule)
+(X-offset-callbacks . (,Side_position_interface::aligned_on_self))
+ (self-alignment-X . 0)
+
(no-spacing-rods . #t)
(script-priority . 100)
(font-series . bold)
(style . default)
(molecule-callback . ,Note_head::brew_molecule)
(Y-offset-callbacks . (,Staff_symbol_referencer::callback))
- (attachment-slope . 0.17)
+ (stem-attachment-function
+ . ,note-head-style->attachment-coordinates)
(meta . ,(grob-description "NoteHead"
rhythmic-head-interface font-interface
note-head-interface ))
tuplet-bracket-interface font-interface))
))
- (UnaChordaPedal . (
+ (UnaCordaPedal . (
(molecule-callback . ,Text_item::brew_molecule)
(font-shape . italic)
(no-spacing-rods . #t)
(Y-offset-callbacks .
(,Side_position_interface::aligned_side
,Side_position_interface::centered_on_parent))
- (meta . ,(grob-description "UnaChordaPedal" text-interface font-interface))
+ (meta . ,(grob-description "UnaCordaPedal" text-interface font-interface))
))
(VoltaBracket . (
(grob-property-description 'arithmetic-multiplier number? "see @ref{spacing-spanner-interface}.")
(grob-property-description 'attachment pair? "cons of symbols, '(LEFT-TYPE . RIGHT-TYPE), where both types may be alongside-stem, stem, head or loose-end.")
-(grob-property-description 'attachment-slope number? "Where does the stem
-attach to the notehead?")
+(grob-property-description 'stem-attachment-function procedure? "Where
+does the stem attach to the notehead? Function takes a symbol argument
+being the style. It returns a (X . Y) pair, specifying location in
+terms of note head bounding box.")
(grob-property-description 'attachment-offset pair? "cons of offsets,
'(LEFT-offset . RIGHT-offset). This offset is added to the
attachments to prevent ugly slurs. [fixme: we need more documentation here].
(grob-property-description 'staff-symbol boolean? "the staff symbol grob that we're in.")
(grob-property-description 'staffline-clearance number? "don't get closer than this to stafflines.")
(grob-property-description 'stem ly-grob? "pointer to Stem object.")
-(grob-property-description 'stem-centered boolean? "Center stems on note heads. Useful for mensural notation.")
(grob-property-description 'stem-end-position number? "Where does the stem end (the end is opposite to the support-head.")
(grob-property-description 'stem-length number? "length of stem.")
(grob-property-description 'stem-shorten list? "shorten stems in forced directions given flag multiplicity.")
thickness
beamed-lengths
beamed-minimum-lengths
- stem-centered
lengths
beam
stem-shorten
(lily-interface
'note-head-interface
"Note head"
- '(
- style attachment-slope note-character
- ))
+ '( style stem-attachment-function note-character ))
(lily-interface
'note-name-interface
"Note name"
- '(
- style
- ))
+ '( style ))
(string-append (number->string duration) (symbol->string style)))))
+(define (note-head-style->attachment-coordinates style)
+ "Return pair (X . Y), containing multipliers for the note head
+bounding box, where to attach the stem. e.g.: X==0 means horizontally
+centered, X==1 is at the right, X == -1 is at the left."
+
+ (case style
+ ((default) '(1.0 . 0.8))
+ ((cross) '(1.0 . -1.0))
+ ((mensural) '(0.0 . 1.0))
+ ((diamond) '(1.0 . 0.8))
+ ((transparent) '(1.0 . 1.0))
+ ((slash) '(1.0 . 1.0))
+ ((harmonic) '(1.0 0.0))
+ (else
+ '(1.0 . 0.0)
+ )))
+
(define (string-encode-integer i)
(cond
((= i 0) "o")