]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.148
authorfred <fred>
Wed, 27 Mar 2002 01:01:06 +0000 (01:01 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:01:06 +0000 (01:01 +0000)
Documentation/user/converters.itely
scripts/abc2ly.py

index 945f4f15d224e0b5de57e75d921c915f9b288034..9522f50cd652a15c7111ee0d99c2b3e6fbe53f61 100644 (file)
@@ -133,6 +133,25 @@ ABC is a fairly simple ASCII based format. It is described at
 
 Convert ABC to LilyPond.
 
+There is a rudimentary facility for adding lilypond code to the ABC
+source file.  If you say:
+
+@example
+        %%LY voices \property Voice.noAutoBeaming=##t
+@end example
+
+This will cause the text following the keyword ``voices'' to be inserted 
+into the current voice of the lilypond output file.
+
+Similarly:
+
+@example
+        %%LY slyrics more words
+@end example
+
+will cause the text following the ``slyrics'' keyword to be inserted
+into the current line of lyrics.
+
 @unnumberedsubsec Options
 @table @code
 @item   -h,--help
@@ -148,6 +167,12 @@ version information
 The ABC standard is not very "standard". For extended features
 (eg. polyphonic music) different conventions exist. 
 
+Multiple tunes in one file cannot be converted.
+
+ABC synchronizes words and notes at the beginning of a line; abc2ly does 
+not.
+
+abc2ly ignores the ABC beaming.
 
 Written by @email{Han-Wen Nienhuys,hanwen@@cs.uu.nl}.
 
index 3e330e34e132b25d98cfc24cb236c467856e28a8..a64607dbd84bb06c72fab9dde03930a7cc4a4cc0 100644 (file)
@@ -42,6 +42,7 @@
 # Block comments generate error and are ignored
 # Postscript commands are ignored
 # lyrics not resynchronized by line breaks (lyrics must fully match notes)
+# %%LY slyrics can't be directly before a w: line.
 # ???
 
 
@@ -84,6 +85,7 @@ nobarlines = 0
 global_key = [0] * 7                   # UGH
 names = ["One", "Two", "Three"]
 DIGITS='0123456789'
+alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ"  
 HSPACE=' \t'
 
        
@@ -173,7 +175,8 @@ def dump_slyrics (outf):
        ks.sort ()
        for k in ks:
                for i in range (len(slyrics[voice_idx_dict[k]])):
-                       outf.write ("\nwords%sV%d = \\lyrics  {" % (k, i))
+                       l=alphabet[i]
+                       outf.write ("\nwords%sV%s = \\lyrics  {" % (k, l))
                        outf.write ("\n" + slyrics [voice_idx_dict[k]][i])
                        outf.write ("\n}")
 
@@ -193,7 +196,7 @@ def dump_voices (outf):
                        if in_repeat[voice_idx_dict[k]]:
                                outf.write("}")
                outf.write ("\n}")
-       
+
 def dump_score (outf):
        outf.write (r"""\score{
         \notes <
@@ -208,13 +211,14 @@ def dump_score (outf):
                        outf.write ("\n        \\addlyrics")
                outf.write ("\n\t\\context Staff=\"%s\"\n\t{\n" %k ) 
                if k != 'default':
-                       outf.write ("\t    \\$voicedefault\n")
-               outf.write ("\t    \\$voice%s " % k)
+                       outf.write ("\t    \\voicedefault\n")
+               outf.write ("\t    \\voice%s " % k)
                outf.write ("\n\t}\n")
                if len ( slyrics [voice_idx_dict[k]] ):
                        outf.write ("\n\t\\context Lyrics=\"%s\" \n\t<\t" % k)
                        for i in range (len(slyrics[voice_idx_dict[k]])):
-                               outf.write("\n\t  { \\$words%sV%d }" % ( k, i) )
+                               l=alphabet[i]
+                               outf.write("\n\t  { \\words%sV%s }" % ( k, l) )
                        outf.write ( "\n\t>\n" )
        outf.write ("\n    >")
        outf.write ("\n\t\\paper {\n")
@@ -370,14 +374,23 @@ def shift_key (note, acc , shift):
 key_shift = { # semitone shifts for key mode names
        'm'   : 3,
        'min' : 3,
+       'minor' : 3,
        'maj' : 0,
+       'major' : 0,    
        'phr' : -4,
+       'phrygian' : -4,
        'ion' : 0,
+       'ionian' : 0,
        'loc' : 1,
+       'locrian' : 1,  
        'aeo' : 3,
+       'aeolian' : 3,
        'mix' : 5,
+       'mixolydian' : 5,       
        'lyd' : -5,
-       'dor' : -2
+       'lydian' : -5,  
+       'dor' : -2,
+       'dorian' :      -2      
 }
 def compute_key (k):
        k = string.lower (k)