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: Kieren MacMillan
Subject: Re: Set accidental style in the layout block
Date: Sun, 3 Jul 2011 18:42:34 -0400

Hi Bill,

> Unfortunately such an exercise is beyond my abilities. :(

Well, for the archive, here's a quick stab at a few:

\version "2.15.3"

\layout { indent = 1.2\in }

accidentalsDefault = \with {
  skipBars = ##t
  extraNatural = ##f
  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0))
}
accidentalsVoice = \with {
  skipBars = ##t
  extraNatural = ##f
  autoAccidentals = #`(Voice ,(make-accidental-rule 'same-octave 0))
}
accidentalsModern = \with {
  skipBars = ##t
  extraNatural = ##f
  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave 0)
                             ,(make-accidental-rule 'any-octave 0)
                             ,(make-accidental-rule 'same-octave 1))
}
accidentalsDodecaphonic = \with {
  skipBars = ##t
  extraNatural = ##f
  autoAccidentals = #`(Staff ,(lambda (c p bn mp) '(#f . #t)))
}
accidentalsForget = \with {
  skipBars = ##t
  extraNatural = ##f
  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave -1))
}
accidentalsNoReset = \with {
  skipBars = ##t
  extraNatural = ##f
  autoAccidentals = #`(Staff ,(make-accidental-rule 'same-octave #t))
}

theNotes = \relative c' {
  c8 fis bes aes a aes a aes
  eis8 f fis g ges a ges g
}

\score {
  <<
    \new Staff \with { instrumentName = "Default" \accidentalsDefault } 
\theNotes
    \new Staff \with { instrumentName = "Forget" \accidentalsForget } \theNotes
    \new Staff \with { instrumentName = "Modern" \accidentalsModern } \theNotes
    \new Staff \with { instrumentName = "NoReset" \accidentalsNoReset } 
\theNotes
    \new Staff \with { instrumentName = "Dodecaphonic" \accidentalsDodecaphonic 
} \theNotes
  >>
}

Hopefully someone with more time than I currently have will grab the ball and 
run with it.

Hope this helps!
Kieren.


reply via email to

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