lilypond-user
[Top][All Lists]
Advanced

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

Re: Set accidental style in the layout block


From: Jay Anderson
Subject: Re: Set accidental style in the layout block
Date: Fri, 1 Jul 2011 22:51:07 -0700

On Fri, Jul 1, 2011 at 8:54 PM, Bill Mooney <address@hidden> wrote:
> Does this achieve something different from what the NM example I quoted
> does? and, if so, what?

It should do about the same thing. The main advantage is that it
avoids littering files with #(set-accidental-style ...). You put it in
only one spot. If you chose to change it there's only one place to
modify. I like to put it in a separate file (e.g. defs.ily) and
include it into all of the different lilypond files that generate
scores (e.g. violin.ly, piano.ly, etc.). If you're entering something
with only one line of music I think there's still an advantage in
being able to reuse previous definition files.

Here's an instrument+piano example for how I generally like to lay
projects out. I think it keeps each individual file tidy and avoid
duplicating settings in each staff.
* Put as many changes/tweaks from defaults as possible in the file
where you keep your main layout block file.
* Keep a separate outline to put bars, tempos, marks, etc.
* Keep music definitions in separate files from layout.

defs.ily
=====
\version "2.14.1"

\layout
{
  \context
  {
    \Score
    skipBars = ##t
    extraNatural = ##f
    autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0)
                               ,(make-accidental-rule 'any-octave 0)
                               ,(make-accidental-rule 'same-octave 1))
  }
}
=====

flute.ily
=====
\version "2.14.1"

flute = \relative c''
{
  \key ees \major
  ees4 e8 ges f16 e ees d cis8 a |
  a'4 aes g2 |
}
=====

flute.ily
=====
\version "2.14.1"

\include "defs.ily"
\include "outline.ily"
\include "flute.ily"

\score
{
  \new Staff << \flute \outline >>
}
=====

outline.ily
=====
\version "2.14.1"

outline =
{
  \tempo "Friabile" 4=120
  s1*2 | \bar "|."
}
=====

piano.ily
=====
\version "2.14.1"

top = \relative c'
{
  \clef treble
  \key ees \major
  ees4 e f fis |
  f2 ees |
}

bot = \relative c
{
  \clef bass
  \key ees \major
  ees4 c b cis |
  d2 ees |
}

dyn =
{
  s1\f |
  s\p |
}
=====

piano.ly
=====
\version "2.14.1"

\include "defs.ily"
\include "outline.ily"
\include "flute.ily"
\include "piano.ily"

\score
{
  <<
    \new Staff \flute
    \new PianoStaff
    <<
      \new Staff=top << \top \outline >>
      \new Dynamics \dyn
      \new Staff=bot \bot
    >>
  >>
  \layout{}
  \midi{}
}
=====

-----Jay



reply via email to

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