[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Find out denominator of current time signature
From: |
Malte Meyn |
Subject: |
Re: Find out denominator of current time signature |
Date: |
Wed, 11 Jan 2017 18:46:33 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 |
Am 11.01.2017 um 14:00 schrieb Thomas Weber:
> Dear all,
>
> I wonder how I can create a duration that is so to say exactly one time
> signature denominator long (e.g. an eigth in 6/8, a quarter in 4/4
> etc.). I thought something like this would work:
You can get the duration from the context property timeSignatureFraction
or baseMoment:
%%%%%
\version "2.19.53"
{
\time 12/8
\applyContext
#(lambda (context)
(display (ly:context-property
context
'baseMoment)))
%'timeSignatureFraction)))
}
%%%%%
I don’t know how you can make a music function that uses this and
returns music. \applyContext #(lambda (context) (make-music …)) has no
visible output. But maybe it’s a start.