On 2024-12-14 16:14, tran li - litran39(a)hotmail.com wrote:
However, to manually (I mean, here, not to use LilyPond's auto-beaming
functionality for subdivide beams, because even till now I still cannot
be clear how subdivide beams in auto-beaming works and trying relevant
commands often cannot bring me to the desired result) create subdivide
beams, in the example above, you must say `\rb` and `\lb` before and
after the last note of each subgroup, respectively. This is not quite
convenient and not straightforward, because it isn't quite intuitive for
code readers to identify that it refers to subdivision. my desired
effect is just using one command like `\sdb` (abbreviation for subdivide
beam), and transform the above code into:
example = {
\relative c' { c16[ d e f \sdb g f e d \sdb c d e f \sdb g f e d] }
}
So, is it possible?
Here is your example adapted for automatic subdivision using the latest
*development* release, if you are willing to use that instead of the
current stable version (which would need a much more different
configuration and I don't even know if it can support this since its
algorithm was flawed and I rewrote it in 2.25):
\version "2.25.23"
\language "english"
example = {
\relative c' { c16 [d e f g f e d c d e f g f e d] }
}
\score {
\new Staff {
\set subdivideBeams = ##t
\set beamMinimumSubdivision = #1/4
\example
}
}
I don't know if a manual command that does what you want is even
possible, especially if no number is provided (assuming in the latest
development version). You could maybe define `\sdb` to take 2 arguments
(the 2nd being the note itself) as a trick, though this is not my area
of expertise.