lilypond-user
[Top][All Lists]
Advanced

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

Re: layout doesn't work as I expected


From: Kieren MacMillan
Subject: Re: layout doesn't work as I expected
Date: Tue, 4 Feb 2020 23:29:20 -0500

Hi there,

> I would like to be able to specify different measure lenghts for each staff
> independently and I am doing this in the layout options.
> What is happening in that when I put the layout option after my score it
> doesn't affects nothing at all, when I put it after the pdf file will not be
> generated.

Since you have a \midi block in your score, there is no PDF generated. Here’s a 
tweaked version of your code which (I believe) does what you want:

%%%
\version "2.18.2"
\language "italiano"

\header {
  title = "Ritmic"
}

% rendo i due pentagrammi indipendenti
\layout {
  \context {
    \Score
    \remove "Timing_translator"
    \remove "Default_bar_line_engraver"
  }
  \context {
    \DrumStaff
    \consists "Timing_translator"
    \consists "Default_bar_line_engraver"
  }
}

rul = \drummode {
  \time 3/8
  dc4 dc8
  dc dc dc
}

timp = \drummode {
  % timh4 ssh timl8 ssh r timh r4 ssh8 timl
  \time 2/8
  timh4
  timl
}

\score {
  <<
    \new DrumStaff \with {
      instrumentName = #"timpani"
      drumStyleTable = #timbales-style
      \override StaffSymbol.line-count = #2
      \override BarLine.bar-extent = #'(-1 . 1)
    }
    <<
      \timp
    >>
    \new DrumStaff \with {
      instrumentName = #"rullante"
      %drumStyleTable = #timbales-style
      \override StaffSymbol.line-count = #1
      %\override BarLine.bar-extent = #'(-1 . 1)
    }
    <<
      \rul
      % \new DrumVoice { \stemUp \timp }
      %  \new DrumVoice { \stemDown \rul }
    >>
  >>
}
%%%

Note that I’ve also cleaned up your code, especially in terms of indentation 
and line breaks — it will be easier for you and others to read your code if you 
try to follow good Lilypond coding conventions.

I hope this helps!
Kieren.
________________________________

Kieren MacMillan, composer (he/him/his)
‣ website: www.kierenmacmillan.info
‣ email: address@hidden




reply via email to

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