lilypond-user
[Top][All Lists]
Advanced

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

Snippet 204 for 2.11 (was Metronome marks)


From: Trevor Daniels
Subject: Snippet 204 for 2.11 (was Metronome marks)
Date: Thu, 10 Apr 2008 10:55:42 +0100

Valentin

Attached is a version of snippet 204 that works better with 2.11. I did this some time ago, but forgot to send it. It's still not quite perfect, though. I've annotated the extra statements with % td and commented out those that need to be removed in case anyone wishes to see the changes. You may want to edit these out or even fiddle with it a little more before adding it to the 2.11 snippet list.

Trevor

----- Original Message ----- From: "Risto Vääräniemi" <address@hidden>
To: "Trevor Daniels" <address@hidden>
Cc: "Matthias Loitsch" <address@hidden>; <address@hidden>
Sent: Thursday, April 10, 2008 8:29 AM
Subject: Re: Metronome marks


On 08/04/2008, Trevor Daniels wrote:

It's possible (most things are in LilyPond) but it's not easy (at least I
don't know an easy way).  Essentially you have to create a tiny score
without a staff, etc.  Have a look at
 http://lsr.dsi.unimi.it/LSR/Item?id=204
This should give you some clues, or maybe easier, you can simply copy out
the functions and use them.

The snippet 204 doesn't work very well with 2.11 because it uses
negative padding to position the rhythm mark closer to the staff and
that's not supported by 2.11.

I fiddled with it a bit and found out that if the VerticalAxisGroup
#'Y-extent and VerticalAxisGroup #'minimum-Y-extent are set to #'(0 .
0) the output is more or less agreeable.

The mark is positioned a bit to the right from the center of the note
center, possibly because of the two \hspace #0 (they, or something
else, must be there, otherwise the layout breaks).

-Risto

%%%%%%%
\version "2.11.43"

rhythmMarkStaffReduce = #-4
rhythmMarkLabelFontSize = #-3

rhythmMark = \markup
{
   \line \vcenter
   {
       \combine                     % 1st column in line
       \hspace #0
       \hspace #0
% This fakes a uniform baseline (ie. create common anchor for vcenter)

       \score
       {                     % 2nd column in line
           \new Staff \with
           {
               fontSize = #rhythmMarkStaffReduce
               \override StaffSymbol #'staff-space =
                   #(magstep rhythmMarkStaffReduce)
               \override StaffSymbol #'line-count = #0
               \override VerticalAxisGroup #'Y-extent = #'(0 . 0)
               \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0)
           }
           \relative c'' { \stemUp b8[ b] }

           \layout {
               ragged-right= ##t
               indent = 0
               \context
               {
                   \Staff
                   \remove "Clef_engraver"
                   \remove "Time_signature_engraver"
               }
           } % layout
       } % 1st Score end

       \hspace #0
       \italic \fontsize #rhythmMarkStaffReduce \column { "=" " " }

       \score {                     % 5th column in line

           \new Staff \with
           {
               fontSize = #rhythmMarkStaffReduce
               \override StaffSymbol #'staff-space =
                   #(magstep rhythmMarkStaffReduce)
               \override StaffSymbol #'line-count = #0
               \override VerticalAxisGroup #'Y-extent = #'(0 . 0)
               \override VerticalAxisGroup #'minimum-Y-extent = #'(0 . 0)
           }
           \relative c'' { \stemUp \times 2/3 { b4 b8 } }
           \layout
           {
               ragged-right= ##t
               indent = 0
               \context
               {
                   \Staff
                   \remove "Clef_engraver"
                   \remove "Time_signature_engraver"
               }
           } % layout end
       } % 2nd Score end
   } % line end
} % markup end


\relative c'
{
   c4^\rhythmMark
}
%%%%%%%

Attachment: rhythmMark (2.11).ly
Description: Text Data


reply via email to

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