Le 15/05/2022 à 14:01, Thomas Morley a écrit :
Hi,
the new doc-tagged LSR-snippet 'tambourine-example.ly'
https://lsr.di.unimi.it/LSR/Item?id=1070
%%%%%%
\paper { tagline = ##f }
#(define mydrums '((tambourine default #t 0)))
\new DrumStaff \with { instrumentName = #"Tambourine" }
\drummode {
\set DrumStaff.drumStyleTable = #(alist->hash-table mydrums)
\override Staff.StaffSymbol.line-positions = #'( 0 )
\override Staff.BarLine.bar-extent = #'(-1.5 . 1.5)
\time 6/8
tamb8. 16 8 8 8 8 |
tamb4. 8 8 8 |
% the trick with the scaled duration and the shorter rest
% is neccessary for the correct ending of the trill-span!
tamb2.*5/6 \startTrillSpan s8 \stopTrillSpan |
}
%%%%
works fine with 2.22. but fails with master even after a run of
convert-ly, returning:
fatal error: unrecognised percussion sign: "#t"
tamb8. 16 8 8 8 8 |
I don't get what's wrong.
Hints?
Thanks,
Harm
It works if you replace '((tambourine default #t 0)) with
'((tambourine default #f 0)). That's in line with the documentation:
"""
Existing notations may be redefined as an association list
where each entry has to be comprised of four items:
a name, the note head style (or @code{default}), an
articulation sign if needed (or @code{#f} if not), and
the note head's position on the staff. That list must then
be converted into a Scheme hash table, using the
@code{alist->hash-table} function.
"""
This apparently changed with
commit 61cd3bc1f3254b430bf04acd587c4082253602d4
Author: Lukas-Fabian Moser <l...@gmx.de>
Date: Mon Dec 27 01:25:43 2021 +0100
Make articulation-type a symbol? instead of a string?
which contains
diff --git a/lily/drum-note-engraver.cc b/lily/drum-note-engraver.cc
index 7e6e3cef7a..d4078a2e3b 100644
--- a/lily/drum-note-engraver.cc
+++ b/lily/drum-note-engraver.cc
@@ -93,12 +93,12 @@ Drum_notes_engraver::process_music ()
if (scm_is_symbol (style))
set_property (note, "style", style);
- if (scm_is_string (script))
+ if (scm_is_true (script))
{
// Error out if script doesn't exist
if (scm_is_false (ly_assoc (script, get_property
(context (), "scriptDefinitions"))))
ev->origin ()->error (_f ("unrecognised percussion
sign: \"%s\"",
- ly_scm2string (script)));
+ ly_scm_write_string (script)));
Item *p = make_item ("Script", ev->self_scm ());
make_script_from_event (p, context (), script,
Namely, instead of checking (string? the-second-element),
it just checks the-second-element, i.e. it searches the
script definition if the script is anything but #f.
Jean