----- Original Message ----- From: Graham Breed <gbr...@gmail.com> Date: Tuesday, February 17, 2009 2:06 am Subject: Re: Persian musical koron and sori To: Kees van den Doel <kvand...@shaw.ca> Cc: Behnam Rassi <beh...@videotron.qc.ca>, Hans Aberg <hab...@math.su.se>, lilypond <lilypond-user@gnu.org>
> Kees van den Doel wrote: > > Hi Folks, > > > > I made an init file "persian.ly" with support for Persian > accidentals and scale signatures. > > The only thing missing is correct glyphs for koron and sori. I > include it below. > > You don't want glyphs. You want strings, because we're not > expecting a music font, so the mechanism for glyphs won't work. > > This can stay here: > > > % Define accidental symbols. > > % Really need to have accidentals.koron and accidentals.sori > > > > persianGlyphs = #`((-3/10 . "accidentals.mirroredflat") > > (1/5 . > "accidentals.sharp.slashslash.stem")> (0 . "accidentals.natural") > > (1/2 . > "accidentals.sharp")> > (-1/2 . "accidentals.flat") > > (-1/10 . "") > > (-3/5 . "") > > (-1 . > "accidentals.flatflat")> ( 1 . "accidentals.doublesharp") > > ) > > Then add: > > persianStrings = #`((-3/10 . "???") > (1/5 . "???") > ... > ) > > where the ??? are replaced with the UTF-8 strings of the > symbols you want. Then in "\context" add > > \override Accidental #'stencil = #ly:text-interface::print > \override Accidental #'text = #accidental-text > \override Accidental #'font-name = #"???" > \override Accidental #'font-size = #? > \override Accidental #'text = #(lambda (grob) > (cdr (assoc > (ly:grob-property grob 'alteration) > persianStrings))) > \override Accidental #'X-extent = #(0 . 1) > \override Accidental #'Y-extent = #(-1 . 1) > > and so on for KeySignature and whatever else you want to use > the new symbols. The font name is what Pango uses to find > the new font and you may need to adjust the font size. For > the best results use lookups for the X- and Y-extents as well. > > Something I'm doing is causing a bug on another system, but > this works for me. Tried it, it does print the character but on the note and I'm getting a bunch of errors: c:/Program Files/LilyPond/usr/share/lilypond/current/ly/persian.ly:200:35: error: GUILE signaled an error for the expression beginning here \override Accidental #'text = # accidental-text c:/Program Files/LilyPond/usr/share/lilypond/current/ly/persian.ly:206:39: error: GUILE signaled an error for the expression beginning here \override Accidental #'X-extent = # (0 . 1) c:/Program Files/LilyPond/usr/share/lilypond/current/ly/persian.ly:207:39: error: GUILE signaled an error for the expression beginning here \override Accidental #'Y-extent = # (-1 . 1) Interpreting music... Interpreting music... warning: type check for `text' failed; value `#<unspecified>' must be of type `markup' warning: type check for `X-extent' failed; value `#<unspecified>' must be of type `pair of numbers' warning: type check for `Y-extent' failed; value `#<unspecified>' must be of type `pair of numbers' Preprocessing graphical objects... MIDI output to `t2.mid'... Finding the ideal number of pages... Fitting music on 1 page... Drawing systems... Layout output to `t2.ps'... Converting to `./t2.pdf'... error: failed files: "t2" Unbound variable: accidental-text Wrong number of arguments to 0 Wrong number of arguments to -1 Any idea of what is the problem? Kees _______________________________________________ lilypond-user mailing list lilypond-user@gnu.org http://lists.gnu.org/mailman/listinfo/lilypond-user