Hello Evgeny,

sorry I forgot to cc the list in my first reply, actually it’s always useful to do so. Well, I experimented some more, and I can explain why it’s so complicated: the overrides need to come before the first note and the slur needs to be started after the first note since this is a post-event (meaning that it comes after the note to which it belongs). But finding a solution is somewhat over my head. I made another try at creating a music function:

sn = #(define-music-function (parser location mus muss)

(ly:music? ly:music?)

#{ \newSpacingSection \override Score.SpacingSpanner.spacing-increment = #0

$mus

#(make-span-event 'SlurEvent START)

$muss

#(make-span-event 'SlurEvent STOP)

\newSpacingSection \revert Score.SpacingSpanner.spacing-increment

\once \override Score.BarLine.transparent = ##t

\bar "" \noBreak \bar "" \noBreak

#}

)


\relative {

c' d e f

\sn c { d e f }

}


But Lily won’t accept the post-events in the music function like that.
So I pass the question on to the music-function-and-scheme cracks on the list ;-)


Best regards, Simon


Am 05.05.2014 22:57, schrieb shtangencirkul:
Hello, Simon, thank you for you answer.
But this redefining haven't Slur. I need function with no_space only under Slur, but *with* slur.

I try use  #(make-span-event 'SlurEvent START)  in your variant,
but this line get error: unexpected post-event

thank you,
Evgeny


2014-05-06 0:24 GMT+04:00 Simon Albrecht <simon.albre...@mail.de <mailto:simon.albre...@mail.de>>:

    Am 04.05.2014 23:17, schrieb shtangencirkul:
    Hello, can you help me -

    I need redefining "(" and ")" with folowing parameters:
    1. Saving usual Slur (and Beam, Stem etc.).
    2. No space (or minimum) between notes _only _under the slur.
    (Like Kievan Ligature in Ancient notation, but on the usually
    default-style Staff)

    Now I use this function:
    --------
    SN = #(define-music-function (parser location  music) (ly:music?)
       #{
      \newSpacingSection \override
    Score.SpacingSpanner.spacing-increment = #0
              #music
       \newSpacingSection \revert Score.SpacingSpanner.spacing-increment

    % In this variant NEXT FIRST NOTE after this function haven't
    space too,
    % and I insert invisible objects (bars) for spacing.
    % Strange solve, I see, but I can`t find something else yet.

         \once \override Score.BarLine.transparent = ##t
         \bar "" \noBreak \bar "" \noBreak
    #})
    ------
    All working fine for nonmetric Russian or Byzantic Orthodox
    Church songs
    (One Voice with Ison (is a drone note) ) with cadenza and some
    layot tweaks.
    But code look like:

        \SN{ c1 (c2 c4 c1)} for each slured notes.

    I think about redefining "(" and ")" for simplifying code and for
    future compatibility.

    =========================
    I saw examlpe with redefinig

          "(" = \melisma
         melisma = #(context-spec-music (make-property-set
    'melismaBusy #t) 'Bottom) in /usr/hare/lilypond/current ,

    but I understand how can I hack this code for my task.

    Thank you.


    _______________________________________________
    lilypond-user mailing list
    lilypond-user@gnu.org  <mailto:lilypond-user@gnu.org>
    https://lists.gnu.org/mailman/listinfo/lilypond-user
    Hello,

    I think it should be as easy as


    "(" = { \newSpacingSection \override
    Score.SpacingSpanner.spacing-increment = #0 }

    ")" = {

    \newSpacingSection \revert Score.SpacingSpanner.spacing-increment


    % In this variant NEXT FIRST NOTE after this function haven't
    space too,

    % and I insert invisible objects (bars) for spacing.

    % Strange solve, I see, but I can`t find something else yet.


    \once \override Score.BarLine.transparent = ##t

    \bar "" \noBreak \bar "" \noBreak

    }


    \relative { c' d e f

    \SN { c d e f }

    ( c d e f )

    }


    Does that do what you want?
    Best, Simon



_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to