lilypond-user
[Top][All Lists]
Advanced

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

Re: A question for the wise with brains or those who just used it for a


From: Jean Abou Samra
Subject: Re: A question for the wise with brains or those who just used it for a while and know :)
Date: Sat, 15 May 2021 15:38:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.8.1

Hi all,

Le 14/05/2021 à 16:18, Carl Sorensen a écrit :

On 5/14/21, 7:05 AM, "darkijah@jesusgod-pope666.info" 
<darkijah@jesusgod-pope666.info> wrote:

<snip>
The Half note of cause is should still be a half note or half break, I
     just don't want it taking precious space like that, that is nonsense in
     my view. I like how they did it in the old days without concern of such
     things. I just want it nice spread out really, the lower notes I would
     like to get a little more room as well. Like mixing the new with the
     old, the best of both worlds :)
If you want to make every note take up the space of an eighth note, you can scale the durations.

Instead of e2, use e2*1/4
You can do the same for rests.



There is also this trick:

\layout {
  \context {
    \Score
    \override SpacingSpanner.spacing-increment = 0
  }
  \context {
    \Voice
    \override NoteHead.extra-spacing-width = #'(-2 . 2)
  }
}

{ \cadenzaOn c1 c2 c4 c8 c16 c32 c64 }



<snip>

     g4^
          \markup
          \center-column { " " " "
          \override #'(size . 0.5) % 1 standard
          \override #'(thickness . 0.1) % 0.1 standard
          \woodwind-diagram #'flute #'((cc . (one two three))(lh . ())(rh .
     ()))
     }

If you want to make this process easier, you can define an alist with the flute 
diagrams, one entry per pitch.  It will be a big alist, but you only have to do 
it once.

You can then define a music function (call it fluteNotes) that will take a 
sequence of notes, and return the notes with the flute diagrams attached as 
markups.  It's possible that Harm (Thomas Morely) or Aaron Hill might even 
write the music function for you, as they seem to like this kind of programming 
challenge.

So then you could do something like

\new \Staff {
   \fluteNotes {g'4 e'2 d'4}
}

And you would automatically get the notes with the flute diagrams attached.  I 
think this is the easiest way for you to get the automatic flute diagrams you 
want.


I once posted something like that on the French list
(http://lilypond-french-users.1298960.n2.nabble.com/tin-whistle-td7590313.html).
Here is an amended version:

\version "2.22.0"

autoFingerings =
#(define-music-function (instrument alist music)
                        (symbol? list? ly:music?)
   #{
     <<
       \new Dynamics {
         #(music-map
            (lambda (m)
              (if (music-is-of-type? m 'note-event)
                  (let* ((pitch (ly:music-property m 'pitch))
                         (semitones (ly:pitch-semitones pitch))
                         (reduced-semitones (modulo semitones 12))
                         (fingerings
                           (or
                             (assv-ref alist reduced-semitones)
                             (begin
                               (ly:music-warning m
                                                 "fingering for pitch ~a in semitones not found"
reduced-semitones)
                               '()))))
                    (make-music
                      'SkipEvent
                      'duration
                      (ly:music-property m 'duration)
                      'articulations
                      (list
                        (make-music
                          'TextScriptEvent
                          'text
                          #{
                            \markup
                            \center-column {
                              \override #'(size . 0.5)
                              \override #'(thickness . 0.5)
                              \woodwind-diagram #instrument #fingerings
                            }
                        #}))))
                  m))
            (ly:music-deep-copy music))
       }
       { #music }
     >>
   #})

% G note is 7 semitones above C)
myFingeringAlist.7 = #'((cc . (one two three)) (lh . ()) (rh . ()))
% Add further entries in the same way.


\autoFingerings flute \myFingeringAlist {
  g4
}


Best regards,
Jean




reply via email to

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