[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: automatic "note-as-denominator" time signatures?
From: |
Reinhold Kainhofer |
Subject: |
Re: automatic "note-as-denominator" time signatures? |
Date: |
Thu, 29 Oct 2009 00:40:00 +0100 |
User-agent: |
KMail/1.12.2 (Linux/2.6.31-14-generic; KDE/4.3.2; i686; ; ) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Am Mittwoch, 28. Oktober 2009 20:40:05 schrieb Carl Sorensen:
> 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
[...]
> > \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.
[...]
> 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.
[...]
> 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.
It's way simpler: Simply write your own stencil function, which gets the
TimeSignature grob when evaluated. You can use the 'fraction grob-property and
create the desired stencil from that fraction... All you have to do is to
override the TimeSignature #'stencil with your own function and you are done.
Example is attached (and uploaded to the LSR:
http://lsr.dsi.unimi.it/LSR/Item?id=642 ).
Of course, any approach based on the \time signature will never be able to
format e.g. 6/8 as 2/(dotted quarter), etc.
Cheers,
Reinhold
- --
- ------------------------------------------------------------------
Reinhold Kainhofer, address@hidden, http://reinhold.kainhofer.com/
* Financial & Actuarial Math., Vienna Univ. of Technology, Austria
* http://www.fam.tuwien.ac.at/, DVR: 0005886
* LilyPond, Music typesetting, http://www.lilypond.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iD8DBQFK6NZSTqjEwhXvPN0RAtuLAJ9Rd1VaKuZktcUoL+ANsuJdoEMc4ACfdubj
oD6CJa8P0r2cwjdpj5paBAI=
=7fh2
-----END PGP SIGNATURE-----
time_sigs_note.ly
Description: Text Data