lilypond-user
[Top][All Lists]
Advanced

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

Re: EasyNotation in german editing language.ly


From: David Raleigh Arnold
Subject: Re: EasyNotation in german editing language.ly
Date: Thu, 18 Mar 2004 10:45:35 -0500
User-agent: KMail/1.5.4

On Wednesday 17 March 2004 18:55, Roland Goretzki wrote:
> Hi,
>
> I have the line
>
>   \include "deutsch.ly"
>
> in my .ly-files, but if I use the
>
>    \translator { \EasyNotation }
>
> then the result for the english note "b", which in german is called
> "h", is only the english B in the note.
>
> Perhaps it could be easy to change it by myself:
>
> Par example, it is very easy to change what I have to type for
> each note by changing it in the file
>
>     /usr/share/lilypond/2.1.28/ly/deutsch.ly
>
> (e.g. "x" for "h" or "ciss" for "cisis").
>
> In which file could I change the names for the
> easy-notation-note-names?
>
> Thanks and Regards                      Roland

Thanks for bringing this up.  That's a bug, surely.

I asked some time ago for b for flat in english.ly.  I am reluctant to
edit it, because it would have to be maintained.  Perhaps I should copy
the language file to make my own, as "myenglish.ly" or something such.

# keysigs.sed
# put %{keyn[bs]%} anywhere on first line and
# %{/key%} anywhere on last in notes block.
# Change sharp or flat letter near bottom.
# A space will be substituted for "{}".
/%{key[1-7][bs]%}/,/%{\/key%}/{
# globally sub space for tab
s/      / /g
# put spaces to begin and end line
s/^/ /g
s/$/ /g
# all double spaces, won't scan same col twice.
s/  */  /g
# place marker to mark natural notes consisting in
# more than a single letter.
s/\([[{(<| ]do\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]re\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]mi\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]fa\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]sol\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]la\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]si\)\([^a-z]\)/\1%ADDbORd%\2/g
s/\([[{(<| ]ut\)\([^a-z]\)/\1%ADDbORd%\2/g
# expand Italian single letter notes
# if you like, change do to ut in next line
s/\([[{(<| ]\)u\([^a-z]\)/\1do%ADDbORd%\2/g
s/\([[{(<| ]\)m\([^a-z]\)/\1mi%ADDbORd%\2/g
s/\([[{(<| ]\)o\([^a-z]\)/\1sol%ADDbORd%\2/g
s/\([[{(<| ]\)l\([^a-z]\)/\1la%ADDbORd%\2/g
s/\([[{(<| ]\)i\([^a-z]\)/\1si%ADDbORd%\2/g
# place marker to mark natural notes consisting in a
# single letter.
s/\([[{(<| ]\)c\([^a-z]\)/\1c%flatORsharp%\2/g
s/\([[{(<| ]\)d\([^a-z]\)/\1d%flatORsharp%\2/g
s/\([[{(<| ]\)e\([^a-z]\)/\1e%flatORsharp%\2/g
s/\([[{(<| ]\)f\([^a-z]\)/\1f%flatORsharp%\2/g
s/\([[{(<| ]\)g\([^a-z]\)/\1g%flatORsharp%\2/g
s/\([[{(<| ]\)a\([^a-z]\)/\1a%flatORsharp%\2/g
s/\([[{(<| ]\)b\([^a-z]\)/\1b%flatORsharp%\2/g
s/\([[{(<| ]\)h\([^a-z]\)/\1h%flatORsharp%\2/g

/%{key7b%}/,/%{\/key%}/b keycb
/%{key6b%}/,/%{\/key%}/b keygb
/%{key5b%}/,/%{\/key%}/b keydb
/%{key4b%}/,/%{\/key%}/b keyab
/%{key3b%}/,/%{\/key%}/b keyeb
/%{key2b%}/,/%{\/key%}/b keyhb
/%{key1b%}/,/%{\/key%}/b keyf
/%{key7s%}/,/%{\/key%}/b keycs
/%{key6s%}/,/%{\/key%}/b keyfs
/%{key5s%}/,/%{\/key%}/b keyh
/%{key4s%}/,/%{\/key%}/b keye
/%{key3s%}/,/%{\/key%}/b keya
/%{key2s%}/,/%{\/key%}/b keyd
/%{key1s%}/,/%{\/key%}/b keyg 

:keycb
s/fa%ADDbORd%/fab/g
s/f%flatORsharp%/f%flat%/g
:keygb
s/ut%ADDbORd%/utb/g
s/do%ADDbORd%/dob/g
s/c%flatORsharp%/c%flat%/g
:keydb
s/sol%ADDbORd%/solb/g
s/g%flatORsharp%/g%flat%/g
:keyab
s/re%ADDbORd%/reb/g
s/d%flatORsharp%/d%flat%/g
:keyeb
s/la%ADDbORd%/lab/g
s/a%flatORsharp%/a%flat%/g
:keyhb
s/mi%ADDbORd%/mib/g
s/e%flatORsharp%/e%flat%/g
:keyf
s/si%ADDbORd%/sib/g
s/b%flatORsharp%/b%flat%/g
s/h%flatORsharp%/h%flat%/g
b finish

:keycs
s/si%ADDbORd%/si%sharp%/g
s/b%flatORsharp%/b%sharp%/g
s/h%flatORsharp%/h%sharp%/g
:keyfs
s/mi%ADDbORd%/mi%sharp%/g
s/e%flatORsharp%/e%sharp%/g
:keyh 
s/la%ADDbORd%/la%sharp%/g
s/a%flatORsharp%/a%sharp%/g
:keye 
s/re%ADDbORd%/re%sharp%/g
s/d%flatORsharp%/d%sharp%/g
:keya 
s/sol%ADDbORd%/sol%sharp%/g
s/g%flatORsharp%/g%sharp%/g
:keyd 
s/ut%ADDbORd%/ut%sharp%/g
s/do%ADDbORd%/do%sharp%/g
s/c%flatORsharp%/c%sharp%/g
:keyg 
s/fa%ADDbORd%/fa%sharp%/g
s/f%flatORsharp%/f%sharp%/g

:finish
# may be is, f, b
s/%flat%/b/g
# may be es, d, s
s/%sharp%/s/g
s/\([[{(<| ]\)don/\1do/g
s/\([[{(<| ]\)ren/\1re/g
s/\([[{(<| ]\)min/\1mi/g
s/\([[{(<| ]\)fan/\1fa/g
s/\([[{(<| ]\)soln/\1sol/g
s/\([[{(<| ]\)lan/\1la/g
s/\([[{(<| ]\)sin/\1si/g
s/\([[{(<| ]\)utn/\1ut/g
s/\([[{(<| ][a-h]\)n/\1/g

# strip
s/  */ /g
s/^ //
s/ $//
}

Below is a sed filter which was intended to take as many languages
as possible and put the sharps or flats to the notes according to
the key you specify, unless the affected notes have an "n".  The
only problem was the h, which may require changing a line.  I'm
not clear about what b-double-flat is.  beses?  bes?  heses?  hes?

# univer.sed is sed commands which translate
# quasi universal pitch syntax to "netherlands.ly"
# exceptions: No "b" for b-flat, or "r" for re.
# put %{univ%} anywhere on first line and %{/univ%}
# anywhere on last to address ranges
# if the file is not \notes blocks only.
# Otherwise, you don't need to address the range:
/%{univ%}/,/%{\/univ%}/{
# rm beginning address
s/%{univ%}//
# globally sub space for tab
s/      / /g
# a leading space
s/^/ /g
# sub c for do, etc.
s/\([][)(}{><| ]\)do/\1c/g
s/\([][)(}{><| ]\)re/\1d/g
s/\([][)(}{><| ]\)mi/\1e/g
s/\([][)(}{><| ]\)fa/\1f/g
s/\([][)(}{><| ]\)sol/\1g/g
s/\([][)(}{><| ]\)la/\1a/g
s/\([][)(}{><| ]\)si/\1b/g
s/\([][)(}{><| ]\)ut/\1c/g
# Latin short: u (re) m f o l i
# to use r for re (bad idea), uncomment:
# s/\([][)(}{><| ]\)r/\1d/g
s/\([][)(}{><| ]\)u/\1c/g
s/\([][)(}{><| ]\)m/\1e/g
s/\([][)(}{><| ]\)o/\1g/g
s/\([][)(}{><| ]\)l/\1a/g
# Other: c d e f g a [hb]
s/\([][)(}{><| ]\)[hi]/\1b/g
# remove naturals
s/\([][)(}{><| ][a-g]\)n/\1/g
s/\([][)(}{><| ][a-g]\)x/\1isis/g
s/\([][)(}{><| ][a-g]\)dd/\1isis/g
s/\([][)(}{><| ][a-g]\)ss/\1isis/g
s/\([][)(}{><| ][a-g]\)w/\1eses/g
s/\([][)(}{><| ][a-g]\)ff/\1eses/g
s/\([][)(}{><| ][a-g]\)bb/\1eses/g
s/\([][)(}{><| ][a-g]\)[sd]/\1is/g
s/\([][)(}{><| ][a-g]\)[bf]/\1es/g
# p, z, or r for rests
s/\([][)(}{><| ]\)[pz]/\1r/g
s/\([][)(}{><| ]\)[PZ]/\1R/g
# del leading space
s/^ //
# rm {}
s/{}/ /g
s/  */ /g
# rm end address
s/%{\/univ%}//
}

As long as you stick to your own language, you don't need this universal
translator.  I didn't want to do that.  I think now I should edit
"myenglish.ly".   I preferred Dutch because it is the most consistent
system, but verbose english.ly is possibly even easier to read, except
doubleflat and flatflat.  I'm too lazy to type out either one, but 
that's
what computers are for.  ;-).  daveA

-- 
Paying more at the gas pump?  Bush's Oil Sheikh Buddies, who support Al
Qaeda, Palestinian terrorists, & hate-West school systems everywhere,
need more of your money now to arm and pay Iraqis to kill Americans.
D. Raleigh Arnold dra@ (http://www.) openguitar.com address@hidden






reply via email to

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