lilypond-user
[Top][All Lists]
Advanced

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

Re: Creating new context: 3 Questions


From: Abraham Lee
Subject: Re: Creating new context: 3 Questions
Date: Wed, 25 Mar 2015 09:44:13 -0600

Oh, and in case it wasn't clear, this new context definition doesn't inherit ANYTHING. It's a totally new context. You'll notice there are no \remove statements (like for accidentals, clefs, etc.) Since \RhythmicLine doesn't \accept certain engravers, there's no need to \remove them. :-)

- Abraham

On Wed, Mar 25, 2015 at 9:30 AM, tisimst <address@hidden> wrote:
Robert,

Here's what I came up with that should do what you need. It is a modification of the RhythmicStaff context with your settings as I understood them:

%<---------------------------- SNIP ------------------------------

\version "2.18.2" 

scale = #-3
\layout {
  \context{
    \type "Engraver_group"
    \name "RhythmicLine"
    \alias "Staff"
  
    \override VoltaBracket.staff-padding = #3
    \override Stem.neutral-direction = #UP
    \override Beam.neutral-direction = #UP
  
    \consists "Output_property_engraver"
    \consists "Font_size_engraver"
    \consists "Separating_line_group_engraver"
    \consists "Dot_column_engraver"
    \consists "Pitch_squash_engraver"
    \consists "Axis_group_engraver"
  
    \accepts "Voice"
    \defaultchild "Voice"
  
    \override TupletNumber.font-size = \scale
    \override Stem.font-size = \scale
    \override Flag.font-size = \scale
    \override NoteHead.font-size = \scale
    \override Rest.font-size = \scale
    \override NoteHead.style = #'slash
    
    squashedPosition = #0
    \override VerticalAxisGroup.staff-staff-spacing =
      #'((basic-distance . 0) (minimum-distance . 2) (padding . 1))
  
    createSpacing = ##t
    
    \description "A context like @code{RhythmicStaff} but for printing rhythms.
  Pitches are ignored; the notes are printed as slashes without any staff lines."
  
  }
  \context {
    \Score
    \accepts "RhythmicLine"
  }
}

\score{ 
  << 
    \new RhythmicLine { \repeat unfold 2 { c4. r8 c4. r8 } }
    \new Staff \new Voice { \repeat unfold 2 { c'4 d' e' f' } }
  >> 
}

%<---------------------------- SNIP ------------------------------

HTH,
Abraham

On Wed, Mar 25, 2015 at 9:02 AM, Paul Morris [via Lilypond] <[hidden email]> wrote:
Paul Morris wrote
  \context { \Staff \accepts "RhythmicLine" }
Ah-ha! this should be

  \context { \Score \accepts "RhythmicLine" }

since RhythmicLine is a kind of staff context (rather than a kind of voice context).  Then \remove works as expected.

-Paul


If you reply to this email, your message will be added to the discussion below:
http://lilypond.1069038.n5.nabble.com/Creating-new-context-3-Questions-tp173645p173653.html
To start a new topic under User, email [hidden email]
To unsubscribe from Lilypond, click here.
NAML



View this message in context: Re: Creating new context: 3 Questions
Sent from the User mailing list archive at Nabble.com.

_______________________________________________
lilypond-user mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/lilypond-user



reply via email to

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