lilypond-user
[Top][All Lists]
Advanced

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

Re: Sprechgesang


From: Thomas Morley
Subject: Re: Sprechgesang
Date: Sun, 1 Nov 2020 21:43:56 +0100

Am So., 1. Nov. 2020 um 16:10 Uhr schrieb Massimiliano Viel <info@maxviel.it>:
>
> Hi,
> yes the code was pretty old, about 2007.
>
> So it is good to have updated this topic in the forum.
> Thank you to you and everybody!
>
> unofortunately I use Lilypond only once in a while, so I don’t use it enough 
> to develop a deep knowledge as I would like.
> first one who writes a book/tutorial on Lilypond… kudos!
>
>  best to everybody
>
> massimiliano
>
>
> On 1 Nov 2020, at 10:08, Lukas-Fabian Moser <lfm@gmx.de> wrote:
>
> Hi Massimiliano,
>
> the code you provided is _very_ old. I modified it a bit in order to work 
> with both possible stem directions and respect rests. Also, there was a 
> hard-coded offset for the cross that can more succinctly be replaced by a 
> \center-align.
>
> I also lenghened the stems a bit. Note that this does not work together with 
> beams - I suspect it's got to do with unpure-pure-containers, which I don't 
> understand :-).
>
> Best
> Lukas
>
> \version "2.21.6"
>
> sp =
> {
>   \override Stem.stencil =
>   #(lambda (grob)
>      (let ((dir (ly:grob-property grob 'direction))
>            (length (ly:grob-property grob 'length))
>            (actual-stem (ly:stem::print grob)))
>        (if (ly:stencil? actual-stem) ; do not add anything if we don't have a 
> stem (e.g. rests)
>            (ly:stencil-combine-at-edge actual-stem
>                                        1
>                                        dir
>                                        (ly:text-interface::print grob)
>                                        (+ (* length -0.5) 0.75)) ; 0.75 is 
> the distance from cross to start of notehead
>            empty-stencil)))
>   \override Voice.Stem.text = \markup \center-align \teeny \musicglyph 
> #"noteheads.s2cross"
>   \override Voice.Stem.length = #(lambda (grob) (+ 0.5 (ly:stem::calc-length 
> grob)))
> }
>
> \relative {
>   \sp c'4 d e8[ f g a] b4 r c4 d e
>   \undo \sp e d c b a
>   \once \sp g f e
> }
>
> Am 31.10.20 um 23:03 schrieb Massimiliano Viel:
>
> And another possibly outrageous question… when I invoke \sp, it works from 
> the first following note on to the last note, rests included (!).
> How do I stop it?
>
> I showed both \undo\sp and \once\sp in my example.
>
> Enjoy LilyPond - it's amazing what you can achieve with it!
>
> Lukas
>
>

Hi,

I found
https://www.mu-sig.de/Theorie/Notation/grafik/Notation8/28-1.gif
in the net and tried to code it in LilyPond.

Code and image attached.
I'm aware there are some edges where the current output could be
tweaked to match the .gif even more.
Though, I limited myself to demonstrate the current coding, it's
varios settings and configuration possibilities.

Cheers,
  Harm

Attachment: sprechgesang-01.png
Description: PNG image

Attachment: sprechgesang-01.ly
Description: Text Data


reply via email to

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