lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setting subdivide beams in a more straightforward manner


From: tran li
Subject: Re: Setting subdivide beams in a more straightforward manner
Date: Sun, 15 Dec 2024 11:08:18 +0800
User-agent: Mozilla Thunderbird

Thanks. This works good. But is it possible to enable the `\sdb` command to be inserted after the target note instead of before, because subdivision actually happens after that note and using the command after the note will better enable me to visualize the note grouping.

On 2024/12/15 9:58, Jason Yip wrote:
On 2024-12-14 17:51, Jason Yip - sripedia_getpgrp(a)slmail.me wrote:
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?
[...]

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.

Try this (assuming if you are still ok with providing the subdivision depth):

sdb = #(define-music-function
  (n m)
  (integer? ly:music?)
  #{ \set stemRightBeamCount = #n
     #m
     \set stemLeftBeamCount = #n
  #})

example = {
  \relative c' { c16 [d e \sdb1 f g f e \sdb1 d c d e \sdb1 f g f e d] }
}




reply via email to

[Prev in Thread] Current Thread [Next in Thread]