lilypond-user
[Top][All Lists]
Advanced

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

Re: incipit index help


From: Mats Bengtsson
Subject: Re: incipit index help
Date: Tue, 11 Oct 2005 09:49:12 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050511

I don't understand what Donald talked about. The syntax for
a \score{...} block is
\score{
 music_expression
 optional_layout_block
 optional_midi_block
 optional_header_block
}
and as soon as you have more than a single note, the music expression
is formed by including several notes within curly braces, for example
\score{
{c d e f}
}

(of course, if you have several simultaneous staves/voices, then the
top level music_expression is << ... >> so the score block looks like
\score{<< ... >> }).

As long as you follow this structure, there's no limit to how many \score{...}
blocks you can have in a single file.

LilyPond does actually specify which of your score blocks has a problem
if you look at the line numbers in the error message. The problematic
score block is

\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

\partial 8 b8 e'2 g'8 e' b e' |
        g'4 g'8. a'16 g'2\grace e'8  |
        g'2 a'8 g' e' g' |
        a'4. b'8 a'2 |
%5
        a'4 b'\prall  g'2 |
        g'4 a'\prall  e'2 \grace e'8  |
        a'4 a'  g'8. fis'16 e'8. fis'16 |
        g'2 \afterGrace b2
   }
}

Unfortunately, the error message doesn't point out exactly what the
problem is, but if you look carefully, you will notice that the snippet
ends with an incomplete \afterGrace command. LilyPond expects the
grace note to come after the b2 and gets confused when it instead finds
a right-hand curly brace. Just include the grace note as well and everything
should work without problems.

  /Mats


Aaron Mehl wrote:

Hi all,
A friend of mine who is a python person wrote a script
to create and index file from aprox the first 25 notes
of each lilypond file in a directory and dump them
into a lilypond file.

There are some problems such as what to do with
\repeats and \breaks but I resolved to edit the
resulting file manually.

my attempt at this has failed because I keep getting
an error that my {} aren't matching.
But look as hard as I can I just can't catch the
error.

If anyone is interested in the script I can post it to
a site on the net.

but here is the file that it generated after I removed
the repeats and breaks.

\version "2.7.6"

\paper {
 #(define dump-extents #t)

 linewidth = 160\mm
 indent = 0\mm
}
#(set-global-staff-size 14 )
\layout { raggedright = ##t }


\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 e'8
        a'4 gis'8 f' e'4. e'8 |
        gis'16 gis'8. ~ gis'4. e'8 gis' b' |
        \time 3/4 a' gis' f'4. e'8 |
%5
        d'2 r8 e'  |
        \time 4/4 a'4. b'8 c''4 b'8 a' |
        \time 3/4 gis'2. |
        \time 4/4 a'4. b'8 c'' b' d''16 c'' b' a' |
        gis'4. f'8 e'4. e'8 |
%10
        e' f' gis'4
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   b4 b\override Script #'padding = #1  dis'\turn c'8
b |
        e'1 |
        fis'4 g' a' fis' |
        g'1 |
%5
        fis'4 g'8 a' g'4 fis' |
e'1 e'4 fis'8 g' fis'4 e'|
        dis'1|
        b4 b dis'\turn cis'8 dis'|
%10
e'1 b4 b dis'\turn c'8 b |
        e'1\grace e'8 |
        fis'4 g' a' fis' |
        g'1\grace g'8 |
%15
        fis'4 g'8
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   b8 e' g' b' ais' b' g' b' |
        ais' b' g' b' a' g' fis' e' |
        r d'' cis'' b' ais' g' fis' e' |
        ais' cis'' b'2. |
%5
        r8 e' g' b' ais' b' g' b' |
        ais' b' g' b' a' g' fis' e' |
        r g' a' b' a' g' fis' e' |
        fis' g' e'2 ~ e'8 b' |

%repeat goes here
        e''4. d''8\prall e''4. d''8\prall |

%10
        \time 4/4 g'' fis'' e''4. d''8 cis'' d'' |
        \time 3/4 e'' d'' cis''4. b'8 |
        cis'' b' ais'4. g'8 |
        \time 4/4 ais' b' cis'' b' ais'\prall g' fis' e' |
%firstending
        ais' cis'' b'2.
%15
        e''4. d''8\prall e''4. d''8\prall |

%10
        \time 4/4 g'' fis'' e''4. d''8 cis'' d'' |
        \time 3/4 e'' d'' cis''4. b'8 |
        cis'' b' ais'4. g'8
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

\partial 8 b8 e'2 fis'16 e'8. fis'16 e'8.\grace e'8 |
        dis'4. dis'8 b2 |
        dis'16 b8. g'16 fis'8.\turn e'4. b16 b16  |
%5
        \time 3/4 e'4 e'2 |
        \time 4/4 fis'16 e'8. fis'16 e'8. dis'4 b4
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 b8 |
        g'4 e' e' e'8\tenuto b |
        g'4 e'4 e'8 fis'16 e'16 dis'8 b8 |
        dis'8 fis'  e'2 b4 |
%5
g' fis'8 e' fis'4 dis'8 b dis' fis' e'2 b'4 ais'8. cis''16 b'4 b' b'8. b'16 |
        ais'8. cis''16
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 d''8 |
d''8\override Script #'padding = #1 g''8\fermata r8
d''8 \grace { b'16([ c''16 d''16 e''16 ]) } d''4. b'8
|
\times 2/3 {b'8 d''8 c''8 } b'4. a'8 g'4 |
\grace d''8 d''8 g''8 r8 d''8 \grace { b'16([ c''16
d''16 e''16 ])  } d''4.
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 d''8 |
d''8\override Script #'padding = #1 g''8\fermata r8
d''8 \grace { b'16([ c''16 d''16 e''16 ]) } d''4. b'8
|
\times 2/3 {b'8 d''8 c''8 } b'4. a'8 g'4 |
\grace d''8 d''8 g''8 r8 d''8 \grace { b'16([ c''16
d''16 e''16 ])  } d''4.
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 b'8 |
        e''2 b'4. b'8 |
\time 3/4 c''16 b' a'8 b'4. a'16 a'|
        b'2 a'4 |
%5
        \time 2/4 a'8\prall b'16 a' g'8 fis' |
        \time 3/4 g'2 b'8 b' |
        b'4. c''16 b' ais'   b' \grace { \stemDown b'16[
ais'] } \stemUp c'' ais' \time 2/4 fis'8 dis' r dis'16 dis' |
        \time 3/4 dis'8 c'\prall b4 r8 b16 b |
%10
        b4 c'32
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   e'2 g'8 e' b e' |
        g'2 g' |
        g' a'8 g' e' g' |
        a'2 a' |
%5
        a'4 b' g'2 |
        g'4 a' \afterGrace e'2 {e'8} |
        a'2 g'8. fis'16 e'8 fis' |
        g'1 |
        e'2 g'8 e' b e' |
%10
        g'4. a'8 g'2 |
        g' a'8 g' e' g' |
        a'4 b'8 a' a'2 |
        a'4
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

\partial 8 b8 e'2 g'8 e' b e' |
        g'4 g'8. a'16 g'2\grace e'8  |
        g'2 a'8 g' e' g' |
        a'4. b'8 a'2 |
%5
        a'4 b'\prall  g'2 |
        g'4 a'\prall  e'2 \grace e'8  |
        a'4 a'  g'8. fis'16 e'8. fis'16 |
        g'2 \afterGrace b2
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 4 b4 |
        e'4. dis'16 dis' e'4. dis'16 dis'16  |
        e'4. fis'8 g'4. b8 |
        e'4. dis'16 dis' e'4. dis'16 dis'  |
%5
        e'4. fis'8 g'4. e'8 |
        \time 3/4 g'4 fis' e'16 e'8. |
        fis'4 e' dis' |
        e'2 fis'4 |
        \time 3/4 g'2
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 4 b4 |
        e'4 fis'8 g'8 a'4 g'8 fis'  |
        \time 5/4  a'4 g' b e' r8 e'8|
        \time 4/4 e'4 fis'8 g' a'4 g'8 fis'  |
        a'4 g'  b e'|
%5
        
        e'4 fis'8 g' a'4 b'8 a' |
        g'4 a'8 g' fis'4 g'8 fis'\grace fis'8|
        e'4 d' g' fis' |
        e'2.~e'8
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   e'4 e''8 c'' b' a' b' c'' |
        a'4 a' a' a' |
        gis'8 a' b' c'' b' gis' a' f' |
        e'4 gis'4 gis' gis'4 \grace e'16 |
%5
        a'8 gis' a' f' e' d' f' a' |
        d'4 d'8. d'16 d'4 d'4 \grace d''16 |
        d'' c'' b' a' b' a' gis' f' gis' f' e' d' gis' a'
gis' \afterGrace f' e' |
        a'2.
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 e'8 |
        g'8. fis'16 e'4. fis'8 |
        g'8. fis'16 e'4. \times 2/3 { g'16. fis'32 e'16 } |
        g'4 b'4. b'8 |
%5
        g'4 fis' a'8 fis' |
        a'4 a' a'8 fis' |
        a'4 a' a' |
        \time 4/4 b'16. a'32 g'16 fis' e'4 g'8 b'4
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 4 e'4 |
        g' g' g' g' |
        fis'8 g' a' b' a' g' \grace g'16 fis'8 e'16 g' |
        fis'4 fis' fis' fis' |
%5
        fis'8 b g' fis'\grace {fis'16} e'8 b e' fis' |
        g'4 g' g' g' |
        fis'8 g' a' b' \grace {b'16 } a'8 g' fis' e'16 g' |
%no tie on ornament please
        fis'4 fis'\grace fis'8 fis'4 b' |
        \grace { fis'16[ fis'] } fis'8 b g' fis' e' b e' fis'
|
%10
%flip grace notes

        g'4 b'8 g' fis'[ \grace { \override Stem #'direction
= #-1
g'16[ fis'16] \revert Stem #'direction
                              } e'16 fis'] g'8
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 e'8
        a'4 gis'8 f' e'4. e'8 |
        gis'16 gis'8. ~ gis'4. e'8 gis' b' |
        \time 3/4 a' gis' f'4. e'8 |
%5
        d'2 r8 e'  |
        \time 4/4 a'4. b'8 c''4 b'8 a' |
        \time 3/4 gis'2. |
            }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   b4 b dis'\turn c'8 b |
        e'1 |
        fis'4 g' a' fis' |
        g'1 |
%5
        fis'4 g'8 a' g'4
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble
b8 g'8 e'4 e'4 e'8 b8 |
b8 g'8 e'4 e'4 dis'8 b8 |
dis'8 fis'8  e'2 b4|
g'4 fis'8 e' fis'4 dis'8 b8 |

% Bar 5
dis'8 fis'8 e'2. |
ais'8
   }
}
\score {
{
 \set Staff.midiInstrument = "oboe"
   \time 4/4
   \key e \minor
   \clef treble

   \partial 8 e'8
        a'4 gis'8 f' e'4. e'8 |
        gis'16 gis'8. ~ gis'4. e'8 gis' b' |
        \time 3/4 a' gis' f'4. e'8 |
%5
        d'2 r8 e'  |
        \time 4/4 a'4. b'8 c''4 b'8 a' |
        \time 3/4 gis'2. |
        \time 4/4 a'4. b'8 c'' b' d''16 c'' b' a' |
        gis'4. f'8 e'4. e'8 |
%10
        e' f' gis'4
   }
}



Can someone help me debug this.

Also I would appreciate a suggestion what to do with
the repeats. It looks stupid to remove the repeat if
the actual score has one, but lilypond needs the final
bracket and if I add it the repeat will end in the
wrong place.

Thanks
Aaron


        
                
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com


_______________________________________________
lilypond-user mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/lilypond-user

--
=============================================
        Mats Bengtsson
        Signal Processing
        Signals, Sensors and Systems
        Royal Institute of Technology
        SE-100 44  STOCKHOLM
        Sweden
        Phone: (+46) 8 790 8463                         
       Fax:   (+46) 8 790 7260
        Email: address@hidden
        WWW: http://www.s3.kth.se/~mabe
=============================================





reply via email to

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