lilypond-user
[Top][All Lists]
Advanced

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

Creating new context: 3 Questions


From: Robert Schmaus
Subject: Creating new context: 3 Questions
Date: Wed, 25 Mar 2015 14:50:11 +0100
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

Hi Ponderers,

I have tried a couple of times now but can't get this to work. Maybe
someone sees my mistake ...

I've checked out section "Defining new contexts" of the manual
(http://lilypond.org/doc/v2.18/Documentation/notation/defining-new-contexts)
and tried to do the following: I'd like to create a context that acts
sort of like a RhythmicStaff, but is much smaller, without any staff
lines, time signatures etc, just very small notes above another staff.

The following code does this more or less:

-----------------

scale = #-3
\score{

 <<
   \new RhythmicStaff \with {

     \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
     \consists Pitch_squash_engraver
     squashedPosition = #0

     \stemUp
     \override VerticalAxisGroup.staff-staff-spacing =
#'((basic-distance . 0) (minimum-distance . 2) (padding . 1))

     \remove Clef_engraver
     \remove Staff_symbol_engraver
     \remove Time_signature_engraver
     \remove Accidental_engraver

   } {  c4. r8 c4. r8 }

   \new Staff \new Voice { c4 d e f }
}

-----------------


What I *don't* get to work is something like this:


-----------------
\score{

 <<

   \new RhytmicLine {  c4. r8 c4. r8 }
   \new Staff \new Voice { c4 d e f }
}

 \layout {

   \context {

     \name "RhythmicLine"
     \type "Engraver_group"
     \alias "RhythmicStaff"

     \consists Pitch_squash_engraver
     squashedPosition = #0

     \consists "Rhythmic_column_engraver"
     \consists "Note_heads_engraver"
     \override NoteHead.style = #'slash
     \consists "Stem_engraver"
     \consists "Beam_engraver"

     \hide BarLine
   }

   \context { \Staff \accepts "RhythmicLine" }
 }
-----------------

So my first question is: why doesn't this work?

My second question is: In the manual, there's the \consists command.
Afaics, there is no \remove command. It was my impression that the \alias 
command specifies a "frame of reference" to which content can be added and (??) 
removed. So that I could simply choose the best context for what I want and 
customize that.
Am I right in that or are new contexts always empty per se, and I can only 
*add* things?

My third question is: how can I set up the context (or \with block) s.t.
the notes and rests keep their normal-size proportions but are simply scaled 
down? The font-size approach which i used in the \with block is a bit tricky, 
in particular it
keeps the stem lengths in the normal-font size. And I'd like to simply scale 
everything down as is. 

Thanks for your help!
Best, Robert 


reply via email to

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