lilypond-user
[Top][All Lists]
Advanced

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

Re: lyrics free from notes


From: Trevor Bača
Subject: Re: lyrics free from notes
Date: Mon, 4 Jun 2007 18:23:34 -0500

On 6/4/07, Mats Bengtsson <address@hidden> wrote:
Trevor Bača wrote:

>
> Oh cool Devnull magic; (if I had turned over to 7.3.7.5 "Lyrics
> independent of notes" I could have found it there).
>
> Is it possible to use the Devnull context as a general type of
> "reference voice" maker for items other than lyrics? Something like
> this to rhythmically position the dynamics against a hidden reference
> voice ...
>
> %%% BEGIN %%%
>
> \version "2.11.23"
>
> \new Staff <<
>   \new Devnull {
>      c'8 \p
>      c'8 \f
>      c'8 \p
>      c'8 \f
>   }
>   \new Voice {
>      c'4 c'4 c'4
>   }
>
>>>
>
> %%% END %%%
>
>
> ... but with, of course, the dynamics sticking around while only the
> Devnull *notes* disappear?

You cannot do any such general purpose Devnull context.
How should it know that it's exactly the dynamics that you
want to keep this time (maybe it's the rehearsal marks or
the text scripts or whatever else the next time).

If you lookup the definition of the context, you will see that
it's very simple. Unfortunately, you cannot use the similar
idea always. For example, in the specific situation you
describe where you want to typeset the dynamics, I made
an attempt to define a similar context where I had removed
all engravers related to ordinary notes, but  it resulted in a
more or less severe crash, since some engravers need
the results from others in order to work.

>
> I guess not since the purpose of Devnull is to junk stuff. But how
> cool it would be to have a generic type of context in which you could
> stuff all sorts of (possibly floating) decorative stuff -- spanners,
> dynamics, arbitrary text scripts -- and have all the reference notes
> to which those things attach simply disappear ...

Ah, I like Mats's explanation.

You know what would be really cool? Not a new Devnull-ish context but
instead a new *grob*. The grob would behave exactly like Skip (in that
it would print no output) but would also behave like Note (in that it
would actually count as "real" musical material and initiate a Voice
and produce a context with some actual content)[1]

[1] Apparently, a context full of only Skips gets collapsed to no
context at all?

This StrongSkip (or, equivalently, InvisibleNote) grob would then be
absolutely perfect for creating contexts full of dynamics only or
spanners only or text scripts only, all precisely positioned with
regards to rhythm.

Any thoughts? If the idea is feasible I could probably find a way to
put a reasonable bounty on it.

(Though it would definitely be very important to test thoroughly
because, for example, Skips at the beginnings of contexts have wreaked
all sorts of havoc in previous versions of the code ... which makes me
think that probably the smartest approach would be to derive this new
grob not from Skip but instead from Note. The strategy then would be
to make all the "parts" of the Note (head, stem, dots, ledger lines,
accidentals, whatever) transparent AND also cause this InvisibleNote
or SpacerNote grob to *cause no collisions* with real Notes and Rests.
I would imagine there's probably also trickiness with regards to which
engravers expect which other engravers to be present in sequence at
interpretation time, but I'm just guessing.)

Of course we'd need a way to input the new grob, which would mean a
change to the parser. I might suggest S or x ...

\new Staff <<
  \new Voice {
     c'4 c'2
  }
  \new Voice {
     x8 \p
     x8 \f
     x8 \p
     x8 \f
  }


... would give some notes in a real voice together with a rhythmically
independent "dynamics only" voice composed of StrongSkips (or
InvisibleNotes, or Spacers) ...



--
Trevor Bača
address@hidden

reply via email to

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