Knut and Yoshiaki,

very elegant!

Thanks!

Thomas

> Am 30.08.2026 um 21:38 schrieb Yoshiaki Onishi <[email protected]>:
> 
>> %%% 
>> \version "2.26.0"
>> 
>> % Subdivide beams
>> % e.g.: a32 \sdb #2 b a b
>> sdb = #(define-music-function
>>   (n m)
>>   (integer? ly:music?)
>>   #{ 
>>     \set stemRightBeamCount = #n
>>     #m
>>     \set stemLeftBeamCount = #n
>>   #})
>> 
>> \relative c' {
>>  \tuplet 6/4 { c16 \sdb #1 c c \sdb #1 c \tuplet 3/2 { c c c} }
>> }
>> %%
> 
> Right, one could always automate things using Scheme functions… Admittedly 
> mine was didactic in appearance. 
> 
> Now that scheme function has been brought up, if you were too lazy to even 
> type a numerical value, this would be possible:
> 
> %%% BEGIN
> \version "2.26.0"
> 
> % Subdivide beams
> % e.g.: a32 \sdb #2 b a b
> sdb = #(define-music-function
>   (n m)
>   (
>    (integer? 1) ;<- When no numerical value after \sdb is entered, 1 is 
> assumed by default. 
>    ly:music?)
>   #{
>     \set stemRightBeamCount = #n
>     #m
>     \set stemLeftBeamCount = #n
>   #})
> 
> \relative c' {
>  \tuplet 6/4 { c16 \sdb c c \sdb c \tuplet 3/2 { c c c} }
> }
> %%% END
> 
> 
> 
> -- -- --
> Yoshiaki Onishi
> https://github.com/yoshiakionishi/lilypond-snippets
> 
> 
> 
> 
> 


Reply via email to