lilypond-user
[Top][All Lists]
Advanced

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

Re: relative mode occasionally gets forgotten?


From: Tim McNamara
Subject: Re: relative mode occasionally gets forgotten?
Date: Fri, 15 May 2009 09:22:43 -0500

I'm not sure that the relative mode "gets forgotten" but that LilyPond follows its own internal rules. I find that LilyPond behaves the way that the manual says it does: it picks the closest pitch. If I write { c2 a2 } it picks the A below that C rather than the A above that C. If I want the A above the C, I write { c2 a'2 } and all is well. Sometimes when I first compile the song there are pitches wildly out of their intended octave; then it's a matter of finding the proper places to change the pitch octaves with ' or , and the problem is usually solved with two or three of these. Pretty quick and simple without needing to resort to sticking \relative commands into the middle of the music information- something I hate doing because it makes it hard to "debug" the song.

I use LilyPond to write out jazz lead sheets using the template below (with some modifications, e.g., \include and \repeat etc., as needed) which shows how I use the \relative command. When I transpose the music, I use two \transpose commands, one before each of the \relative commands. This seems to minimize the problems reported by the OP. Someone on the list sent me this template but I can't remember who it was. It works very well for my purposes and probably would not work well for many other purposes and perhaps not the OP's.


\version "2.12.2"

\paper {
    indent = 0.0

}

\header {
  title = ""
  composer = ""
  meter = ""
  copyright = ""
}

harmonies = \chordmode {



}

melody = \relative c' {
\override Staff.TimeSignature #'style = #'()
\time 4/4
\clef treble
\key

\bar "|:"

\bar ":|"

}


\addlyrics  {



}

\score {
  <<
    \new ChordNames {
      \set chordChanges = ##t
      \harmonies
    }
    \new Staff \melody
  >>

}





reply via email to

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