Hi Craig,

As I suspected, the problem was in how your code was structured. I run into
the same issues when I started using the EE. Look at the attached file.

I recognize that not every change that I made may be necessary, I made
changes while I was trying to make the snippet  work (the file as you sent
it wouldn't compile at all for me), and currently don't have time to strip
it to the minimum. But I hope that at least a working example will be
useful to you.

The basic problem is that you were placing many overrides to the same
property in the same moment, which caused problems: the EE can't overwrite
an override that is already present in the music input. However, if you
move your general override (named \gossecDynamics in your file) in the
layout settings, then there is no conflict since there are not two
overrides present at the same time, and the latter (created by the EE)
overwrites the general one. You should have gotten warnings for this I
think? Do you have the Edition Engraver on the latest version?

Hope you find this useful,
Stéfano


2018-04-08 6:43 GMT-03:00 arnepe <arne.pet...@berlin.de>:

> hello Craig,
>
> this is the output I get from your file:
> ee_problem.pdf
> <http://lilypond.1069038.n5.nabble.com/file/t1308/ee_problem.pdf>
> The "ff" at 1 0/4 looks different than the same mod at 3 0/4.
>
> However - if I change the style at line 28, and comment out line 65 or line
> 89,
> the change takes effect only on 1 0/4, and the mod at 3 0/4 is not affected
> at all.
> My knowledge of EE is marginal at best (and virtually nil with Scheme) so I
> am afraid I can't be of any help here...
>
> cheers
> Arne
>
>
>
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>
> _______________________________________________
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
\version "2.19.65"
\language "english"

\include "oll-core/package.ily"

%%% SCHOLARLY %%%

\loadPackage \with {
  modules = annotate
} scholarly


%%% EDITION ENGRAVER %%%

\loadPackage edition-engraver


%%% GOSSEC DYNAMICS %%%

#(define (gossec-dynamic-stencil grob)
   (let ((dyn (ly:grob-property grob 'text)))
     (cond
      ((equal? dyn "p")(set! dyn "p"))
      ((equal? dyn "pp")(set! dyn "pp"))
      ((equal? dyn "f")(set! dyn "f"))
      ((equal? dyn "ff")(set! dyn "ff"))
      )
     (ly:grob-set-property! grob 'text #{ \markup { \normal-text \italic #dyn } #})
     ;(ly:grob-set-property! grob 'self-alignment-X -.75)
     (ly:text-interface::print grob)
     ))

%%% GOSSEC EDITORIAL DYNAMICS %%%

#(define (gossecedit-dynamic-stencil grob)
   (let ((dyn (ly:grob-property grob 'text)))
     (cond
      ((equal? dyn "p")(set! dyn "p"))
      ((equal? dyn "pp")(set! dyn "pp"))
      ((equal? dyn "f")(set! dyn "f"))
      ((equal? dyn "ff")(set! dyn "ff"))
      )
     (ly:grob-set-property! grob 'text #{ \markup { \normal-text #dyn } #})
     ;(ly:grob-set-property! grob 'self-alignment-X -.75)
     (ly:text-interface::print grob)
     ))

%gossecDynamics = \override DynamicText.stencil = #gossec-dynamic-stencil
gosseceditDynamics = \override DynamicText.stencil = #gossecedit-dynamic-stencil


\editionMod global 1 0/4 gossec.simphonie.clarinetII.Voice \once \gosseceditDynamics
\editionMod global 3 0/4 gossec.simphonie.clarinetII.Voice \once \gosseceditDynamics

\consistToContexts #edition-engraver Score.Staff.Voice

global = {
  \time 4/4
  s1*4
  \bar "|."
}

clarinetIINotes = \relative c' {

  %\gossecDynamics

  % 1
  \criticalRemark \with {
    message = "Added missing \lilyDynamics{ff}"
  }
  DynamicText
  e1 \ff |

  % 2
  e2  g4 r8.  g16 |

  % 3
  \criticalRemark \with {
    message = "\lilyDynamics{ff} found in Trumpet, Horn and Clarinet 1 added to all remaining parts."
  }
  DynamicText
  f1 \ff |

  % 4
  f2  d'4 r8.  d16 |
}

\addEdition part
\addEdition global


\layout {
  \context {
    \Score
    \editionID ##f gossec.simphonie
    \override DynamicText.stencil = #gossec-dynamic-stencil
  }
}

\score {
  \new Staff = "Clarinet 2" \with { 
    \editionID clarinetII
    instrumentName = #"Clarinetto 2°."
    shortInstrumentName = #"Cl. 2" 
  } <<
    \new Voice \global
    \new Voice \clarinetIINotes
  >>
}

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to