lilypond-user
[Top][All Lists]
Advanced

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

Set absolute vertical position of staff?


From: Ashley Ward
Subject: Set absolute vertical position of staff?
Date: Tue, 15 May 2012 17:38:26 +0100

Hello all...

I teach drum kit, and I've started using Lilypond to produce short examples of 
various beats.  I'm attaching my first attempt: a single sheet, in PDF format.  
It contains four examples, each one bar long.

I made this by generating a small PDF for each example in Lilypond, and then 
dropping each of these PDFs into a table in Apple's Pages application.  I want 
to use this method so I can position things visually and manually, rather than 
try and write Lilypond code to describe the page layout.  (I wrote my thesis in 
LaTeX a few years back and didn't enjoy fighting it for these kind of problems.)

So far, so good, but... I'd like to generate PDFs from Lilypond where:

1) The PDF has a fixed vertical size.  I've worked out how to do this, and it 
solves the problem with example 3 in my sheet, which appears a little larger 
than the others.

2) Within the PDF, the staff always appears at the same absolute vertical 
position.  By the staff, I mean only the five horizontal lines.  For example, 
the top horizontal line should always appear 10mm from the top of the PDF 
bounding box, whether any note stems protrude above the staff or not.  I'd like 
to do this to make it easy to align the examples correctly with the other 
elements on the page, but I can't see how to achieve this.

So I've solved problem (1), but I'm stuck on problem (2).  I've looked through 
the manual, LSR and mailing list archives.  I've tried the following, but it 
seems to set the Y position of the topmost object, be that staff or stem.  
Instead, I want to set the position of the staff.

  \overrideProperty #"Score.NonMusicalPaperColumn" #'line-break-system-details 
#'((Y-offset . 0)) 

A simplified version of what I'm currently using is below.

Can anyone give me any hints?

Best wishes,

Ashley.


\version "2.15.37"

\book {
  \paper {
    #(set! paper-alist (cons '("my size" . (cons (* 80 mm) (* 26 mm))) 
paper-alist))
    #(set-paper-size "my size")
    top-margin = 0
    bottom-margin = 0
    indent = 0
    left-margin = 0
  }
  \header {
    tagline = ##f
  }
  \score {
    \new DrumStaff {
      \drummode {
        \repeat unfold 4 { bd8 hh8 }
      }
    }
  }
}






Attachment: Black Betty teaching sheet.pdf
Description: Adobe PDF document


reply via email to

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