[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: suppress time sig automatically
From: |
Neil Thornock |
Subject: |
Re: suppress time sig automatically |
Date: |
Mon, 25 Jun 2012 14:05:41 -0600 |
Thank you David, that's brilliant! It works.
On Sun, Jun 24, 2012 at 8:20 AM, David Nalesnik
<address@hidden> wrote:
> Hi again,
>
>>
>> Here's a Scheme engraver which should hopefully do what you want:
>
>
> The logic of that last engraver seemed a little convoluted to me, so not
> wanting to leave well enough alone:) I came up with this:
>
> \version "2.14.2"
>
> suppressExtraTimeSig =
> #(lambda (ctx)
> (let ((time-sig '()))
>
> `((acknowledgers
> (time-signature-interface
> . ,(lambda (engraver grob source-engraver)
> (set! time-sig (cons grob time-sig)))))
>
> (finalize
> . ,(lambda (trans)
> (reduce
> (lambda (elem prev)
> (if (equal? (ly:grob-property elem 'fraction)
> (ly:grob-property prev 'fraction))
> (begin
> (ly:grob-suicide! elem)
> prev)
> elem))
> '()
> (reverse time-sig))
> (set! time-sig '()))))))
>
>
> -David
>
--
Neil Thornock, D.M.
The recent premiere of ...and a bunch of other stuff:
http://www.youtube.com/watch?v=LQtvPet3k8c
Assistant Professor of Music
Composition/Theory
Brigham Young University