lilypond-user
[Top][All Lists]
Advanced

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

Re: Problem with accidentals.ly and Lilypond 2.19.82


From: Luca Danieli
Subject: Re: Problem with accidentals.ly and Lilypond 2.19.82
Date: Thu, 13 Dec 2018 22:11:50 +0000

Sorry for the inline image Thomas, didn't know about that.

I have been able to run it!

What it did was to replace the line #(ly:parser-set-note-names parser pitchnames)
with #(ly:parser-set-note-names pitchnames)

So I have got the same problem of before. Some accidentals are replaced with a X. Don't know how to solve it. Am I the only one to have this problem?

Thanks
Luca

I post here the content of the file and attach the image of the problem:

%% http://lsr.dsi.unimi.it/LSR/Item?id=786
%% see also http://www.lilypond.org/doc/v2.18/Documentation/notation/pitch-and-harmony-in-contemporary-music.html#microtonal-notation
%% see also http://www.ekmelic-music.org/en/ekmelily.htm

% The pitches for the scale are specified in terms of equal-tempered
  %  whole tones.
  % Transposition, key signatures, transposition, and
  %  MIDI output will use these pitches.
  % A perfect fifth is 701.955 'cents' where a cent is 1/200 of an
  %  equal-tempered whole tone.  LilyPond uses rational numbers for
  %  pitches, so we use 702/200 whole tones for the fifth.
  % Building the scale starting on C,
  %  G is a perfect fifth higher at 702/200, D is another fifth higher
  %  at 1404/200 so the pitch within the first octave is 204/200, etc.
  % (You can write a Scheme code to generate the series if you prefer.)
scalepitches = #`#(0/200 204/200 408/200 498/200 702/200 906/200 1110/200)
#(ly:set-default-scale (ly:make-scale scalepitches))

  % The pitch E built from perfect fifths is 408 cents above C,
  %  but a perfect major third is 386 cents.
  % The notes in perfect thirds use arrows on accidentals
  %  to represent adjustment by this 22-cent difference.

\version "2.19.80"

ARROW = #22/200
#(define-public SHARP-RAISE   (+ SHARP ARROW))
#(define-public SHARP-LOWER   (- SHARP ARROW))  % 92/200
#(define-public NATURAL-RAISE (+ NATURAL ARROW))
#(define-public NATURAL-LOWER (- NATURAL ARROW))
#(define-public FLAT-RAISE    (+ FLAT ARROW))
#(define-public FLAT-LOWER    (- FLAT ARROW))

  % Note names can now be defined to represent these pitches in our
  % Lilypond input.  We extend the list of Dutch note names:
 
arrowedPitchNames = #`(
       (ceses . ,(ly:make-pitch -1 0 DOUBLE-FLAT))
       (ceseh . ,(ly:make-pitch -1 0 (* FLAT 3/2)))
       (cesel . ,(ly:make-pitch -1 0 FLAT-LOWER))
       (ces . ,(ly:make-pitch -1 0 FLAT))
       (cesir . ,(ly:make-pitch -1 0 FLAT-RAISE))
       (cesih . ,(ly:make-pitch -1 0 (/ FLAT 2)))
       (ceh . ,(ly:make-pitch -1 0 (/ FLAT 2)))
       (cel . ,(ly:make-pitch -1 0 NATURAL-LOWER))
       (c . ,(ly:make-pitch -1 0 NATURAL))
       (cir . ,(ly:make-pitch -1 0 NATURAL-RAISE))
       (cih . ,(ly:make-pitch -1 0 (/ SHARP 2)))
       (ciseh . ,(ly:make-pitch -1 0 (/ SHARP 2)))
       (cisel . ,(ly:make-pitch -1 0 SHARP-LOWER))
       (cis . ,(ly:make-pitch -1 0 SHARP))
       (cisir . ,(ly:make-pitch -1 0 SHARP-RAISE))
       (cisih . ,(ly:make-pitch -1 0 (* SHARP 3/2)))
       (cisis . ,(ly:make-pitch -1 0 DOUBLE-SHARP))
       
       (deses . ,(ly:make-pitch -1 1 DOUBLE-FLAT))
       (deseh . ,(ly:make-pitch -1 1 (* FLAT 3/2)))
       (desel . ,(ly:make-pitch -1 1 FLAT-LOWER))
       (des . ,(ly:make-pitch -1 1 FLAT))
       (desir . ,(ly:make-pitch -1 1 FLAT-RAISE))
       (desih . ,(ly:make-pitch -1 1 (/ FLAT 2)))
       (deh . ,(ly:make-pitch -1 1 SEMI-FLAT))
       (del . ,(ly:make-pitch -1 1 NATURAL-LOWER))
       (d . ,(ly:make-pitch -1 1 NATURAL))
       (dir . ,(ly:make-pitch -1 1 NATURAL-RAISE))
       (dih . ,(ly:make-pitch -1 1 (/ SHARP 2)))
       (diseh . ,(ly:make-pitch -1 1 (/ SHARP 2)))
       (disel . ,(ly:make-pitch -1 1 SHARP-LOWER))
       (dis . ,(ly:make-pitch -1 1 SHARP))
       (disir . ,(ly:make-pitch -1 1 SHARP-RAISE))
       (disih . ,(ly:make-pitch -1 1 (* SHARP 3/2)))
       (disis . ,(ly:make-pitch -1 1 DOUBLE-SHARP))
     
       (eeses . ,(ly:make-pitch -1 2 DOUBLE-FLAT))
       (eeseh . ,(ly:make-pitch -1 2 (* FLAT 3/2)))
       (eesel . ,(ly:make-pitch -1 2 FLAT-LOWER))
       (ees . ,(ly:make-pitch -1 2 FLAT))
       (eesir . ,(ly:make-pitch -1 2 FLAT-RAISE))
       (eesih . ,(ly:make-pitch -1 2 (/ FLAT 2)))
       (eeh . ,(ly:make-pitch -1 2 (/ FLAT 2)))
       (eel . ,(ly:make-pitch -1 2 NATURAL-LOWER))
       (e . ,(ly:make-pitch -1 2 NATURAL))
       (eir . ,(ly:make-pitch -1 2 NATURAL-RAISE))
       (eih . ,(ly:make-pitch -1 2 (/ SHARP 2)))
       (eiseh . ,(ly:make-pitch -1 2 (/ SHARP 2)))
       (eisel . ,(ly:make-pitch -1 2 SHARP-LOWER))
       (eis . ,(ly:make-pitch -1 2 SHARP))
       (eisir . ,(ly:make-pitch -1 2 SHARP-RAISE))
       (eisih . ,(ly:make-pitch -1 2 (* SHARP 3/2)))
       (eisis . ,(ly:make-pitch -1 2 DOUBLE-SHARP))

       (feses . ,(ly:make-pitch -1 3 DOUBLE-FLAT))
       (feseh . ,(ly:make-pitch -1 3 (* FLAT 3/2)))
       (fesel . ,(ly:make-pitch -1 3 FLAT-LOWER))
       (fes . ,(ly:make-pitch -1 3 FLAT))
       (fesir . ,(ly:make-pitch -1 3 FLAT-RAISE))
       (fesih . ,(ly:make-pitch -1 3 (/ FLAT 2)))
       (feh . ,(ly:make-pitch -1 3 (/ FLAT 2)))
       (fel . ,(ly:make-pitch -1 3 NATURAL-LOWER))
       (f . ,(ly:make-pitch -1 3 NATURAL))
       (fir . ,(ly:make-pitch -1 3 NATURAL-RAISE))
       (fih . ,(ly:make-pitch -1 3 (/ SHARP 2)))
       (fiseh . ,(ly:make-pitch -1 3 (/ SHARP 2)))
       (fisel . ,(ly:make-pitch -1 3 SHARP-LOWER))
       (fis . ,(ly:make-pitch -1 3 SHARP))
       (fisir . ,(ly:make-pitch -1 3 SHARP-RAISE))
       (fisih . ,(ly:make-pitch -1 3 (* SHARP 3/2)))
       (fisis . ,(ly:make-pitch -1 3 DOUBLE-SHARP))

       (geses . ,(ly:make-pitch -1 4 DOUBLE-FLAT))
       (geseh . ,(ly:make-pitch -1 4 (* FLAT 3/2)))
       (gesel . ,(ly:make-pitch -1 4 FLAT-LOWER))
       (ges . ,(ly:make-pitch -1 4 FLAT))
       (gesir . ,(ly:make-pitch -1 4 FLAT-RAISE))
       (gesih . ,(ly:make-pitch -1 4 (/ FLAT 2)))
       (geh . ,(ly:make-pitch -1 4 (/ FLAT 2)))
       (gel . ,(ly:make-pitch -1 4 NATURAL-LOWER))
       (g . ,(ly:make-pitch -1 4 NATURAL))
       (gir . ,(ly:make-pitch -1 4 NATURAL-RAISE))
       (gih . ,(ly:make-pitch -1 4 (/ SHARP 2)))
       (giseh . ,(ly:make-pitch -1 4 (/ SHARP 2)))
       (gisel . ,(ly:make-pitch -1 4 SHARP-LOWER))
       (gis . ,(ly:make-pitch -1 4 SHARP))
       (gisir . ,(ly:make-pitch -1 4 SHARP-RAISE))
       (gisih . ,(ly:make-pitch -1 4 (* SHARP 3/2)))
       (gisis . ,(ly:make-pitch -1 4 DOUBLE-SHARP))

       (aeses . ,(ly:make-pitch -1 5 DOUBLE-FLAT))
       (aeseh . ,(ly:make-pitch -1 5 (* FLAT 3/2)))
       (aesel . ,(ly:make-pitch -1 5 FLAT-LOWER))
       (aes . ,(ly:make-pitch -1 5 FLAT))
       (aesir . ,(ly:make-pitch -1 5 FLAT-RAISE))
       (aesih . ,(ly:make-pitch -1 5 (/ FLAT 2)))
       (aeh . ,(ly:make-pitch -1 5 (/ FLAT 2)))
       (ael . ,(ly:make-pitch -1 5 NATURAL-LOWER))
       (a . ,(ly:make-pitch -1 5 NATURAL))
       (air . ,(ly:make-pitch -1 5 NATURAL-RAISE))
       (aih . ,(ly:make-pitch -1 5 (/ SHARP 2)))
       (aiseh . ,(ly:make-pitch -1 5 (/ SHARP 2)))
       (aisel . ,(ly:make-pitch -1 5 SHARP-LOWER))
       (ais . ,(ly:make-pitch -1 5 SHARP))
       (aisir . ,(ly:make-pitch -1 5 SHARP-RAISE))
       (aisih . ,(ly:make-pitch -1 5 (* SHARP 3/2)))
       (aisis . ,(ly:make-pitch -1 5 DOUBLE-SHARP))

       (beses . ,(ly:make-pitch -1 6 DOUBLE-FLAT))
       (beseh . ,(ly:make-pitch -1 6 (* FLAT 3/2)))
       (besel . ,(ly:make-pitch -1 6 FLAT-LOWER))
       (bes . ,(ly:make-pitch -1 6 FLAT))
       (besir . ,(ly:make-pitch -1 6 FLAT-RAISE))
       (besih . ,(ly:make-pitch -1 6 (/ FLAT 2)))
       (beh . ,(ly:make-pitch -1 6 (/ FLAT 2)))
       (bel . ,(ly:make-pitch -1 6 NATURAL-LOWER))
       (b . ,(ly:make-pitch -1 6 NATURAL))
       (bir . ,(ly:make-pitch -1 6 NATURAL-RAISE))
       (bih . ,(ly:make-pitch -1 6 (/ SHARP 2)))
       (biseh . ,(ly:make-pitch -1 6 (/ SHARP 2)))
       (bisel . ,(ly:make-pitch -1 6 SHARP-LOWER))
       (bis . ,(ly:make-pitch -1 6 SHARP))
       (bisir . ,(ly:make-pitch -1 6 SHARP-RAISE))
       (bisih . ,(ly:make-pitch -1 6 (* SHARP 3/2)))
       (bisis . ,(ly:make-pitch -1 6 DOUBLE-SHARP))
       )
pitchnames = \arrowedPitchNames
#(ly:parser-set-note-names pitchnames)

  % The symbols for each alteration
 
arrowGlyphs = #`(
        (,DOUBLE-SHARP . "accidentals.doublesharp")
        (,SHARP-RAISE  . "accidentals.sharp.arrowup")
        (,SHARP        . "accidentals.sharp")
        (,SHARP-LOWER  . "accidentals.sharp.arrowdown")
        (,NATURAL-RAISE . "accidentals.natural.arrowup")
        (  0            . "accidentals.natural")
        (,NATURAL-LOWER . "accidentals.natural.arrowdown")
        (,FLAT-RAISE   . "accidentals.flat.arrowup")
        (,FLAT         . "accidentals.flat")
        (,FLAT-LOWER   . "accidentals.flat.arrowdown")
        (,DOUBLE-FLAT  . "accidentals.flatflat")
)

  % If the major scale is built from the tonic, dominant, and subdominant
  %  major chords, then the major scale involves arrowed accidentals.
  % Defining the pitches in the major mode allows us to use it for
  %  key signatures.
 
justMajor = #`(
    (0 . ,NATURAL)
    (1 . ,NATURAL)
    (2 . ,NATURAL-LOWER)
    (3 . ,NATURAL)
    (4 . ,NATURAL)
    (5 . ,NATURAL-LOWER)
    (6 . ,NATURAL-LOWER)
)
justMinor = #`(
    (0 . ,NATURAL)
    (1 . ,NATURAL)
    (2 . ,FLAT-RAISE)
    (3 . ,NATURAL)
    (4 . ,NATURAL)
    (5 . ,FLAT-RAISE)
    (6 . ,FLAT-RAISE)
)

  % keyAlterationOrder needs to know our pitches to typeset key signatures.
  % Each object that draws accidentals needs to know our glyphs.
 
\layout {
  \context {
    \Score
  keyAlterationOrder = #`(
    (6 . ,FLAT) (2 . ,FLAT) (5 . ,FLAT) (1 . ,FLAT) (4 . ,FLAT) (0 . ,FLAT) (3 . ,FLAT)
    (3 . ,SHARP) (0 . ,SHARP) (4 . ,SHARP) (1 . ,SHARP) (5 . ,SHARP) (2 . ,SHARP) (6 . ,SHARP)
    (6 . ,FLAT-RAISE) (2 . ,FLAT-RAISE) (5 . ,FLAT-RAISE) (1 . ,FLAT-RAISE) (4 . ,FLAT-RAISE) (0 . ,FLAT-RAISE) (3 . ,FLAT-RAISE)
    (3 . ,SHARP-LOWER) (0 . ,SHARP-LOWER) (4 . ,SHARP-LOWER) (1 . ,SHARP-LOWER) (5 . ,SHARP-LOWER) (2 . ,SHARP-LOWER) (6 . ,SHARP-LOWER) (6 . ,SHARP-RAISE)
    (3 . ,NATURAL-RAISE) (0 . ,NATURAL-RAISE) (4 . ,NATURAL-RAISE) (1 . ,NATURAL-RAISE) (5 . ,NATURAL-RAISE) (2 . ,NATURAL-RAISE) (6 . ,NATURAL-RAISE)
    (6 . ,NATURAL-LOWER) (2 . ,NATURAL-LOWER) (5 . ,NATURAL-LOWER) (1 . ,NATURAL-LOWER) (4 . ,NATURAL-LOWER) (0 . ,NATURAL-LOWER) (3 . ,NATURAL-LOWER)
    )
    \override KeySignature.glyph-name-alist = \arrowGlyphs
    \override KeySignature.padding-pairs = #'(
    (("accidentals.natural.arrowdown" . "accidentals.natural.arrowdown") . 0.5)
    (("accidentals.natural.arrowdown" . "accidentals.sharp.arrowdown") . 0.2)
    (("accidentals.natural.arrowdown" . "accidentals.flat.arrowdown") . 0.7)
    (("accidentals.natural.arrowup" . "accidentals.natural.arrowup") . 0.5)
    (("accidentals.natural.arrowup" . "accidentals.sharp.arrowup") . 0.2)
    (("accidentals.natural.arrowup" . "accidentals.flat.arrowup") . 0.7)
    (("accidentals.flat.arrowup" . "accidentals.flat.arrowup") . 0.3))
    \override Accidental.glyph-name-alist = \arrowGlyphs
    \override AccidentalCautionary.glyph-name-alist = \arrowGlyphs
    \override TrillPitchAccidental.glyph-name-alist = \arrowGlyphs
    \override AmbitusAccidental.glyph-name-alist = \arrowGlyphs
  }
}
  % MIDI implements microtones as a pitch bend, with one bend per channel.
  % These lines below assign one channel to each Voice, in case there are
  % multiple voices on a staff, so that each voice can have its correct
  % pitch bend.


From: Thomas Morley <address@hidden>
Sent: 13 December 2018 21:33
To: Luca Danieli
Cc: David Kastrup; lilypond-user
Subject: Re: Problem with accidentals.ly and Lilypond 2.19.82
 
Am Do., 13. Dez. 2018 um 21:59 Uhr schrieb Luca Danieli <address@hidden>:
>
> Thank you David.
> I tried to you convert-ly, but I got the following error:
>
> >convert-ly: error: accidentals.ly: Unable to determine version.  Skipping
>
> what can I do?

Then there is no \version-statement in the file.
Insert the version it was originally was created for, probably temporary.
Or do
convert-ly --from=2.18.2 --to=2.19.82 file.ly
Note, this will only show what would be changed . To actually do it, add -e

Anyway, you can't expect much effect on guile-code, although I think
we have a convert rule whch eliminates superfluos 'parser'-arguments
for 2.19.


> Luca Danieli <address@hidden> writes:
>
> > Hi there.
> >
> > I have got a problem. In my score, I have included the library accidentals.ly
> > With Lilypond 2.19.82 I have the error:
> >
> >
> > 163:2<0>: error: GUILE signaled an error for the _expression_ beginning here
> >
> > #
> >
> > (ly:parser-set-note-names parser pitchnames)
> >
> > If I change the line #(ly:parser-set-note-names parser pitchnames)
> > with #(ly:parser-set-note-names pitchnames)
> >
> > the program compiles, but some notes present a X instead of the
> > correct accidental.

Well, first try convert-ly.
If it's not sufficient. You need to post your accidental.ly, otherwise
nobody can help.

And please, _no_ inline images. Attach them, link to them, but not inline.
Meanwhile I've got notifications from more and more companies dropping
any plain text, doing _all_ via html:
It lookes all bright and shiny like one brothel door next to more of
them. The content is hidden, though. Going on my nerves.
Thus I decided to disable _any_ html in mails.
So I can't see inline images, and I will not allow them being displayed, again.


Cheers,
  Harm

Attachment: b-bes.png
Description: b-bes.png


reply via email to

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