4

In the following example (from my recent question, Globally removing engravers from LilyPond), I've managed to remove every engraver I need except for one: whichever engraver is responsible for the accent (>) on the bass clef's B.

enter image description here

What engraver do I remove to automatically get rid of such marks?

\version "2.20.0"
\language "english"

global = {
  \key e \minor
  \time 2/2
  \partial 4
}

right = \relative c' {
  \global
  e8_\mf r8 |
  g4 fs8 e ds4 e8 fs |
  b,4\( cs8 ds e4\)
}

left = \relative c {
  \global
  g8( fs |
  e4) a b4._> a8 |
  g4 fs e
}

\score {
  \new PianoStaff <<
    \new Staff = "upper" \right
    \new Staff = "lower" { \clef bass \left }
  >>
  \layout { 
    \context {
      \Staff
        \remove "Time_signature_engraver"
    }
    \context {
      \Voice
        \remove "Stem_engraver"
        \remove "Rest_engraver"
        \remove "Phrasing_slur_engraver"
        \remove "Slur_engraver"
        \remove "Tie_engraver"
        \remove "Dynamic_engraver"
        \remove "Dots_engraver"
    }
  }
}

2 Answers 2

5

Extending on Ramillies part: Articulations are handled both by the Script_engraver as well as the New_fingering_engraver. These differ slightly in how they work. Script_engraver will listen to articulation type events, while the New_fingering_engraver does only acknowledge note heads and adds articulations from the articulations property of the cause.

Note that events handled by the Script_engraver will then be removed from this articulations property, as can be seen here.

#(define (eng context)
   (make-engraver
    (acknowledgers
     ((rhythmic-head-interface engraver grob srceng)
      (display (ly:event-property (ly:grob-property grob 'cause) 'articulations))
      (newline)))))

% prints empty list
\score {
  c->
  \layout {
    \context {
      \Voice
      \consists #eng
    }
  }
}

% prints list with articulation event
\score {
  c->
  \layout {
    \context {
      \Voice
      \consists #eng
      \remove Script_engraver
    }
  }
}

This means that usually articulations will be handled by the Script_engraver. If you remove that one they will instead be handled by the New_fingering_engraver. So you also need to remove that one.

4

That's actually an interesting question, and I've hit a bit of block here. But first of all, I would like to show you how to get this kind of info from the docs.

First we need to know what kind of object these articulations are. Often, the best way is to skim the basic docs (in this case, 1.3.1 "Expressive marks attached to notes"). After each section, there is a "see also" part that also has links to the internals reference. Here we can see that it links to Script and TextScript objects. So we inspect these pages, and it turns out that TextScript is the object that handles all the markups, while Script handles the articulations. So the articulations are Scripts.

Next, we can look at its internals reference page, and we see that it's drawn by Script_engraver. And looking at the Script_engraver's page in turn, we see that it's used by Voice (see the line "Script_engraver is a part of the following contexts:" at the bottom). So it looks like adding \remove "Script_engraver" should do the job.

However — it does not!! I'm sorry, but I have no idea why — perhaps someone else will be able to enlighten us both. However, nothing is lost, because you can put pretty much any kind of \overrides and related commands into the \context blocks as well. So if you add \omit Script into the second context block in your code, it will do what you want.

4
  • I swear I read that first page three or four times earlier today :-) But the next few steps were largely new to me, so thank you! I'll wait to see what others say, but your solution works great.
    – Richard
    Commented Aug 21, 2022 at 23:33
  • For reasons that are a little difficult to explain, you also need to remove New_fingering_engraver in addition to Script_engraver. Commented Aug 22, 2022 at 12:38
  • @ABOUSAMRAJean Hi Jean! Is there any reason why this is this way? As I understand the code any articulation type event or text script type event should be handled by Script_engraver and Text_engraver, without ever being touched by the New_fingering_engraver unless you remove one of these engravers. Do we have script-type events that are neither articulation-type nor text-script-type?
    – Lazy
    Commented Aug 22, 2022 at 13:56
  • Hi Valentin. I guess you answered your own question in your answer? Or did I misunderstand the question? Commented Aug 23, 2022 at 16:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.