lilypond-user
[Top][All Lists]
Advanced

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

Re: Tone cluster


From: Pierre Perol-Schneider
Subject: Re: Tone cluster
Date: Wed, 20 May 2020 16:52:36 +0200

Here's another try:

\version "2.20.0"

toneCluster = #(define-music-function
                 (note1 note2) (ly:music? ly:music?)
                   #{
                      {
                        \once\override NoteHead.stem-attachment = #'(0 . 0)
                        \once \override Stem.length =
                                  #(lambda (grob)
                                       (- (ly:stem::calc-length grob) 4.5))
                        \once\override Stem.thickness = #8
                        < #note1 #note2 >
                      }
                   #})

%% Test:
{
  a' \toneCluster a a'' a' \toneCluster a cis''''
}

Anything better?

Cheers,
Pierre

Le mer. 20 mai 2020 à 13:38, Pierre Perol-Schneider <address@hidden> a écrit :
Hi All,

I have this function to make a tone cluster:

%%%%
\version "2.20.0"

toneCluster = #(define-music-function
                 (note1 note2) (ly:music? ly:music?)
                   #{
                      <<
                        { #note1 }
                        {
                          \once\override NoteHead.stem-attachment = #'(0 . 0)
                          \once\override Stem.length = #14 % <= Manually set.
                          \once\override Stem.thickness = #7
                          #note2
                        }
                      >>
                   #})

% Test:
{
  a' \toneCluster a a'' a' \toneCluster a cis''''
}
%%%%

How could I set the stem length automagically according to the pitch difference?

Cheers,
Pierre

reply via email to

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