Thank you. That is working great for a "slide into" function. How I'm
trying to create a "slide out of" function. I thought using /afterGrace
woiuld be the ticket.
But I find that it works until I hide then grace notes. Then it has the
following bar check message.
C:/Users/waltn/AppData/Local/Temp/frescobaldi-nrao5slu/tmp4c_xa8e2/document.ly:46:27:
warning: barcheck failed at: 1/4
\sloB <c e>4 <a c> d2.
|
\version "2.24.4"
\layout {
\context {
\Score
\override Glissando.minimum-length = #3
\override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
\override Glissando.thickness = #2
}
}
% function to profide slide into one or more notes
% sNotes: hidden notes to control amount of slant
% eNotes: target notes
sli =
#(define-music-function (sNotes eNotes) (ly:music? ly:music?)
#{
{
\once \hideNotes \grace {$sNotes \glissando} \unHideNotes $eNotes
}
#})
% function to profide slide out of one or more notes
% sNotes: notes to slide out of
% eNotes: hidden target notes to control amount of slant
sloA =
#(define-music-function (sNotes eNotes) (ly:music? ly:music?)
#{
{
% this works but shows the notes I'd like to hide
\afterGrace {$sNotes \glissando} $eNotes
}
#})
% This is the desired code but the hideNotes seems
% to throwing the bar check off.
sloB =
#(define-music-function (sNotes eNotes) (ly:music? ly:music?)
#{
{
\afterGrace {$sNotes \glissando} \hideNotes $eNotes \unHideNotes
}
#})
\relative c'' {
\sli <a c>4 <c e>1 |
\sloA <c e>4 <a c> d2. |
\sloB <c e>4 <a c> d2. |
}