lilypond-user
[Top][All Lists]
Advanced

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

Re: Write something in the music and place in in Lyrics-like context?


From: Urs Liska
Subject: Re: Write something in the music and place in in Lyrics-like context?
Date: Sun, 30 Sep 2018 15:45:48 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

Hi David,

Am 29.09.2018 um 17:50 schrieb David Kastrup:
Urs Liska <address@hidden> writes:

Hi,

there's something that has been on my mind for quite some time, and
I'd like to get some feedback if this would be possible to have (or if
it actually already *is* available somehow).

I would like to create some new contexts to hold material like
analysis symbols and the like (the same would be useful for an
alternative approach to bass figures).

Basically these would have to be similar to lyrics in so far as their
items are aligned to notes, should be printed on a common baseline
(i.e. not directly attached to the staff objects), and there should be
the option of several layers, like stanzas (e.g. to provide symbols in
different systems or to reflect sections in different keys etc.)

But I would like to have the option to encode these items not in a
separate variable but along with the music itself. For some use cases
(or users' mindsets) it would be much more straightforward to encode,
say, a bass figure directly along with the note it refers to instead
of having to use potentially large numbers of spacer rests to push
them to the right position. Something like

     c'4 -\fig <3 4 6+>

or

     c'4 -\analysis "D79>"

Of course the syntax of these commands is irrelevant at the
moment. But the idea is: would it be possible to write something like
such a function and have the resulting element either

- be injected/projected/whatever to a separate "lyrics" context, or
- have it printed in a way that is consistent with how such separate
contexts would behave with regard to staff spacing etc.

?
Well, you can always do
\context Lyrics = "analysis" \lyricmode { "D79>" 1*0 }
before material in some other context.  Of course you'll want some
"analysis" context placed in parallel that is kept alive with a suitably
long \skip for that purpose.

Thank you for this info. I think I will be able to build something from this which sufficiently does what I want:

\version "2.19.82"

analysis =
#(define-music-function (text)(markup?)
   #{
     \context Dynamics = "analysis" s1*0 -\markup #text
   #})

\score {
  <<
    \new Staff = "notes" \relative {
      c'
      \analysis "2" d2
      \analysis "4" d,4
    }
    \new Dynamics = "analysis" {
      s2 -\markup "1" s2 -\markup "3"
    }
  >>
}

is of course a trivial example, and I would have to replace the simple markup? with something more complex. But it's enough that I can say/promise it will work.

Best
Urs





reply via email to

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