lilypond-user
[Top][All Lists]
Advanced

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

Re: trying to add a new \language


From: -Eluze
Subject: Re: trying to add a new \language
Date: Sun, 19 Jun 2011 03:35:14 -0700 (PDT)


R. Mattes wrote:
> 
>>   \version "2.15"
> 
> Most likely: the language needs to be put in quotes:
> 
> \language "myLanguage"
> 
no, with or without quotes works with all languages!


> Better to put the langauge definition into a separate .ly-file and include
> it.
> Production code should also check whether the language is already defined,
> otherwise 
> language-pitch-names will grow.
> Something like this (save it in a file called myLanguage.ly):
> 
> #(let ((new-lang 
>        `(myLanguage . ((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))))))
>   
>   (if (not (assoc 'myLanguage language-pitch-names))
>       (set! language-pitch-names (cons  new-lang language-pitch-names))))
> 
> \language "myLanguage"
> 
> If you put this file somewhere where lilypond searches for includes and
> add
> \inlcude "myLanguage.ly" to your file.
> 
now this works - thanks!

maybe others are interested in what you can do with this:

as i mentioned in a previous post with the snippet
http://lsr.dsi.unimi.it/LSR/Item?u=1&id=768 you can easily add fingerings to
a voice. these consist of a string which is associated with the notes so
that the first element of the string is related to the first note, the 2nd
element to the 2nd note and so forth. to omit a fingering for one note you
simply (have to) write a letter iso a digit.

now you can imagine such a string for even a little piece would become
immense and nearly not manageable. therefor Gilles Thibault, the author of
this snippet, has arranged that you can structure this string, putting it on
several lines and adding special characters which will not be counted in
associating the strings' elements to the notes. among these special
characters are the wellknown Lilypond characters for chords <> the comma,
the barcheck |, the dot... a special case is the apostrophe which is used to
enter whole strings to be associated with one note.

my approach now was to make a copy of the music with \displayLilyMusic - if
you consequently add barchecks after each measure you get a nicely
structured voice with each measure starting on a new line. using my "new"
language, e.g., for a d major scale  i get  d' e' f♯' g' a' h' c♯'' d'' in
which i just have to replace the note name - i can leave the sharp or flat
sign. (the apostrophs must be removed or replaced - i recommend to use ^ for
that purpose).

an example: the fingering string for just the 1st measure of Sor's étude op.
6 no. 9 for guitar looks so:
341234002134xxxx  or 341234002134afge  

with my fingering language it is:
< 3^ 4^^ > < 1^ 2♯^^ > < 3^ 4^^ > < 0^ 0^^ > < 2^ 1^^ > < 3^ 4^^ > < a^ f^^
> < g^ e^^ >

or - omitting the octave information: < 3 4 > < 1 2♯ > < 3 4 > < 0 0 > < 2 1
> < 3 4 > < a f > < g e >

the code for these examples and the language definition (to view the special
characters you need a special font to display them; i've been using DejaVu
Sans Mono) : 
http://old.nabble.com/file/p31878853/test2.ly test2.ly 
http://old.nabble.com/file/p31878853/_language%2Bdefs.ly _language+defs.ly 

hope this is useful for others, too, and many thanks, Ralf, for your
(tele-)patience+support!
Eluze




 
 



-- 
View this message in context: 
http://old.nabble.com/trying-to-add-a-new-%5Clanguage-tp31855111p31878853.html
Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com.




reply via email to

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