Hello Aaron, You're quite right. I don't need to alter the note duration in the scope -- it's simply a graphical articulation I wish to add, like the tenuto.
I actually do prefer the first solution. The second one for falsobordone (or current problem). I suppose I could also use markup on the note if it's a graphical articulation? Many thanks, mattfong On Wed, Oct 7, 2020 at 10:06 AM Aaron Hill <lilyp...@hillvisions.com> wrote: > On 2020-10-07 8:44 am, Matthew Fong wrote: > > Hello Aaron, > > > > I did find an issue with your syllable function. It seems to swallow up > > dots, that is, if I take your sample code > > \syllable { a'\( \melisma c'' b'\tenuto \melismaEnd } > > > > and add a dot, it is ignored. I am playing around with an episema vs. > > dot. > > \syllable { a'4.\( \melisma c'' b'\tenuto \melismaEnd } > > The dot is part of the duration, which is overridden by \syllable. In > fact, \syllable completely ignores any durations that might be > specified. The intention here is that \syllable is fully responsible > for defining duration, so as a user you would be advised not to include > any durations within the music expression. > > Do you need the actual rhythmic Dot or simply a dot-shaped articulation? > > ---- > > Another way of looking at the problem is for a function to manage > scaling provided music of arbitrary length to fit within the measure. > This is a significantly easier task from the engineering perspective, as > LilyPond provides all the building blocks: > > %%%% > \version "2.20.0" > > fitTo = > #(define-music-function > (duration music) > (ly:duration? ly:music?) > (ly:music-compress music > (ly:moment-div > (ly:duration-length duration) > (ly:music-length music)))) > > { \time 1/4 \hide Staff.BarLine \omit Stem \omit Flag > \fitTo 4 { a'4\( c'' b'4*3\tenuto } > \fitTo 4 { a'2 b'2*4\) } > \fitTo 4 { a'4. c''8-> a'4_( b'4*2) } > \fitTo 4 { b'\breve } } > \addlyrics { > lor -- _ _ em _ i -- _ _ psum > } > %%%% > > The results above are similar to earlier examples I posted in terms of > spacing and clumping of notes. The added bonus is that different note > heads are possible, as \syllable only outputs quarter notes. Of course, > I had to \omit Flag due to the presence of an eighth note in the third > note group. > > \syllable is still much nicer from the user's perspective, as one can > safely think in terms of pitch only. The above example required me as > the user to manually compute the durations of notes so that they would > scale properly and be consistent from measure to measure. Try changing > the "2*4" in the second note group to "2*3" or "2*5" and note how the > entire spacing of the piece is impacted. > > > -- Aaron Hill >