Le 23/10/2020 à 19:21, Michael Blankenship a écrit :
Dear Lilypond Power-users,

I have a question in the form “can lilypond do this?” And I’m desperate for a clear answer. I know nothing about using LilyPond, but I do have some experience with Music21. I have a very complex (but super interesting!) notation workflow producing graphics for my PhD thesis in Music Theory at Eastman that I would love to be able to automate as much of as possible. I’m a Sibelius user, and I just don’t know what LilyPond is capable of, and while I’m willing to put in the work for a solution, I’m on a deadline and don’t have time to learn a whole new workflow only to discover that it doesn’t work. So I'm really just looking for a "yeah, you could totally streamline your transcription process with LilyPond" or "no, it does not have the functionality you're looking for."

Basically, I've worked out a way to represent the sounds of words as music using a system of notation I developed that maps vowels onto a staff and puts little colored brackets (I call them headphones) around notes to represent clusters of consonants. I made an enormous Illustrator doc with rows of noteheads with every possible combination of consonant headphones available in English (there are only about 10 categories of consonants, represented by 6 colors and some changes in shape). The way I have been doing transcription is initially in Sibelius, where I've made a custom 12-line staff with proportional note spacing and horizontal beaming, exporting from Sib as an .svg to Illustrator, and then I go in and replace every notehead by hand with the correct bracketed notehead from my big Illustrator collection.

But the system is actually designed to be easy to work into an algorithm. It's pretty easy to automatically produce a phonemic transcription of lyrics (which would always have to be hand checked, but is still a lot faster). There are only 46 phonemes in the Standard English, so from the phonemic transcript and the rhythmic transcript, it shouldn't be that hard to write a process for placing the note in the correct staff space and attaching the correct headphones to it. But there's another complication, which is the staff has a subtle graphic design as well (which I've been doing by hand in Illustrator). The lines vary in thickness, so the thickest lines are at the top and bottom, and the thinnest are in the middle; and the lines follow a stepped gradient of greyscale, so the top line is the lightest grey, and the bottom line is black. I've attached an image of the staff with every vowel note represented. Most of them don't have headphones, but the r-colored vowels have a light blue headphone on the right side, indicating the /r/ sound after the vowel.

So, can LilyPond help me with any of this? Or is it too much?

Thanks so much,
Michael Blankenship

Hello,

The attached source file (a quick hack), with PDF result, should demonstrate that this kind of things is completely possible using LilyPond.

If you are starting a large-scale project, it is recommended to learn LilyPond and Scheme first. The tutorial will help you for the LilyPond part:

http://lilypond.org/doc/v2.21/Documentation/learning/

and this chapter of the Notation manual will be particularly important to you:

http://lilypond.org/doc/v2.21/Documentation/notation/changing-defaults

as well as the whole extending manual:

https://lilypond.org/doc/v2.21/Documentation/extending/

There is also a good resource around Scheme used inside LilyPond:

https://scheme-book.ursliska.de/scheme/index.html

This list can help with all sorts of specific problems. It won't be the first challenge we tackle.

Best,
Jean

\version "2.23.0"

\layout {
  \context {
    \RhythmicStaff
    \remove Time_signature_engraver
    \remove Bar_engraver
  }
  \context {
    \Score
    \override VerticalAxisGroup.staff-staff-spacing =
      #'((basic-distance . 2.5)
         (minimum-distance . 2.5)
         (padding . 0)
         (stretchability . 0))
  }
}


#(define n-staff-lines 12)

#(define (scale no)
   (/ no n-staff-lines))

#(define (make-greyscale no)
   (let ((value (* 0.5 (scale (- n-staff-lines no)))))
     (list value value value)))

#(define (make-special-staff no music)
   (let ((nostr (number->string no))
         (thickness (*
                      10
                      (scale
                       (max no (- n-staff-lines no))))))
     #{
       \new RhythmicStaff = #nostr \with {
       %  instrumentName = \markup \teeny #nostr
         \override StaffSymbol.color = #(make-greyscale no)
         \override StaffSymbol.thickness = #thickness
         \override NoteHead.stencil = #ly:text-interface::print
         \override Stem.thickness = #(/ 3 thickness)
       }
       { #music } 
     #}))

<<
  #@(map (lambda (i) (make-special-staff i #{ s1 #})) (iota 12))

  #(make-special-staff 12 #{
    s4
    \crossStaff {
      \override Stem.length = 63
      < \tweak NoteHead.text
        \markup
          \translate #'(0 . 1)
          \overlay {
            \translate #'(1 . 0)
              \combine
                \with-color #blue \draw-circle #1.1 #0 ##t
                \draw-circle #1.2 #0.2 ##f
            \translate #'(0.3 . 0) \draw-circle #1.1 #0 ##t
            \translate #'(-0.4 . -0.8) \rotate #-120 \with-color #white \fontsize #-2 \number "2"
          }
      c>4
    } s2
  #})
>>
  

Attachment: Fancy.pdf
Description: Adobe PDF document

Reply via email to