lilypond-user
[Top][All Lists]
Advanced

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

Problem with line breaks and guitar chords


From: David Bellows
Subject: Problem with line breaks and guitar chords
Date: Fri, 15 Aug 2014 13:24:13 -0700

Hello all,

I'm developing a program that does various things to sounds including
various ways of creating scores. One of the things intends to produce
simple guitar chords with fret diagrams, chord names, and strumming
patterns by generating a Lilypond file. I'm currently using the
ragged-right = ##t option in the layout section and most of the time
the results are fine. However, if you compile the following code it
provides an exception as the last line runs way off into the margin
and the last four notes are lost.

>From the documentation I'm guessing the reason this is happening is
that the bar lines aren't being properly accounted for on my end as I
am not breaking up durations across bar lines. While maybe, someday,
I'll be able to figure out how to eliminate that problem on my end I
was wondering if there was a way to get Lilypond to skip to the next
line anyway without any kind of manual intervention. There are
something like 2.5 quintillion scores that can be potentially produced
by this software so there is no way to handle them manually.

(Note, I've included the Lilypond file exactly as my program created
it minus the spacing).

Thanks, Dave

\version "2.19.11"
\header {
  dedication = "(For Some Dead Thing)"
  title = "Threnody"
  subtitle = ""
  subsubtitle = ""
  instrument = "Guitar"
  poet = ""
  composer = "David Bellows"
  arranger = "Kosmos Noetos"
  tagline = ""
  copyright = "© 15 August 2014"
}
\language "english"
\include "predefined-guitar-fretboards.ly"
\score {
<<
\new ChordNames {
\chordmode {
c4 g4 g4 c4 c8 c8 g4 g8 c8 c4 c8 c4 g4 g8 g4 g4 c4 c8 c4 c4 g8 c4 c4
f4 c4 c4 g4 f8 g8 g8 c4 c4 a4:m f4 g4 f4 \bar "|."
}
}
\new FretBoards {
\chordmode {
c4 g4 g4 c4 c8 c8 g4 g8 c8 c4 c8 c4 g4 g8 g4 g4 c4 c8 c4 c4 g8 c4 c4
f4 c4 c4 g4 f8 g8 g8 c4 c4 a4:m f4 g4 f4 \bar "|."
}
}
\new Voice \with {\consists "Pitch_squash_engraver"}
{
\relative c'' {
\improvisationOn
c4 g4 g4 c4 c8 c8 g4 g8 c8 c4 c8 c4 g4 g8 g4 g4 c4 c8 c4 c4 g8 c4 c4
f4 c4 c4 g4 f8 g8 g8 c4 c4 a4 f4 g4 f4
}
}
>>
\layout{ragged-right = ##t}
\midi{}
}



reply via email to

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