[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arbitrary repeat counter
From: |
Jean Abou Samra |
Subject: |
Re: arbitrary repeat counter |
Date: |
Wed, 1 Jun 2022 18:09:52 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 |
Le 01/06/2022 à 18:04, Simon Bailey a écrit :
On Wed, 1 Jun 2022 at 16:14, Jean Abou Samra <jean@abou-samra.fr> wrote:
1. What is the duration of a measure dependent on the current time signature?
In an engraver :-)
(ly:context-property context 'measureLength)
You can't get it in the music function, since timing is not
established at that point (just think that the time signature
could come from another element of a << >> construct, for
example).
Remember, though, that the time signature might change
in the middle of the repeat. Thus it will be a bit
more reliable to actually acknowledge the PercentRepeatCount
grobs and increment a counter whenever you see one.
I actually tried that and ran into scheme problems (incrementing a
counter didn't seem to work).
What did not work? This is perfectly valid Scheme:
(set! count (1+ count))
In fact, it's in the code of my engraver.
2. How long is a given musical expression (in measures or beats)?
(ly:music-length your-music)
I think I might use your engraver ;) But I've definitely learnt more
today. Thanks!
You're welcome. To be honest, and simplifying a bit, I had a
year of unsuccessful attempts to grasp Scheme before Urs'
Scheme tutorial made me learn as much of Scheme in 4 hours
as I had learnt in a year, then another year without that kind
of help to learn LilyPond internals, so if I've managed to write
something that is similarly turning a year into 4 hours for
you, I'm quite happy.
Best,
Jean
- arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter,
Jean Abou Samra <=
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/01
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/01
- Re: arbitrary repeat counter, Simon Bailey, 2022/06/04
- Re: arbitrary repeat counter, Wols Lists, 2022/06/06
- Re: arbitrary repeat counter, Jean Abou Samra, 2022/06/06
- Re: arbitrary repeat counter, Wols Lists, 2022/06/06
- Re: arbitrary repeat counter, David Kastrup, 2022/06/06
- Re: arbitrary repeat counter, Wols Lists, 2022/06/06