lilypond-user
[Top][All Lists]
Advanced

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

Re: custom compound time signature


From: diekunstderfuge
Subject: Re: custom compound time signature
Date: Sun, 3 Jun 2012 15:29:48 -0700 (PDT)

Thank you so much! This code worked perfectly. You were of course absolutely
right about the context for \numericTimeSignature...I can't believe I didn't
spot that myself!

I have not worked with Scheme before and I would like to start learning how
to write advanced tweaks for Lilypond as well as functions to automate some
of the writing of music expressions. So far I've noticed on my own some
differences (such as #(define... for music expression functions, but
#(lambda... for dealing with grobs) but I haven't found a good resource to
help me learn more about these details. I'm a musician/musicologist with
only a little programming experience.

I'm still using 2.12.3 because that is what the Lilypond download site lists
as the latest stable version for Windows. Where can I find 2.14.2, and how
could I install it while keeping 2.12.3 in case I need to fall back to the
earlier version?

Many thanks!


harm6 wrote:
> 
> 2012/6/2 diekunstderfuge <address@hidden>:
>>
>> Hi all,
>>
>> I'm trying to achieve the compound time signature seen in the image here:
>> http://old.nabble.com/file/p33950720/custom_time_signature.png
>>
>> As you can see, it's meant to represent 3 bars of 2/4 grouped together as
>> one bar. My plan was to write it as one bar of 3/2 and then override the
>> time signature stencil.
>>
>> First, I've used this snippet ( http://lsr.dsi.unimi.it/LSR/Item?id=272
>> http://lsr.dsi.unimi.it/LSR/Item?id=272 ) to create a "dummy" staff with
>> only the time signatures. (For some reason, \numericTimeSignature does
>> not
>> seem to work inside of the TimeSig context. Does anyone know why?)
> 
> Have a look at /ly/property-init.ly. where \numericTimeSignature is
> defined:
> numericTimeSignature = \override Staff.TimeSignature #'style = #'numbered
> 
> But now you're using a new custom-defined context: "TimeSig"
> Replace Staff with TimeSig and it will work.
> 
>> This snippet ( http://lsr.dsi.unimi.it/LSR/Item?id=609
>> http://lsr.dsi.unimi.it/LSR/Item?id=609 ) prints only the numerator of
>> the
>> time signature, which I need to get the "3". I do not know how to combine
>> this with a compound time signature
> 
> Try:
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
> \version "2.14.2"
> 
> customTimeSigI =
>  \once \override TimeSig.TimeSignature #'stencil =
>    #(lambda (grob)
>       (grob-interpret-markup grob
>         (markup
>           #:vcenter #:number "3"
>           #:vcenter "x"
>           #:override '(baseline-skip . 0) #:number (#:column ("2" "4")))))
> 
> \layout {
>   \context {
>     \type "Engraver_group"
>     \consists "Time_signature_engraver"
>     \consists "Axis_group_engraver"
>     \name "TimeSig"
>     \override TimeSignature #'font-size = #2
>     \override TimeSignature #'break-align-symbol = ##f
>     \override TimeSignature #'X-offset =
>       #ly:self-alignment-interface::x-aligned-on-self
>     \override TimeSignature #'self-alignment-X = #CENTER
>     %\override TimeSignature #'self-alignment-X = #LEFT
>     \override TimeSignature #'after-line-breaking =
>       #shift-right-at-line-begin
>   }
>   \context {
>     \Score
>     \accepts TimeSig
>   }
>   \context {
>     \Staff
>     \remove "Time_signature_engraver"
>   }
> }
> 
> timeSignatures = {
>         \override TimeSig.TimeSignature #'style = #'numbered
>         \time 2/4
>         s2
>         \time 3/4
>         s2.
>         \time 4/4
>         s1
>         \customTimeSigI
>         \time 6/4
>         \set Score.beatStructure = #'(2 2 2)
>         s1.
> }
> 
> \score {
>   <<
>     \new TimeSig \timeSignatures
>     \new Staff \relative { c'2 c2. c1 c1. \repeat unfold 12 { c8 } }
>     \new Staff { a2 a2. a1 a1. a1.}
>   >>
> }
> 
> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
> 
>> Controlling beaming behavior, often a concern with compound time
>> signatures,
>> is not important as the TimeSig staff displays only time signatures.
> 
> I added the "2.14.2"-command \set Score.beatStructure = #'(2 2 2)
> Delete it if you want or replace it with an "2.12.3"-command.
> But please note: it _will_ affect the score.
> 
>> I am using 2.12.3.
> 
> Why do you use this outdated version?
> Well, some time ago the LSR was on "2.12.3" and that was the reason
> why I didn't delete this version, while installing the newer stable
> version and the newest development-version.
> But I'm absolutely sure that the LSR is now on "2.14.2" :)
> 
> HTH,
>   Harm
> 
> _______________________________________________
> lilypond-user mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/lilypond-user
> 
> 

-- 
View this message in context: 
http://old.nabble.com/custom-compound-time-signature-tp33950720p33955037.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.




reply via email to

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