Re: trying to add a new \language
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: 341234002134 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. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: trying to add a new \language
On Fri, 17 Jun 2011 13:55:59 -0700, -Eluze wrote: > R. Mattes wrote: >> >> Sorry, but since I left my telepathic helmet at home there's no way for >> me to know how myLanguage is supposed to look. That would be _your_ job >> to fill in. >> > yes, i'm trying to do so - and as i said it's working when i add it in > the note-names definitions file! > > >>> and adding a >>> closing bracket ")" - i tried in several places - i get errors: >> >> Obviously the wrong place. Add it at the end ... >> > now it compiles! also adding \language "myLanguage" does not produce any > errors. > > but adding {ceses} gives the next error: > > Using `myLanguage' note names... > test2.ly:9:2: error: syntax error, unexpected STRING > > ceses > > what's wrong here? the full code is: > > \version "2.15" > #(set! language-pitch-names > (cons `(myLanguage >((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT > language-pitch-names)) > \language myLanguage > mus = { ceses } > Most likely: the language needs to be put in quotes: \language "myLanguage" > >> ??? Didn't you write: >> >>> for some experiments i want to add a new language - let's call it >>> myLanguage. >> >> What's your question? How to program in Scheme? >> > not if i don't have to - the main question was how to add such > definitions in a different file. 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. HTH RalfD > i am trying to find a better way to add fingerings to voices and for > this it would be nice to get the notes consisting of only one letter and > special characters like flats ♭ and sharps ♯. this could be implemented > in http://lsr.dsi.unimi.it/LSR/Item?u=1&id=768 > > thanks for your help up to now! > Eluze ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: trying to add a new \language
R. Mattes wrote: > > Sorry, but since I left my telepathic helmet at home there's no way for > me to know how myLanguage is supposed to look. That would be _your_ job to > fill in. > yes, i'm trying to do so - and as i said it's working when i add it in the note-names definitions file! >> and adding a >> closing bracket ")" - i tried in several places - i get errors: > > Obviously the wrong place. Add it at the end ... > now it compiles! also adding \language "myLanguage" does not produce any errors. but adding {ceses} gives the next error: Using `myLanguage' note names... test2.ly:9:2: error: syntax error, unexpected STRING ceses what's wrong here? the full code is: \version "2.15" #(set! language-pitch-names (cons `(myLanguage ((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT language-pitch-names)) \language myLanguage mus = { ceses } > > ??? Didn't you write: > >> for some experiments i want to add a new language - let's call it >> myLanguage. > > What's your question? How to program in Scheme? > not if i don't have to - the main question was how to add such definitions in a different file. i am trying to find a better way to add fingerings to voices and for this it would be nice to get the notes consisting of only one letter and special characters like flats ♭ and sharps ♯. this could be implemented in http://lsr.dsi.unimi.it/LSR/Item?u=1&id=768 thanks for your help up to now! Eluze -- View this message in context: http://old.nabble.com/trying-to-add-a-new-%5Clanguage-tp31855111p31871987.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: trying to add a new \language
On Thu, 16 Jun 2011 08:56:46 -0700, -Eluze wrote: > R. Mattes wrote: >> >> On Wed, 15 Jun 2011 13:52:22 -0700, -Eluze wrote: >> >>> hi >>> >>> for some experiments i want to add a new language - let's call it >>> myLanguage. >>> >>> i know i can add it in \scm\define-note-names.scm and this works >>> perfectly. however i don't want to change this file with every release >>> and i am wondering if there is a way to include such definitions in a >>> similar way to -dinclude-settings=….ly. >>> >>> thanks for any hints! >>> Eluze >> >> Hmm, maybe I don't understand your question, but why not: >> >> #(set! language-pitch-names >> (cons `(myLanguage ((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))) >> ) >> language-pitch-names) >> > thanks - but when i try to compile (eliminating the 4 dots Sorry, but since I left my telepathic helmet at home there's no way for me to know how myLanguage is supposed to look. That would be _your_ job to fill in. > and adding a > closing bracket ")" - i tried in several places - i get errors: Obviously the wrong place. Add it at the end ... > test2.ly:2:1: error: GUILE signaled an error for the expression > beginning here > # > (set! language-pitch-names > > error: failed files: "test2.ly" > In file "test2.ly", line 1: Missing or extra expression in (set! > language-pitch-names (cons (quasiquote (myLanguage ((ceses unquote > (ly:make-pitch -1 0 DOUBLE-FLAT)) language-pitch-names). > > since i do not really understand scheme i have no idea how to fix this ??? Didn't you write: > for some experiments i want to add a new language - let's call it > myLanguage. What's your question? How to program in Scheme? HTH RalfD > Eluze ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: trying to add a new \language
On Thursday 16 June 2011 11:56:46 -Eluze wrote: > R. Mattes wrote: > > On Wed, 15 Jun 2011 13:52:22 -0700, -Eluze wrote: > >> hi > >> > >> for some experiments i want to add a new language - let's call it > >> myLanguage. I hope this gets resolved, because IMO there should be a way of using one of the many solfa schemes to restrict note names to two letters. For example, one might use do re mi fa so la ni or d r m f s l n for the natural notes (ni, Sanskrit, is the oldest known syllable for the 7th degree of the major scale.) and substituting vowels in the order iaoueiaoue (iaoue is easy to remember as a JudeoChristian name of God) to get bb's b's #'s and x's. Because of the *very* large number of such schemes, a personal language file is IMO a good way to go. I still have a "myenglish.ly" someplace that I haven't used in years, but not because it didn't work. I think that do re mi users would be more interested in a solfa language or two or twenty than C D E users, but who knows? I use a sed script to edit the notes before lilypond compilation instead. It makes it easier to adjust to changes in lilypond, and permits an implementation of \followKeySignature that users are denied because, no matter how much musical education and experience they may have, they are presumed not to be able to remember what key they are writing in. Regards, daveA -- For beginners: very easy guitar music, solos, duets, exercises. Early intermediate guitar solos. One best scale set for all guitarists. http://www.openguitar.com/scalescomparison.html ::: plus new and better chord and arpeggio exercises. http://www.openguitar.com ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: trying to add a new \language
R. Mattes wrote: > > On Wed, 15 Jun 2011 13:52:22 -0700, -Eluze wrote: > >> hi >> >> for some experiments i want to add a new language - let's call it >> myLanguage. >> >> i know i can add it in \scm\define-note-names.scm and this works >> perfectly. however i don't want to change this file with every release >> and i am wondering if there is a way to include such definitions in a >> similar way to -dinclude-settings=….ly. >> >> thanks for any hints! >> Eluze > > Hmm, maybe I don't understand your question, but why not: > > #(set! language-pitch-names > (cons `(myLanguage ((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))) > ) > language-pitch-names) > thanks - but when i try to compile (eliminating the 4 dots and adding a closing bracket ")" - i tried in several places - i get errors: test2.ly:2:1: error: GUILE signaled an error for the expression beginning here # (set! language-pitch-names error: failed files: "test2.ly" In file "test2.ly", line 1: Missing or extra expression in (set! language-pitch-names (cons (quasiquote (myLanguage ((ceses unquote (ly:make-pitch -1 0 DOUBLE-FLAT)) language-pitch-names). since i do not really understand scheme i have no idea how to fix this Eluze -- View this message in context: http://old.nabble.com/trying-to-add-a-new-%5Clanguage-tp31855111p31862050.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
Re: trying to add a new \language
On Wed, 15 Jun 2011 13:52:22 -0700, -Eluze wrote: > hi > > for some experiments i want to add a new language - let's call it > myLanguage. > > i know i can add it in \scm\define-note-names.scm and this works > perfectly. however i don't want to change this file with every release > and i am wondering if there is a way to include such definitions in a > similar way to -dinclude-settings=….ly. > > thanks for any hints! > Eluze Hmm, maybe I don't understand your question, but why not: #(set! language-pitch-names (cons `(myLanguage ((ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))) ) language-pitch-names) Put it into a .ly file and include it. HTH Ralf Mattes ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user
trying to add a new \language
hi for some experiments i want to add a new language - let's call it myLanguage. i know i can add it in \scm\define-note-names.scm and this works perfectly. however i don't want to change this file with every release and i am wondering if there is a way to include such definitions in a similar way to -dinclude-settings=….ly. thanks for any hints! Eluze -- View this message in context: http://old.nabble.com/trying-to-add-a-new-%5Clanguage-tp31855111p31855111.html Sent from the Gnu - Lilypond - User mailing list archive at Nabble.com. ___ lilypond-user mailing list lilypond-user@gnu.org https://lists.gnu.org/mailman/listinfo/lilypond-user