lilypond-user
[Top][All Lists]
Advanced

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

Problems with Piano Staff Template


From: Mark Austin
Subject: Problems with Piano Staff Template
Date: Mon, 1 Jun 2009 08:38:39 +0100

I'm trying to engrave a set of tunes. It uses the Piano format with
centred dynamics, so I used the template in the Learning manual,
editing out the stuff used in the manual. However, I can't change the
tempo or key. I've edited the global variable as shown, but it still
comes out in C and common time. Have I removed something I shouldn't
have, or have I missed something

Here's the code:

\version "2.12.0"

\include "english.ly"

\paper {
        #(define dump-extents #t)
        line-width = 160\mm - 2.0 * 0.4\in
        ragged-right = ##t
        force-assignment = #""
        line-width = #(- line-width (* mm  3.000000))
}

\layout {

}

\header {

}

global = {
        \key g \major
        \time 6/8
}

upper = \relative c''' {
        \clef treble
        g8[ fs g] d4.
}

lower = \relative c {
        \clef bass
        \stemDown
        g8[( d' g)] g,[( d' g)]
}

dynamics = {
        s8\mf
}

pedal = {

}

\score {
  \new PianoStaff = "PianoStaff_pf" <<
    \new Staff = "Staff_pfUpper" \upper
    \new Dynamics = "Dynamics_pf" \dynamics
    \new Staff = "Staff_pfLower" << \lower >>
    \new Dynamics = "pedal" \pedal
  >>

  \layout {
    % define Dynamics context
    \context {
      \type "Engraver_group"
      \name Dynamics
      \alias Voice
      \consists "Output_property_engraver"
      \consists "Piano_pedal_engraver"
      \consists "Script_engraver"
      \consists "New_dynamic_engraver"
      \consists "Dynamic_align_engraver"
      \consists "Text_engraver"
      \consists "Skip_event_swallow_translator"
      \consists "Axis_group_engraver"

      pedalSustainStrings = #'("Ped." "*Ped." "*")
      pedalUnaCordaStrings = #'("una corda" "" "tre corde")
      \override DynamicLineSpanner #'Y-offset = #0
      \override TextScript #'font-size = #2
      \override TextScript #'font-shape = #'italic
      \override VerticalAxisGroup #'minimum-Y-extent = #'(-1 . 1)
    }
    % modify PianoStaff context to accept Dynamics context
    \context {
      \PianoStaff
      \accepts Dynamics
    }
  }
}

\score {
  \new PianoStaff = "PianoStaff_pf" <<
    \new Staff = "Staff_pfUpper" << \global \upper \dynamics \pedal >>
    \new Staff = "Staff_pfLower" << \global \lower \dynamics \pedal >>
  >>
  \midi { }
}

-- 
Mark Austin

----------
For Whigs admit no force but argument
----------

Attachment: Channel Quadrilles.ly
Description: Text Data

Attachment: Channel Quadrilles.pdf
Description: Adobe PDF document


reply via email to

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