lilypond-user
[Top][All Lists]
Advanced

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

2 convert-ly issues


From: Atte André Jensen
Subject: 2 convert-ly issues
Date: Sat, 13 Mar 2004 23:10:06 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040312 Debian/1.6-3

Hi

I'm trying to convert some files from 2.1.5 to 2.1.30, but

1) \pianoAccidentals gets converted wrong. Instead of "#(set-accidental-style 'piano')" I get "#(set-accidental-style 'piano)' , str)".

Not that bad, I simply corrected the few places by hand.

2) convert-ly chokes on the attached (and three more files) .ly with the following:

address@hidden albert]$ convert-ly 02_I.ly
convert-ly (GNU LilyPond) 2.1.30
Processing `02_I.ly' ... Applying conversions: 2.1.7, 2.1.10, 2.1.11, 2.1.12, 2.1.13, 2.1.14, 2.1 15, 2.1.16, 2.1.17, 2.1.18, 2.1.19, 2.1.20, 2.1.21, 2.1.22, 2.1.23, Traceback (most recent call l
st):
  File "/usr/bin/convert-ly", line 2153, in ?
    do_one_file (f)
  File "/usr/bin/convert-ly", line 2092, in do_one_file
    touched = do_conversion (infile, from_version, outfile, to_version)
  File "/usr/bin/convert-ly", line 2038, in do_conversion
    str = x[1] (str)
  File "/usr/bin/convert-ly", line 1890, in conv
    str)
  File "/usr/lib/python2.3/sre.py", line 143, in sub
    return _compile(pattern, 0).sub(repl, string, count)
  File "/usr/lib/python2.3/sre.py", line 262, in filter
    return sre_parse.expand_template(template, match)
  File "/usr/lib/python2.3/sre_parse.py", line 738, in expand_template
    raise error, "empty group"
sre_constants.error: empty group

This is rather bad, since I kinda need these four files converted. Anybody has a quick fix?

Thanks in advance...

--
peace, love & harmony
Atte

http://www.atte.dk
%
% TODO:
%
% * Add pedal
% * (evt) make arpeggios higher
%
%
%#(ly:set-option 'old-relative)
\include "paper20.ly"
\include ".global-defs.ly"
\version "2.1.5"
\header {
    title = "I"
    composer = " "
    tagline = " "
    footer = " "
}

RHa = \notes  \relative c'' \context Voice = RHa {
    \slurDown
    \phrasingSlurUp
    % 8va hack
%    \property Voice.TextSpanner \set #'extra-offset = #'(0 . 2)
%    \property Voice.TextSpanner \set #'style = #'dashed-line
%    \property Voice.TextSpanner \set #'edge-height = #'(0 . 1.5)
%    \property Voice.TextSpanner \set #'edge-text = #'("8 " . "")
    \property Staff.OttavaSpanner \override #'extra-offset = #'(0 . 2)
    \property Staff.OttavaSpanner \override #'extra-offset = #'(0 . 3)
    % beaming for each 1/4'th note
    \property Voice.autoBeamSettings \override
    #'(end * * * *) = #(ly:make-moment 1 4)
    % 1 - 2
    \property Voice.PhrasingSlur \override #'height-limit = #6.0
    | r16
    a \( b c d e f g a b c d \vaStart e f g a
    | e c' b a e c b a f c' a g \vaStop f c a  g \)
    % 3 - 4
    \property Voice.PhrasingSlur \override #'height-limit = #4.0
    | r f \( a b c d e f g a b c \vaStart d e f g
    | a ( e d c a e d  c) \vaStop a' ( e d  c) e ( c b  a)\)
    % 5 - 6
    \property Staff.OttavaSpanner \revert #'extra-offset
    | r a \( b c d e f g \vaStart a b c d e f g a
    | e e' d c a e d c a a' g f c a g  f\) \vaStop
    % 7 - 8
    | r d \( e f g a b c \vaStart d e f g a b c b
    | a ( e c b a e d  c) \vaStop a' ( e c b a e c a )\)
    % 9 - 10
    \property Staff.OttavaSpanner \override #'extra-offset = #'(0 . 4.3)
    | \vaStart r a''' \( g f c a g f \vaStop g f e d c b a g
    | c g c d e g c d e g, c d \vaStart e g c e \)
    % 11 - 12
    | r f, \( e d a f e d \vaStop e d c b a gis f e
    | a e a b c e a b c e, a b c e a8 \)
    % 13 - 14
    \property Staff.OttavaSpanner \override #'extra-offset = #'(0 . 2.5)
    | \vaStart r16 g \( fis e d c b a b c d c b a gis f
    | e a b c e a b c d c b a e c b a \) \vaStop
    % 15 - 16
    | r d, \( e f g a b \vaStart c d e f g a b c d 
    | e ( d c g e d c  g) e' ( d c g \vaStop e d c g) \)
    % 17 - 18
    \property Voice.PhrasingSlur \override #'height-limit = #2.0
    | r a \( c e f a c f \) r b,, \( d f g b d g \)
    | r \vaStart g\( f e d c b a g e' d c g \vaStop e d c\)
    % 19 - 20
    | r f, \( a cis d f a d \)  r e,, \( b' d e b' f' e \)
    | c \( e c b a e c b a e' c b a e c a \)
    % 21 - 22
    \property Staff.OttavaSpanner \override #'extra-offset = #'(0 . 5)
    | r a \( d e fis a d fis \) r b, \( e fis gis b e gis \)
    | \vaStart a \( ( g f  e) c' ( b a  e) e' ( d c b a e c a ) \)
    % 23 - 24
    \property Staff.OttavaSpanner \override #'extra-offset = #'(0 . 5)
    \property Voice.PhrasingSlur \override #'height-limit = #3.0
    | g'' \(  f e d c b a g f e d c b a g f \vaStop
    |
    <<e c'>> g e d
    c g e d
    \clef bass
    c g e d
    c4 \)
    \bar "|."
}

LHa = \notes  \relative c' \context Voice = LHa {
    \voiceOne
    \property Voice.Slur \override #'attachment = #'(stem . stem)
    % 1 - 2
    | e2\arpeggio d\arpeggio
    | c\arpeggio a\arpeggio
    % 3 - 4
    | f\arpeggio g\arpeggio
    | a1\arpeggio
    % 5 - 6
    | e'2\arpeggio d4\arpeggio ( f)
    | e\arpeggio ( c) a2\arpeggio
    % 7 - 8
    | f4 ( \arpeggio  a) g2\arpeggio
    | a1\arpeggio
    % 9 - 10
    | a2\arpeggio g\arpeggio
    | c \arpeggio ( g)
    % 11 - 12
    | f\arpeggio e\arpeggio
    | a \arpeggio ( e)
    % 13 - 14
    | fis2\arpeggio gis\arpeggio
    | a4\arpeggio ( c) e2\arpeggio
    % 15 - 16
    | f4\arpeggio ( d) b2\arpeggio
    | c1\arpeggio
    % 17 - 18
    | a4\arpeggio ( c) b \arpeggio ( g)
    \property Voice.Slur \override #'attachment = #'(stem . stem)
    | c^-^\arpeggio ( g^- e^-  c)^-
    % 19 - 20
    | f\arpeggio ( a) gis\arpeggio ( e)
    | c1\arpeggio
    % 21 - 22
    | fis2\arpeggio gis4\arpeggio ( a8  b)
    | c4\arpeggio ( a) e'^\arpeggio^- e^-
    % 23 - 24
    | g8\arpeggio ( f  e4) d8\arpeggio ( c  < f, g b>4)
    | s4 s s <c, c,>
}

LHb = \notes  \relative c \context Voice = LHb {
    \voiceTwo
    % 1 -2
    | <a  e' c'>2\arpeggio <a  e' b'>\arpeggio
    | <a  e' a>\arpeggio  <f  c' f>\arpeggio
    % 3 - 4
    | <d a' d>\arpeggio<e b' e>\arpeggio
    | <a,  e' c'>1\arpeggio
    % 5 - 6
    | <a'  e' c'>2\arpeggio<a  e' b'>\arpeggio
    | <g e' a>\arpeggio<f c' f>\arpeggio
    % 7 - 8
    | <d a' d>\arpeggio<e b' e>\arpeggio
    | <a, e' a c>1\arpeggio
    % 9 - 10
    | <f' c' f>2\arpeggio<f b d>\arpeggio
    | <e c' g'>1\arpeggio
    % 11 - 12
    | <d a' d>2\arpeggio<d gis b>\arpeggio
    | <c a' e'>1\arpeggio
    % 13 - 14
    | <d a' d>2\arpeggio<e b' e>\arpeggio
    | <a e'>\arpeggio<c a'>\arpeggio
    % 15 - 16
    | <d a' c>\arpeggio<g, d' f>\arpeggio
    | <c, g' e'>1\arpeggio
    % 17 - 18
    | <f c' f>2\arpeggio<f d' g>\arpeggio
    | <e c' g'>1\arpeggio
    % 19 - 20
    | <d a' d>2\arpeggio<e b' e>\arpeggio
    | <a, e' a>1\arpeggio
    % 21 - 22
    | <d a' d>2\arpeggio<e b' e>\arpeggio
    | <a e'>\arpeggio<c a'>\arpeggio
    % 23 - 24
    | <d a' c>\arpeggio<g, f' a>\arpeggio
    | <c, g' c e  g c>1\arpeggio
}

dynUp = \notes \context Voice = dynUp {
    % 1 - 2
    \property Voice.TextScript  \override #'extra-offset =#'(-3.5 . 3.5)
    | s2
    ^\markup{\bold{Un poco più mosso}}
%    ^#`((columns (font-relative-size . 0))
%        "L'Istesso Tempo ("
%       ,quarter-note
%        " = "
%        ,plus-minus
%        "96)"
%
%    )
    \property Voice.TextScript \revert #'extra-offset
    s | s s
    % 3 - 4
    | s s | s s
    % 5 - 6
    | s s | s s
    % 7 - 8
    | s s | s s
    % 9 - 10
    | s s | s s
    % 11 - 12
    | s s | s s
    % 13 - 14
    | s s | s s
    % 15 - 16
    | s s | s s
    % 17 - 18
    | s s | s s
    % 19 - 20
    | s s | s s
    % 21 - 22
    | s s | s s
    % 23 - 24
    | s s | s s
}



dynMiddle = \notes \context Voice = dynMiddle {
    \property Voice.TextScript  \override #'padding =#'2.2
    \property Voice.DynamicLineSpanner \override #'padding =#'3.5
    \dynamicDown
    % 1 - 2
%    | s2_#'((raise . -4 colums) ("( ")(dynamic "mf")(" )"))
    | s2
    _\markup{\italic{sempre \dynamic f e grandioso }}
%    _#'((raise . -4 colums)
%    (italic "sempre ")
%    (dynamic "f")
%    (italic " La melodia cant. e espr.")
%    )
    s | s s
    % 3 - 4
    | s s | s s
    % 5 - 6
    | s s | s s
    % 7 - 8
    | s s | s s
    % 9 - 10
    | s s | s s
    % 11 - 12
    | s s | s s
    % 13 - 14
    | s s | s s
    % 15 - 16
    | s s | s s
    % 17 - 18
    | s
    _\markup{\italic{poco meno \dynamic f}}
%    _#'((raise . -4 colums)
%    (italic "poco meno ")
%    (dynamic "f")
%    )
    s | s s
    % 19 - 20
    | s s | s s
    % 21 - 22
    \property Voice.TextScript  \override #'padding =#'4
    | s s
    _\markup{\italic cresc.}
%    _#'((raise . -4 colums)
%    (italic "cresc.")
%    )
    | s s
    % 23 - 24
    \property Voice.TextScript  \override #'padding =#'0.2
    | s
    _\markup{\italic{\dynamic f molto espr.}}
%    _#'((raise . 2 colums)
%    (dynamic "f")
%    (italic " molto espr.")
%    )
    \property Voice.TextScript  \revert #'padding
    s | s4 s s s
    _\markup{\dynamic sf}
%    _#'((raise . -4 colums)
%    (dynamic "sf")
%    (italic "")
%    )
}

template = \notes \context Voice = template {
    % 1 - 2
    % 3 - 4
    % 5 - 6
    % 7 - 8
    % 9 - 10
    % 11 - 12
    % 13 - 14
    % 15 - 16
    % 17 - 18
    % 19 - 20
    % 21 - 22
    % 23 - 24
}

pedal = \notes \context Voice = pedal {
    \property Voice.TextScript  \override #'padding =#'4
    \property Staff.pedalSustainStyle = #'bracket
    % 1 - 2
    | s2\sD s\sU\sD | s\sU\sD s\sU\sD
    % 3 - 4
    | s\sU\sD s | s\sU\sD s
    % 5 - 6
    \sNoRight
    | s4\sU\sD s\sU
    _\markup{\italic{ped. simile}}
    s s | s2 s
    % 7 - 8
    | s s | s s
    % 9 - 10
    | s s | s s
    % 11 - 12
    | s s | s s
    % 13 - 14
    | s s | s s
    % 15 - 16
    | s s | s s
    % 17 - 18
    | s s | s s
    % 19 - 20
    | s s | s s
    % 21 - 22
    | s s | s s
    % 23 - 24
    \sNoLeft
    | s4  s\sD \sNormal s2\sU\sD
    | s2\sU\sD s4 s8\sU\sD s8\sU
}


\score {
    \context PianoStaff
    \notes <<
%        \pianoAccidentals
        \property PianoStaff.connectArpeggios = ##t
%       \property PianoStaff.followVoice = ##t
%        \property PianoStaff.InstrumentName \set #'font-name = #"cmr21"
%        \property PianoStaff.InstrumentName \set #'font-series = #'bold
%        \property PianoStaff.InstrumentName \set #'extra-offset = #'(-2 . 0)
%        \property PianoStaff.instrument = #'"2."
        \context Staff = up <<
            \time 2/2
            \key a \minor
            \clef treble
            \dynUp
            \RHa
            \dynMiddle
        >>
        \context Staff = down <<

            \time 2/2
            \key a \minor
            \clef bass
            \LHa
            \LHb
            \pedal
        >>

    >>
    \paper {
        \include ".paperlayout.ly"
        interscoreline = 10
        \translator {
            \PianoStaffContext
            VerticalAlignment \override #'forced-distance = #14
        }
    }
}

reply via email to

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