determine ez-notation letter.
* lily/system.cc (get_line): start with dumping layer 3. This
fixes ez notation.
+2004-03-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * lily/note-head.cc (brew_ez_stencil): read vector note-names to
+ determine ez-notation letter.
+
+ * lily/system.cc (get_line): start with dumping layer 3. This
+ fixes ez notation.
+
2004-03-19 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/paper-book.cc (pages): Bugfix: copy_height and tag_height
2004-03-19 Jan Nieuwenhuizen <janneke@gnu.org>
* lily/paper-book.cc (pages): Bugfix: copy_height and tag_height
2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
2004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/note-head.cc (brew_ez_stencil): add note-names
+ property. Provides internationalization for note names.
+
* Documentation/user/changing-defaults.itely (Creating contexts):
new node.
* Documentation/user/changing-defaults.itely (Creating contexts):
new node.
input. During this step, the musical information is inspected in time
order, similar to reading a score from left to right. While reading,
the program remembers where measure boundaries are, and what pitches
input. During this step, the musical information is inspected in time
order, similar to reading a score from left to right. While reading,
the program remembers where measure boundaries are, and what pitches
-need explicit accidentals.
+need explicit accidentals.
-This information can be present on several levels. For example, the
-effect of an accidental is limited to a single stave, while a bar line
-must be synchronized across the entire score. To match this
-hierarchy, LilyPond's interpretation step is hierarchical. There are
-interpretation contexts, like @context{Voice}, Staff and Score, and each level
-can maintain its own properties.
+This is contextual information. and it can be present on several
+levels. For example, the effect of an accidental is limited to a
+single stave, while a bar line must be synchronized across the entire
+score. To match this hierarchy, LilyPond's interpretation step is
+hierarchical. There are interpretation contexts, like
+@context{Voice}, Staff and Score, and each level can maintain its own
+properties.
Full description of all available contexts is in the program
reference, see
Full description of all available contexts is in the program
reference, see
music = \notes { c4 c4 }
arts = \notes { s4-. s4-> }
\score {
music = \notes { c4 c4 }
arts = \notes { s4-. s4-> }
\score {
- << \new Staff \context Voice = "A" \music
+ \notes \relative c'' << \new Staff \context Voice = "A" \music
\context Voice = "A" \arts
>>
}
\context Voice = "A" \arts
>>
}
-the property @code{fontSize} is unset automatically after the third
+the property @code{fontSize} is unset automatically after the second
note.
A full description of all available context properties is in the
note.
A full description of all available context properties is in the
@end macro
@macro context{NAME}
@end macro
@macro context{NAME}
-@code{NAME}@c should use internalsref
+@code{\NAME\}@c should use internalsref
@cindex \NAME\@c
@end macro
@cindex \NAME\@c
@end macro
\version "2.1.30"
\header {
\version "2.1.30"
\header {
-texidoc = " Easy-notation (or Ez-notation) prints names in note heads.
+ texidoc = " Easy-notation (or Ez-notation) prints names in note heads.
You also get ledger lines, of course."
}
\score {
You also get ledger lines, of course."
}
\score {
- \notes { c'2 e'4 f' | g'1 b8 }
- \paper { \context { \EasyNotation }
- raggedright = ##t
- }
+ \notes {
+ \setEasyHeads
+ c'2 g'2 | g'1
+ \override NoteHead #'note-names = ##("U" "V" "W" "X" "Y" "Z" "z")
+ c'2 e'4 f' | b'1
+ }
+ \paper {
+ raggedright = ##t
+ }
SCM spitch = unsmob_music (cause)->get_property ("pitch");
Pitch* pit = unsmob_pitch (spitch);
SCM spitch = unsmob_music (cause)->get_property ("pitch");
Pitch* pit = unsmob_pitch (spitch);
- char s[2] = "a";
- s[0] = (pit->get_notename () + 2)%7 + 'a';
- s[0] = toupper (s[0]);
-
- SCM charstr = scm_makfrom0str (s);
+ SCM idx = gh_int2scm (pit->get_notename ());
+ SCM names = me->get_property ("note-names");
+ SCM charstr = SCM_EOL;
+ if (gh_vector_p (names))
+ charstr = scm_vector_ref (names, idx);
+ else
+ {
+ char s[2] = "a";
+ s[0] = (pit->get_notename () + 2)%7 + 'a';
+ s[0] = toupper (s[0]);
+ charstr = scm_makfrom0str (s);
+ }
SCM at = scm_list_n (ly_symbol2scm ("ez-ball"),
charstr,
SCM at = scm_list_n (ly_symbol2scm ("ez-ball"),
charstr,
ADD_INTERFACE (Note_head,"note-head-interface",
"Note head",
ADD_INTERFACE (Note_head,"note-head-interface",
"Note head",
- "glyph-name-procedure accidental-grob style stem-attachment-function");
+ "note-names glyph-name-procedure accidental-grob style stem-attachment-function");
SCM pa = *(SCM *)a;
SCM pb = *(SCM *)b;
SCM pa = *(SCM *)a;
SCM pb = *(SCM *)b;
- if (pa < pb) return -1 ;
- else if (pa > pb) return 1;
- else return 0;
+ if (pa < pb)
+ return -1;
+ else if (pa > pb)
+ return 1;
+ else
+ return 0;
}
/*
modify L in place: sort it
*/
}
/*
modify L in place: sort it
*/
SCM
uniquify_list (SCM l)
{
SCM
uniquify_list (SCM l)
{
System::get_line ()
{
static int const LAYER_COUNT = 3;
System::get_line ()
{
static int const LAYER_COUNT = 3;
SCM stencils = SCM_EOL;
if (Stencil *me = get_stencil ())
stencils = scm_cons (me->smobbed_copy (), stencils);
/* Output stencils in three layers: 0, 1, 2. The default layer is
SCM stencils = SCM_EOL;
if (Stencil *me = get_stencil ())
stencils = scm_cons (me->smobbed_copy (), stencils);
/* Output stencils in three layers: 0, 1, 2. The default layer is
- 1. */
- for (int i = 0; i < LAYER_COUNT; i++)
+ 1.
+
+ Start with layer 3, since scm_cons prepends to list.
+
+ */
+ for (int i = LAYER_COUNT; i--;)
for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
{
Grob *g = unsmob_grob (ly_car (s));
for (SCM s = get_property ("all-elements"); gh_pair_p (s); s = ly_cdr (s))
{
Grob *g = unsmob_grob (ly_car (s));
returning a @code{Stencil} object.")
(new-accidentals ,list? "List of @code{(@var{pitch}
. @var{accidental})} pairs.")
returning a @code{Stencil} object.")
(new-accidentals ,list? "List of @code{(@var{pitch}
. @var{accidental})} pairs.")
+ (note-names ,vector? "Vector of strings containing names for
+easy-notation note heads.")
(no-spacing-rods ,boolean? "Items with this property do not cause
spacing constraints.")
(no-stem-extend ,boolean? "If set, notes with ledger lines do not
(no-spacing-rods ,boolean? "Items with this property do not cause
spacing constraints.")
(no-stem-extend ,boolean? "If set, notes with ledger lines do not
;; this list is rather long. Trim --hwn
(before-line-breaking-callback . ,Stem::before_line_breaking)
(print-function . ,Stem::print)
(thickness . 1.3)
;; this list is rather long. Trim --hwn
(before-line-breaking-callback . ,Stem::before_line_breaking)
(print-function . ,Stem::print)
(thickness . 1.3)
- ;; 3.5 (or 3 measured from note head) is standar length
+ ;; 3.5 (or 3 measured from note head) is standard length
;; 32nd, 64th flagged stems should be longer
(lengths . (3.5 3.5 3.5 4.5 5.0))
;; 32nd, 64th flagged stems should be longer
(lengths . (3.5 3.5 3.5 4.5 5.0))