[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: How to extract the current time signature
From: |
David Kastrup |
Subject: |
Re: How to extract the current time signature |
Date: |
Fri, 08 Feb 2019 12:23:14 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Urs Liska <address@hidden> writes:
> [Reviving a pretty ancient thread]
>
> Hi Abraham and Harm (and others),
>
> Am 22.01.15 um 14:17 schrieb tisimst:
>> Harm,
>>
>>
>> Thomas Morley-2 wrote
>>> Maybe:
>>>
>>> \version "2.19.15"
>>>
>>> printTimeSignatureFraction =
>>> \applyContext #(lambda (ctx)
>>> (let* ((context
>>> (ly:context-property-where-defined ctx 'timeSignatureFraction))
>>> (time-sig-frac
>>> (ly:context-property context 'timeSignatureFraction)))
>>> (display time-sig-frac)))
This is completely unrelated but this code is nonsensical. It's
identical to
printTimeSignatureFraction =
\applyContext #(lambda (ctx)
(let* ((time-sig-frac
(ly:context-property ctx 'timeSignatureFraction)))
(display time-sig-frac)))
since context property lookups are hierarchical/inherited. There is no
point in finding out just _which_ parent context defined
timeSignatureFraction for reading it. If you are planning to rewrite
it, there is some incentive to do it at the level you got it from. But
for reading, this is pointless.
--
David Kastrup