lilypond-user
[Top][All Lists]
Advanced

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

Re: how close are we to having an "addAt" or "insertAt" feature?


From: Kieren MacMillan
Subject: Re: how close are we to having an "addAt" or "insertAt" feature?
Date: Wed, 26 Feb 2014 22:44:38 -0500

Hi Jan-Peter,

> - if you use it without any template mechanism, you have to assign
> proper edition-engraver id-paths - I can't say, what that means in
> production.
> - right now it is just ripped out of my working framework and might or
> might not work as expected ... but this doesn't need to be called a
> drawback, but a challenge ;)

Are you interested in taking up that challenge?  =)

I would love a dead-simple, drop-in solution which would require minimal 
adjustments to a score in order for it to accept “edition tweaks”. I tried to 
adapt your example (see below), but had a few difficulties, and gave up quickly 
because of the time constraints I was under at the time — I am now much freer, 
and would love to take this to the goal line.

%%%%  BEGIN

\version "2.18.0"
\include "edition-engraver.ly"

\addEdition test
% color the notehead red on the second quarter in the second measure
\editionMod test 2 1/4 my.test.Staff.A \once \override NoteHead #'color = #red
% destroy the slur starting on the second quarter in the first measure
\editionMod test 1 2/4 my.test.Staff.A \shape #'((0 . 0)(0 . 1)(0 . -1)(0 . 0)) 
Slur

\layout {
  \context {
    \Score
    \consists \editionEngraver my.test
  }
}

music = \relative c'' { c4 bes a( g) f e d c }

\new Staff \with { \consists \editionEngraver my.test }
  \new Voice \with { \consists \editionEngraver ##f } \music

%%%%  END

It looks dead simple… but (a) I don’t understand what the “my” is, nor where 
“Staff.A” comes from, nor why you need to \consist a ##f engraver in the Voice, 
etc.

Start with a simpler (pseudo-)example:

%%%%  BEGIN

\version "2.18.0"
\include "edition-engraver.ly"

\addEdition editionA
% color the notehead red on the second quarter in the second measure
\editionMod editionA 2 1/4 Staff.Singer \once \override NoteHead #'color = #red
% destroy the slur starting on the second quarter in the first measure
\editionMod editionA 1 2/4 Staff.Singer \shape #'((0 . 0)(0 . 1)(0 . -1)(0 . 
0)) Slur

\layout {
  \context {
    \Score
    \consists \editionEngraver editionA
  }
}

music = \relative c'' { c4 bes a( g) f e d c }

\new Staff = “Singer" \with { \consists \editionEngraver editionA } \music

%%%%  END

Why is something like that not possible?
n.b. I'm invoking Occam’s Razor here: I’ll happily accept more complexity only 
if it is required for greater power.  ;)

Thanks,
Kieren.


reply via email to

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