[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Get the positions of a beam (or other grob with positions)
From: |
Janek Warchoł |
Subject: |
Re: Get the positions of a beam (or other grob with positions) |
Date: |
Wed, 23 May 2012 14:10:32 +0200 |
On Wed, May 23, 2012 at 1:43 PM, Thomas Morley
<address@hidden> wrote:
> I tried it similar to `overrideProperty' from `music-functions-init.ly'
> But I didn't manage to get rid of the ""-signs, when specifying the
> coctext. Is this possible?
>
> \version "2.15.38"
>
> offsetPositions =
> #(define-music-function (parser location name offsets) (string? pair?)
>
> (let ((name-components (string-split name #\.))
> (context-name "Voice")
> (grob-name #f))
>
> (if (> 2 (length name-components))
> (set! grob-name (car name-components))
> (begin
> (set! grob-name (list-ref name-components 1))
> (set! context-name (list-ref name-components 0))))
> #{
> \override $context-name . $grob-name #'positions = #(lambda (grob)
> (let* ((func (assoc-get 'positions
> (reverse(ly:grob-basic-properties grob))))
> (pos (func grob)))
> (coord-translate pos offsets)))
> #}))
Thank you! Making "" unnecessary would be great, but it's already excellent!
Janek
- Get the positions of a beam (or other grob with positions), Urs Liska, 2012/05/17
- Re: Get the positions of a beam (or other grob with positions), David Nalesnik, 2012/05/17
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), David Nalesnik, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/19
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), David Kastrup, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Janek Warchoł, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions), Thomas Morley, 2012/05/23
- Re: Get the positions of a beam (or other grob with positions),
Janek Warchoł <=
- Re: Get the positions of a beam (or other grob with positions), David Kastrup, 2012/05/23