lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: automatic "note-as-denominator" time signatures?


From: Carl Sorensen
Subject: Re: automatic "note-as-denominator" time signatures?
Date: Wed, 28 Oct 2009 13:40:05 -0600



On 10/28/09 12:33 PM, "Kieren MacMillan" <address@hidden>
wrote:

> Hi all,
> 
> Can the snippet
> 
>    <http://lsr.dsi.unimi.it/LSR/Snippet?id=554>
> 
> be made into an automatic callback, instead of requiring the creation
> of a markup each time? i.e., I would love to be able to say something
> like
> 
>    \useNoteDenominators
> 
> or
> 
>    \override TimeSignature #'denominator-style = #'note
> 
> and have all denominators be output as notes (rather than numbers).


Yes, it can.  Right now the only thing stopping from being automatic is
the hardcoded 3 and 2 in tsMarkup.

These could be replaced by the car and cdr of timeSignatureFraction.

In scm/auto-beam.scm there is code that gets the timeSignatureFraction,
which you can use as an example.

The challenge is that you need to have a context in order to return (as
opposed to setting) the timeSignatureFraction, so you'd need to make a music
function that returned context-spec-music in order to get the context --
that's somewhat tricky.  You can see how I've managed it (perhaps
inexpertly) by searching ly/music-functions-init.ly for
timeSignatureFraction.

Time signatures are currently created by the code in lily/time-signature.cc
Code could be added to create a note type time-signature.  On the other
hand, a comment in this routine says it should be junked because time
signatures can all be done in markups (i.e. in Scheme, which gives more
flexibility).

a new style could be added (either to the c++ or to a new scheme file that
implements all of the current time signatures) -- note-denominator

Then you'd do

\override TimeSignature #'style=#'note-denominator.

HTH,

Carl





reply via email to

[Prev in Thread] Current Thread [Next in Thread]