Tim McNamara wrote:
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.
Here is an example of the issue I came across -
r4 r8 ef~ ef d c bf
a4. g8~ g2~
g2-- r
In any mode the tied notes are the same octave, of course. But for
whatever reason, with the \transpose and the \relative split as
originally described, they were in different octaves, which obviously,
broke the ties. Putting the \transpose ef f \relative c' together fixed
the problem. With the \transpose and \relative split there were quite a
few random instances of such odd octave issues, some would be just a
single note or two, others 3 or 4 measures of music where almost every
other note jumped octaves up and down. It's really a weird thing to see.
In my template I typically use \transpose x x \relative x but for
whatever reason I don't even recall now I moved the \transpose up to the
notes section of the code. I think what I did was entered the notes of
the tenor sax part in their actual tenor sax key (and all other
instruments in concert key), then \transposed them, the tenor sax notes,
down to concert key for the purpose viewing the score entirely in
concert key. Thus the tenor sax part had the really wicked octave issue.
Regards
--
Chip
I used the following template for all my transcriptions of texmex and
tejano music (for a 7 piece horn section)-
% LilyPond
\include "english.ly"
\version "2.12.2"
\header{
title = " "
composer = "As Recorded By: "
arranger = "Transcribed by: Chip Wiegand"
}
global = { \time 4/4 \key bf \major
#(override-auto-beam-setting '(end 1 8 * *) 1 4 'Staff)
#(override-auto-beam-setting '(end 1 8 * *) 2 4 'Staff)
#(override-auto-beam-setting '(end 1 8 * *) 3 4 'Staff)
\override Glissando #'thickness = #3
\override Glissando #'style = #'zigzag
\override Glissando #'minimum-length = #6
\override Glissando #'springs-and-rods = #ly:spanner::set-spacing-rods
\override MultiMeasureRest #'expand-limit = 1
\set Score.skipBars = ##t
\numericTimeSignature
}
\paper {
top-margin = 0.1\cm
page-top-space = 0.1\cm
ragged-bottom = ##t
left-margin = 20\mm
line-width = 175\mm
}
tagline = \markup {
\simple #(strftime "%b %d, %Y" (localtime (current-time)))
\with-url #"http://lilypond.org/web/"
{ LilyPond \simple #(lilypond-version) (http://lilypond.org/) }
}
% ------ Trumpet 1------
trpta = {}
trumpeta = \transpose bf c \relative c'' {
\global
\set Staff.instrumentName = #"Trumpet 1"
\set Staff.shortInstrumentName = #"Trpt 1"
\clef treble
<< \trpta >>
}
% ------ Trumpet 2------
trptb = {}
trumpetb = \transpose bf c \relative c'' {
\global
\set Staff.instrumentName = #"Trumpet 2"
\set Staff.shortInstrumentName = #"Trpt 2"
\clef treble
<< \trptb >>
}
% ------ Alto Sax 1 ------
altoa = {}
altosaxa = \transpose bf g \relative c'' {
\global
\set Staff.instrumentName = #"Alto Sax"
\set Staff.shortInstrumentName = #"Alto"
\clef treble
<< \altoa >>
}
% ------ Tenor------
tenor = {}
tenorsax = \transpose bf c \relative c'' {
\global
\set Staff.instrumentName = #"Tenor Sax"
\set Staff.shortInstrumentName = #"Tenor"
\clef treble
<< \tenor >>
}
% ------ Bari------
bari = {}
barisax = \transpose bf g \relative c''{
\global
\set Staff.instrumentName = #"Bari Sax"
\set Staff.shortInstrumentName = #"Bari"
\clef treble
<< \bari >>
}
% ------ Trombone 1------
tbonea = {}
trombonea = \relative c {
\global
\set Staff.instrumentName = #"Trombone 1"
\set Staff.shortInstrumentName = #"Tbn 1"
\clef bass
<< \tbonea >>
}
% ------ Trombone 2------
tboneb= {}
tromboneb = \relative c {
\global
\set Staff.instrumentName = #"Trombone 2"
\set Staff.shortInstrumentName = #"Tbn 2"
\clef bass
<< \tboneb >>
}
\book { \score {
<<
\new StaffGroup = "trumpets" <<
\new Staff = "trpta" \trumpeta
\new Staff = "trptb" \trumpetb >>
\new StaffGroup = "saxes" <<
\new Staff = "altoa" \altosaxa
\new Staff = "tenor" \tenorsax
\new Staff = "bari" \barisax >>
\new StaffGroup = "trombones" <<
\new Staff = "tbonea" \trombonea
\new Staff = "tboneb" \tromboneb>>
>> } }
\book { \score { << \new Staff = "trumpeta" \with { \remove
Instrument_name_engraver } \trumpeta >> \header {piece="Trumpet 1"}
\layout { indent = 0\mm} } }
\book { \score { << \new Staff = "trumpetb" \with { \remove
Instrument_name_engraver } \trumpetb >> \header {piece="Trumpet 2"}
\layout { indent = 0\mm} } }
\book { \score { << \new Staff = "altosaxa" \with { \remove
Instrument_name_engraver } \altosaxa >> \header {piece="Alto Sax"}
\layout { indent = 0\mm} } }
\book { \score { << \new Staff = "tenorsax" \with { \remove
Instrument_name_engraver } \tenorsax >> \header {piece="Tenor Sax"}
\layout { indent = 0\mm} } }
\book { \score { << \new Staff = "barisax" \with { \remove
Instrument_name_engraver } \barisax >> \header {piece="Baritone Sax"}
\layout { indent = 0\mm} } }
\book { \score { << \new Staff = "trombonea" \with { \remove
Instrument_name_engraver } \trombonea >> \header {piece="Trombone 1"}
\layout { indent = 0\mm} } }
\book { \score { << \new Staff = "tromboneb" \with { \remove
Instrument_name_engraver } \tromboneb >> \header {piece="Trombone 2"}
\layout { indent = 0\mm} } }
\layout { \context { \Score } }
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
>>
}
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user
------------------------------------------------------------------------
No virus found in this incoming message.
Checked by AVG - www.avg.com
Version: 8.5.325 / Virus Database: 270.12.30/2115 - Release Date: 05/14/09 17:54:00
_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user