lilypond-user
[Top][All Lists]
Advanced

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

Re: test spanner with controlled gradient / dynamic volume curve indicat


From: Michael Winter
Subject: Re: test spanner with controlled gradient / dynamic volume curve indicated by grey level
Date: Mon, 29 Jan 2018 23:19:23 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2

A bit more here. I think I can fake this in a markup... See example pasted below. My scheme skilz are minimal. I would like yo do this interpolating between the x position of adjacent notes. So maybe I can do this as a custom beam stencil. or some kind of spanner. Basically I want a scheme function that will give me the position of a given note and the next note... Thanks!

\relative c'' {
  s64
  -\markup {
    \combine
    \override #'(line-join-style . miter)
    \with-color #(x11-color 'grey60)
    \path #2
    #'((moveto 0 0)
     (lineto 0.3 0)
     (closepath)
     )

   \combine
    \override #'(line-join-style . miter)
    \with-color #(x11-color 'grey40)
    \path #2
    #'((moveto 0.3 0)
     (lineto 0.6 0)
     (closepath))

    \override #'(line-join-style . miter)
    \with-color #(x11-color 'grey20)
    \path #2
    #'((moveto 0.6 0)
     (lineto 0.9 0)
     (closepath))
  }


}


On 01/29/2018 06:27 PM, Michael Winter wrote:
Hello...

I have tried quite a few hacks, but nothing really suitable.

What I really want is to simple draw a line beneath the staff that has a grey scale gradient such that for each note, I give a target value.

Most of what I have tried involves doing this in increments with overlapping spanners, I also tried the code in this thread:
https://lists.nongnu.org/archive/html/lilypond-user/2016-10/msg00097.html

I think the answer is doing this with svg directives since in the svg documentation there are directives for linear gradients, but I do not know how to build the function to use svg directives and such that the target greyscale value is reached at the x-position of a given notehead.

Also, ideally I would be able to use spacer rests to give intermediary values along the way, since the curve is actually not linear.

Thanks in advance and my apologies if I have been unclear.

Best,
Michael





reply via email to

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