>>>>> "Joyce" == Joyce Wilson <[EMAIL PROTECTED]> writes:

    Joyce> I saw in the archives that there is some way to work around the
    Joyce> problem with the extra barline being created after a grace note in
    Joyce> multi-part music, but I need a bit more explanation to be able to do
    Joyce> it successfully, since my attempts so far have just made the grace
    Joyce> note disappear.  An example would be most welcome.

Look at the attached ABC file.  It demonstrates the workaround, and
also how to put the workaround lilypond into the abc file directory,
instead of having to edit the lilypond after writing the ABC.

Attachment: test.abc
Description: Binary data

    Joyce> On the abc2ly topic, I have a couple of questions.  I'm
    Joyce> finding that when I run abc through abc2ly, I don't just
    Joyce> have to go through and add in whatever extra notation I'm
    Joyce> using Lilypond for (measure numbers, breath marks, note
    Joyce> accents, text markup like 'D.C. al Fine', and cautionary
    Joyce> accidentals like '(#)' -- if it's possible to do this stuff
    Joyce> in abc, please tell me and I'll quit bothering the list! :>
    Joyce> ).  

For some things you can use %%LY statements in the ABC.  Other things
are easier to do by writing a script that modifies the lilypond, and
still other things just have to be done by hand.  At the moment,
figured bass is in the third category; this is being a problem for my
eyes because it means I can't touch type the figures, which I can in
general with anything that goes into the ABC.  So I'm considering a
new %%LY directive that says that any numbers entered as text
annotations in the ABC are figures, and adds them to a figured bass
voice automatically.

    Joyce> I also have to make a lot of fixes of things which worked
    Joyce> fine in abc.  A multipart piece with a time signature
    Joyce> change in the middle proved especially problematic (In
    Joyce> lilypond, the top line started in 4/4 and switched to 2/4,
    Joyce> but the other three lines started out in 2/4, even after I
    Joyce> edited the abc to explicitly specify the starting time sig
    Joyce> for each part as 4/4)-- I ended up having to convert each
    Joyce> part individually, and then reassemble the resulting
    Joyce> snippets of lily code.  


The problem with different voices having different time signatures can
be solved by moving the  Timing_engraver and the
Repeat_acknowledge_engraver from the score context to the staff
context.  Attached is a python file that must have worked at least
once to do this automatically, but whether it was on vanilla abc2ly
output or my own massaged output, I can't say. 

Attachment: makescorebars.py
Description: Binary data

Here's a lilypond file that demonstrates how this works.  I'm using it
here not because the different voices actually have different time
signatures, but because the proofreading of the ABC input is easier if
you can see which voice has the barline in the wrong place.  There may
be more magic of this type necessary to actually print different time
signatures in the different lines:

#(set! point-and-click line-location)

\header {

        composer = "Anthony Holborne"

        crossRefNumber = "1"

        footnotes = ""

        tagline = "Lily was here 1.6.5 -- automatically converted from ABC"

        title = "64. Galliard: As it fell on a holie Eve"

}

voiceB = \notes {

\property Staff.autoBeaming = ##f

\property Score.breakAlignOrder = #'(

instrument-name

left-edge

ambitus

span-bar

breathing-sign

staff-bar

clef

key-signature

time_signature

custos

)

\forgetAccidentals

\property Voice.NoteHead \override  #'style = #'baroque

\property Staff.Custos \override #'style = #'mensural

\property Score.RehearsalMark \set #'extra-offset = #'( -3 . 0 )

\property Score.RehearsalMark \override #'visibility-lambda = #begin-of-line-invisible

\property Staff.automaticMelismata = ##f

\property Staff.midiInstrument = "oboe"

\property Score.defaultBarType="empty"



\property Staff.instrument = "Cantus"

 % %MIDI nobarlines

 % %MIDI ratio 3 1

\property Staff.TimeSignature \override #'style = #'1style

 \time 3/2 \key g \dorian   \repeat volta 2 {   g''4    d''4    bes'4    g'4    

d''2    d''2    c''4    a'2    bes'4    c''2    bes'2    a'2    b'2    c''4    

d''2    e''4    f''4    d''4    d''4    d''2.      d''2    d''4    d''2    f''4 

   ees''2    d''2.    c''4    d''1.    } \repeat volta 2 {   f''2    ees''4    

d''2    c''4    d''2    g''2    f''4    d''4    ees''!2    d''2    c''2      

d''2    g''4    f''4.    ees''!8    d''4    c''4    f''4.    ees''!8    d''4    

g''2    f''4    d''4    ees''!2    d''2    c''2    bes'2    a'2    b'1.    }   

}

voiceC = \notes {

\property Staff.autoBeaming = ##f

\property Score.breakAlignOrder = #'(

instrument-name

left-edge

ambitus

span-bar

breathing-sign

staff-bar

clef

key-signature

time_signature

custos

)

\forgetAccidentals

\property Voice.NoteHead \override  #'style = #'baroque

\property Staff.Custos \override #'style = #'mensural

\property Score.RehearsalMark \set #'extra-offset = #'( -3 . 0 )

\property Score.RehearsalMark \override #'visibility-lambda = #begin-of-line-invisible

\property Staff.automaticMelismata = ##f

\property Staff.midiInstrument = "oboe"

\property Score.defaultBarType="empty"



\property Staff.instrument = "Altus"

 % %MIDI nobarlines

 % %MIDI ratio 3 1

\property Staff.TimeSignature \override #'style = #'1style

 \time 3/2 \key g \dorian   \repeat volta 2 {   g'2.    bes'4    a'4    fis'4   

 g'2    e'4    fis'!2    g'4    e'2    d'4    g'2    fis'!4    g'2    g'4    

g'4    b'4    c''4    a'2    bes'4    a'2    bes'4      a'2    bes'4    a'2    

a'4    bes'2    a'4    f'4    g'2    fis'!1.    } \repeat volta 2 {   a'2    

bes'2    a'4    g'8    a'8    bes'2.    g'4    a'4    b'4    c''2    bes'2    

a'2      bes'2    bes'4    bes'2    bes'4    a'2    bes'2    g'2    a'4    b'!4 

   c''4    a'4    bes'!2    a'2    g'2    fis'2    g'1.    }   

}

voiceD = \notes {

\property Staff.autoBeaming = ##f

\property Score.breakAlignOrder = #'(

instrument-name

left-edge

ambitus

span-bar

breathing-sign

staff-bar

clef

key-signature

time_signature

custos

)

\forgetAccidentals

\property Voice.NoteHead \override  #'style = #'baroque

\property Staff.Custos \override #'style = #'mensural

\property Score.RehearsalMark \set #'extra-offset = #'( -3 . 0 )

\property Score.RehearsalMark \override #'visibility-lambda = #begin-of-line-invisible

\property Staff.automaticMelismata = ##f

\property Staff.midiInstrument = "oboe"

\property Score.defaultBarType="empty"



\property Staff.instrument = "Tenor"

 % %MIDI nobarlines

 % %MIDI ratio 3 1

\property Staff.TimeSignature \override #'style = #'1style

 \time 3/2 \key g \dorian \clef "G_8"

   \repeat volta 2 {   d'2.    d'4    d'2    d'4    bes4    c'4    d'2    d'4   

 c'2    d'2    d'2    d'2    e'4    d'4    g'2    f'2    d'2    d'2      d'2    

d'2    d'2    bes4    g4    a4    d'4    g2    a1.    } \repeat volta 2 {   f'2 

   g'2    d'4    ees'4    f'2    ees'!2    f'2    g'2    f'2    f'2      f'2    

ees'!4    f'2    f'4    f'2    f'2    ees'!2    f'2    g'4    c'4    f'2    f'2 

   d'2    d'2    d'1.    }   

}

voiceE = \notes {

\property Staff.autoBeaming = ##f

\property Score.breakAlignOrder = #'(

instrument-name

left-edge

ambitus

span-bar

breathing-sign

staff-bar

clef

key-signature

time_signature

custos

)

\forgetAccidentals

\property Voice.NoteHead \override  #'style = #'baroque

\property Staff.Custos \override #'style = #'mensural

\property Score.RehearsalMark \set #'extra-offset = #'( -3 . 0 )

\property Score.RehearsalMark \override #'visibility-lambda = #begin-of-line-invisible

\property Staff.automaticMelismata = ##f

\property Staff.midiInstrument = "oboe"

\property Score.defaultBarType="empty"



\property Staff.instrument = "Quintus"

 % %MIDI nobarlines

 % %MIDI ratio 3 1

 \key g \dorian \clef "G_8"

   \repeat volta 2 {   g2.    g4    a2    bes2    a4    a2    g4    c'4    a4   

 d2    a2    g2    g4    g2    g4    d'4.    c'8    bes8    c'8    d'4    a4    

g4      a2    g4    a2    a4    g8    a8    bes8    c'8    d'2    bes4    g4    

d'1.    } \repeat volta 2 {   d'2    bes4.    c'8    d'4    g4    f2    g2    

d'2    g4    a4    bes4    g4    a2      f2    g8    a8    bes2    bes4    c'2  

  d'2    bes2    d'2    g2    d'2    a2    bes4    g4    a2    g1.    }   

}

voiceF = \notes {

\property Staff.autoBeaming = ##f

\property Score.breakAlignOrder = #'(

instrument-name

left-edge

ambitus

span-bar

breathing-sign

staff-bar

clef

key-signature

time_signature

custos

)

\forgetAccidentals

\property Voice.NoteHead \override  #'style = #'baroque

\property Staff.Custos \override #'style = #'mensural

\property Score.RehearsalMark \set #'extra-offset = #'( -3 . 0 )

\property Score.RehearsalMark \override #'visibility-lambda = #begin-of-line-invisible

\property Staff.automaticMelismata = ##f

\property Staff.midiInstrument = "oboe"

\property Score.defaultBarType="empty"



\property Staff.instrument = "Bassus"

 % %MIDI nobarlines

 % %MIDI ratio 3 1

 \key g \dorian \clef bass

   \repeat volta 2 {   g,2.    g4    fis4    d4    bes,4    g,4    a,4    d2    

g,4    a,2    bes,4    c4    d2    g,2    c4    b,4    g,4    c4    d2    g4    

fis!4    d4    g4      fis!4    d4    g4    f4    d2    g2    f4    d4    ees2  

  d1.    } \repeat volta 2 {   d2    g2    f4    ees4    d4    bes,4    ees!2   

 d2    c2    d4    ees!4    f4    f,4      bes,2    ees!4    d4    bes,2    f4. 

   ees!8    d8    c8    bes,4    ees!2    d2    c2    d4    e4    f2    g2    

d2    g,1.    }   

}

voicedefault = \notes {

\property Staff.autoBeaming = ##f

\property Score.breakAlignOrder = #'(

instrument-name

left-edge

ambitus

span-bar

breathing-sign

staff-bar

clef

key-signature

time_signature

custos

)

\forgetAccidentals

\property Voice.NoteHead \override  #'style = #'baroque

\property Staff.Custos \override #'style = #'mensural

\property Score.RehearsalMark \set #'extra-offset = #'( -3 . 0 )

\property Score.RehearsalMark \override #'visibility-lambda = #begin-of-line-invisible

\property Staff.automaticMelismata = ##f

\property Staff.midiInstrument = "oboe"

\property Score.defaultBarType="empty"



% %MIDI nobarlines

 % %MIDI ratio 3 1

\property Staff.TimeSignature \override #'style = #'1style

 \time 3/2 \key g \dorian 

}\score{

        \notes <



        \context Staff="1"

        {

            \voicedefault

            \voiceB 

        }



        \context Staff="2"

        {

            \voicedefault

            \voiceC 

        }



        \context Staff="3"

        {

            \voicedefault

            \voiceD 

        }



        \context Staff="4"

        {

            \voicedefault

            \voiceE 

        }



        \context Staff="5"

        {

            \voicedefault

            \voiceF 

        }



    >

        \paper {

           \translator{

\StaffContext

 \consists "Timing_engraver"

 \consists "Repeat_acknowledge_engraver"

\consists Custos_engraver

}\translator{

        \ScoreContext

 \remove "Timing_engraver"

 \remove "Repeat_acknowledge_engraver"

        SpacingSpanner \override #'base-shortest-duration = #(make-moment 1 4)

        }

                \translator {

                        \VoiceContext 

                        \consists Ambitus_engraver

                }

            \translator 

            {

                \StaffContext

 \consists "Timing_engraver"

 \consists "Repeat_acknowledge_engraver"

            }

        }

        \midi {}

}



    Joyce> I guess my general question is: are there any tips for
    Joyce> writing especially abc2ly-friendly abc?

%%LY doesn't seem to be documented.  (my fault) There are two forms:

        %%LY voices

which adds whatever the rest of the line is to the lilypond output
stream for the current voice.

        %%LY slyrics

which adds the rest of the line to the lyrics.  This hasn't been
tested very well, but I use the voices form all the time.

    Joyce> What determines where the line-breaks are in the output
    Joyce> from abc2ly? They seem to be rather random, which makes it
    Joyce> difficult for me to find my way around to do editing.  My
    Joyce> current (laborious) approach is to go through the converted
    Joyce> lilypond code and insert line breaks before each "\bar" and
    Joyce> then tidy it up so that exactly one measure is on each
    Joyce> line. Then I can at least navigate by counting measures.
    Joyce> Is there some way to get abc2ly to do this for me?

Not at present.  I don't think it would be hard to do.  My efforts to
use etf2ly (which does do roughly what you want for abc2ly by default)
don't convince me that it's something I'd use very often.  What I have
considered is changing abc2ly to respect the line breaks in the ABC,
which I think would be useful.

I'm glad someone else is using abc2ly, which seems to me to be the
obvious way to get both good typesetting (from lily) and easy
transcription (from ABC).  

You should continue to write the list with bug reports and enhancement
requests.  I'm not currently set up to make modifications to the
current development version, but if I have a real user out there, it
may motivate me to get set up.

-- 
Laura (mailto:[EMAIL PROTECTED] , http://www.laymusic.org/ )
(617) 661-8097  fax: (801) 365-6574 
233 Broadway, Cambridge, MA 02139


_______________________________________________
Lilypond-user mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/lilypond-user

Reply via email to