lilypond-user
[Top][All Lists]
Advanced

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

Re: Click and Point Issue


From: David Kastrup
Subject: Re: Click and Point Issue
Date: Wed, 27 Sep 2017 16:21:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

"Stephan Zitzmann" <address@hidden> writes:

> I have asked this question at the frescobaldi list, but Urs Liska gave me
> the advice to ask here and to forward my question and his answer.
>
> My question:
>
> This is a excerpt of a greater score:

removed since the answer is basically a repetition with instances of
\remote peppered in.

> If I am clicking on a note or  syllable in the note viewer I am landning not
> at the place, where I  am using the predefinied
> variable, I am landing where I definied the variables. So I have to scroll
> and I am lost a little bit in the code. This is not helpfull.

Well, LilyPond has no way to guess how complex your variables are and
whether you are going to use them just once or multiple times and where
to look for errors.  So it assumes you are interested in the actual
source location.

> Urs Liska answer:
>
> This is an issue with LilyPond, not with Frescobaldi. The point is
> that the "origin" which is saved in the graphical symbol points to the
> *definition* of it and not to where you use it.
>
> The only way I can see to overcome this is to change your variables
> like \ch or \dak to Scheme functions that massage that origin. This is
> somewhat more involved, and I don't see right now *how* complicated it
> would be and therefore whether it would be worth the trouble.

Well, it's not very complicated and might help with debugging.  Try
this.  You might want to try thinking of a better name, though.

\version "2.19.65"

remote =
#(define-scheme-function (mus) (ly:music?)
  (define-music-function () ()
   (music-map ly:set-origin! (ly:music-deep-copy mus))))

cha = \remote \lyricmode {
  cha -- ka -- ti -- ki

}

dak = \remote \lyricmode {
  da -- ka -- la

}

ch = \remote {a16 a a a}
da = \remote {\times 2/3 {a16 a a }}


TRB = {
  \set subdivideBeams = ##t

  \set baseMoment = #(ly:make-moment 1/8)
  \set beatStructure = #'(2 2 2 2)
}

TRA = {

  \unset subdivideBeams

  \unset baseMoment
  \unset beatStructure

}

\new DrumStaff {
      \override Staff.StaffSymbol.line-positions = #'(0 )

      \ch a16 a a a32 a
      \ch \ch
      \ch \ch
      \ch \ch
      \ch a16 a a a32 a
      a16 a a32 a a16 \ch
      \ch a16 a a a32 a
      \ch a16 a a a32 a
      \TRB
      \da \da \da \da
      \TRA
      \ch \ch
      \TRB
      \da \da \da \da
      \TRA
      \ch \ch
      \TRB
      \da \da \da \da
      \TRA
      \ch \ch
      \TRB
      \da \da \da \da
      \TRA
      \ch \ch
      \ch a16 a a a32 a
      a16 a a32 a a16 \ch
      \TRB
      \da \da \da \da
      \TRA
      \ch \ch
      \ch \ch
      a16 a a a32 a \ch
      \ch \ch
      \ch \ch
      \ch \ch
      \ch \ch
      \ch \ch
      \ch \ch
      \ch  a16 a a a32 a
      \ch  a16 a a a32 a
      \ch  a16 a a a32 a
      \ch  a16 a a a32 a
       \ch  a16 a a a16
       a16 a a32 a a16 a a32 a a16 a32 a
       a16 a a32 a a16 \ch
       a16 a a32 a a16 \ch
       \ch a32 a a16 a a
       a16 a a a32 a a32 a a16 a a
       
       \ch \ch
       \TRB
      \da \da \da \da
      \TRA
      \ch \ch
      \ch \ch
       \TRB
      \da \da \da \da
      \TRA
      a16 a a a32 a\ch
    }




    \addlyrics {
      \override LyricHyphen.minimum-distance = 1.5
      \revert LyricText.color \cha \cha  ba --
      \cha  \cha
      \cha \cha
      \cha \cha
      weg -- ta  -- ti -- ki \cha  ba --
      cha -- ka  -- ti -- ba -- da \cha
      weg -- ta  -- ti -- ki \cha  ba --
      \cha \cha  ba --
      \dak \dak \dak \dak
      \cha \cha
      \dak \dak da -- ba -- la ba -- la -- da
      \cha \cha
      \dak ba -- la -- da \dak \dak

      \cha \cha
      \dak \dak \dak \dak
      \cha \cha
      weg -- ta  -- ti -- ki \cha  ba --
      cha -- ka  -- ti -- ba -- da \cha
      \dak \dak \dak \dak
      \cha \cha
      \cha \cha
      weg -- ka -- ti -- ki  ba -- \cha
      weg -- ka -- ti -- ki \cha
      \cha \cha
      \cha \cha
      \cha \cha
      \cha \cha
      \cha \cha
      \cha \cha ba --
      \cha \cha ba --
      \cha \cha ba --
      \cha \cha ba --
       \cha \cha
       cha -- ka -- ti  bi -- ki
       cha -- ka  ba -- ti -- ki ba --
       cha -- ka -- ti  bi -- ki \cha
       cha -- ka -- ti  bi -- ki \cha
       \cha  cha -- ba --  ka -- ti -- ki
       weg -- ka -- ti -- ki  ba -- cha -- ba --  ka -- ti -- ki
       \cha \cha
        \dak \dak \dak \dak
      \cha \cha
       \cha \cha
        \dak \dak \dak \dak
      \cha ba -- \cha
       
    }

-- 
David Kastrup

reply via email to

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