[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bar counts and repeats in repetitive music
From: |
David Nalesnik |
Subject: |
Re: Bar counts and repeats in repetitive music |
Date: |
Fri, 17 Feb 2017 12:34:56 -0600 |
On Fri, Feb 17, 2017 at 12:17 PM, Jeffery Shivers
<address@hidden> wrote:
>>
>>
> But it's also essential that the performer is told how many times to repeat
> each fragment! At the moment I've chickened out and used percent repeats
> with counts :(
>
>>
> I'll have a look at this - probably a matter of adding a new engraver; I've
> seen a trick that used \Dynamic context to display centered measure numbers
> before, so maybe something like that.
>
> If you don't care so much about the alignment though, you can just put a
> markup in that repeat function. Like:
>
> == snip
>
> repeatSect =
> #(define-music-function (parser location num mus)
> (number? ly:music?)
> (define startBar #f)
> #{
> #(make-apply-context
> (lambda (context)
> (let ((currentBar (ly:context-property context 'currentBarNumber)))
> (set! startBar currentBar))))
> \mark \markup { \hspace #30 "repeat this" #(number->string num) "times" }
> \repeat volta #num { #mus }
> #(context-spec-music
> (make-apply-context
> (lambda (context)
> (let* ((endBar (ly:context-property context 'currentBarNumber))
> (repLength (- endBar startBar))
> (lenScaled (* repLength num))
> (nextBar (+ startBar lenScaled)))
> (ly:context-set-property! context 'currentBarNumber nextBar))))
> 'Score)
> #})
>
> == snip
>
Attached is my take. It's based on a combinations of Jeffery's
functions and http://lsr.di.unimi.it/LSR/Snippet?id=954. Note that it
will work for multi-measure repeated spans.
Best,
David
fancy-repeats.ly
Description: Text Data
- Bar counts and repeats in repetitive music, Peter Toye, 2017/02/07
- Re: Bar counts and repeats in repetitive music, ptoye, 2017/02/16
- Re: Bar counts and repeats in repetitive music, Jeffery Shivers, 2017/02/16
- Re: Bar counts and repeats in repetitive music, Jeffery Shivers, 2017/02/16
- Re: Bar counts and repeats in repetitive music, ptoye, 2017/02/16
- Re: Bar counts and repeats in repetitive music, Jeffery Shivers, 2017/02/16
- Re: Bar counts and repeats in repetitive music, Peter Toye, 2017/02/17
- Re: Bar counts and repeats in repetitive music, Jeffery Shivers, 2017/02/17
- Re: Bar counts and repeats in repetitive music, Jeffery Shivers, 2017/02/17
- Re: Bar counts and repeats in repetitive music,
David Nalesnik <=
- Re: Bar counts and repeats in repetitive music, Peter Toye, 2017/02/17
- Re: Bar counts and repeats in repetitive music, David Nalesnik, 2017/02/17
- Re: Bar counts and repeats in repetitive music, David Nalesnik, 2017/02/17
- Re: Bar counts and repeats in repetitive music, Peter Toye, 2017/02/18
- Re: Bar counts and repeats in repetitive music, David Nalesnik, 2017/02/18
- Re: Bar counts and repeats in repetitive music, Peter Toye, 2017/02/18
- Message not available
- Message not available
- Re: Bar counts and repeats in repetitive music, Peter Toye, 2017/02/28
- Re: Bar counts and repeats in repetitive music, Jeffery Shivers, 2017/02/28
- Re: Bar counts and repeats in repetitive music, Simon Albrecht, 2017/02/28
- Re: Bar counts and repeats in repetitive music, David Nalesnik, 2017/02/28