lilypond-user
[Top][All Lists]
Advanced

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

Re: piano dynamics


From: Mats Bengtsson
Subject: Re: piano dynamics
Date: Sat, 15 Dec 2001 22:33:18 +0100

> Has anyone figured out how to do dynamic markings centered vertically in the
> PianoStaff instead of associated with upper or lower clef?
> I saw someone refer someone to a template called piano-dynamics.ly but this
> is not in my installation.  Does anyone else have this template?

It's only included in the most recent development versions, 
but I've attached a copy for the 1.4.x series below.

  /Mats

\version "1.4.1"

\header {
  dedication = "dedication"
  title = "Title"
  subtitle = "Subtitle"
  subsubtitle = "Subsubtitle"
  composer = "Composer (xxxx-yyyy)"
  opus = "Opus 0"
  piece = "Piece I"
  instrument = "Instrument"
  arranger = "Arranger"
  poet = "Poet"
  texttranslator = "Translator"
  copyright = "public domain"
  enteredby = "jcn"
  source =  "urtext"
}

upper = \notes\relative c'' {
  a b c d
}

lower = \notes\relative c {
  a2 c
}

dynamics = \notes {
  \outputproperty #(make-type-checker 'dynamic-interface)
    #'extra-offset = #'(0 . 2.5)
  s2\fff\> s4
  \outputproperty #(make-type-checker 'dynamic-interface)
    #'extra-offset = #'(0 . 2.5)
  \!s\pp
}

pedal = \notes {
 s2\sustainDown s2\sustainUp
}

\score {
  \context PianoStaff <
    \context Staff=upper \upper
    \context Dynamics=dynamics \dynamics
    \context Staff=lower <
      \clef bass
      \lower
    >
    \context Dynamics=pedal \pedal
  >
  \paper {
    \translator {
      \type "Engraver_group_engraver"
      \name Dynamics
      \consists "Output_property_engraver"
      Generic_property_list = #generic-voice-properties
      \consists "Property_engraver"
      MinimumVerticalExtent = #'(-1 . 1)

      pedalSustainStrings = #'("Ped." "*Ped." "*")
      pedalUnaCordaStrings = #'("una corda" "" "tre corde")
      
      \consists "Piano_pedal_engraver"
      \consists "Script_engraver"
      \consists "Dynamic_engraver"
      \consists "Text_engraver"

      TextScript \override #'font-relative-size = #1
      TextScript \override #'font-shape = #'italic

      \consists "Skip_req_swallow_translator"

      \consistsend "Axis_group_engraver"
    }
    \translator {
      \PianoStaffContext
      \accepts Dynamics
      VerticalAlignment \override #'forced-distance = #7
    }
  }
  \midi {
    \translator {
      \type "Performer_group_performer"
      \name Dynamics
      Generic_property_list = #generic-voice-properties

      \consists "Piano_pedal_performer"
      \consists "Span_dynamic_performer"
      \consists "Dynamic_performer"
    }
    \translator {
      \PianoStaffContext
      \accepts Dynamics
    }
  }
}

reply via email to

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