Helge Kruse <helge.kr...@gmx.net> writes: > 2013/2/4 David Kastrup <d...@gnu.org> > > I have created > <URL:http://code.google.com/p/lilypond/issues/detail?id=3153> > which will > let all the music created within #{ ... #} point to \tr. That's > pretty > much the best you can hope to do with reasonable effort. > > Ah that's great I will try this, when a Lilypond version with this > change is available. > > I have tried this with the code in you last mail. But this doesn't > change the behavior. Obviously I don't have sufficient Scheme skills: > > tr = #(define-music-function (parser location p1 p2 p3) > > (ly:pitch? ly:pitch? ly:pitch?) > > music-map > > (lambda (m) > > (set! (ly:music-property m 'origin) location)) > > #{ \times 2/3 { $p1 8 [ $p2 $p3 ] } #})
That's rather a lack of copy&paste skills. You can't add or remove parentheses in Scheme without changing the meaning. > A more precise > solution would only be possible by tacking source information onto > _every_ music function argument and tracing its progress in > expressions, > quite more expensive and actually also ill-defined: what is the > point-and-click location for the note generated by $p1 8 ? What is > the > location for the beam? > It would be nice to get the exact position of the note in the source. But there is no such thing as a "note" in the source. There is just a _pitch_. The _note_ is only assembled inside of the #{...#}. -- David Kastrup _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user