Re: Programming Question

2014-09-18 Thread Paul Morris
David Nalesnik-2 wrote
> Perhaps it's your choice of comparison by eq?  I can't say what it does
> with strings, but it generally tests that an object is the same object as
> another, rather than simply equivalent.  (If you want more on these, you
> can read up on them in the Guile manual).

Here's the section on equality (eq? eqv? and equal?):
https://www.gnu.org/software/guile/manual/guile.html#Equality

I've found the guile manual to be a helpful resource for learning to use
Scheme.

Cheers,
-Paul



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/Programming-Question-tp166538p166575.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: lilypond-user Digest, Vol 142, Issue 80

2014-09-18 Thread b...@wolfcomposer.com
Hi, Jay--

i'm not sure of everything you're trying to do, but change your layout block to
this:

\layout {
  \context {
\Voice
\remove Note_heads_engraver
\remove Rest_engraver
\consists Completion_heads_engraver
\consists Completion_rest_engraver
  }
  \context {
\Staff
\remove Time_signature_engraver
  }
}

You'll get rid of all time signatures--err, at least i did, and i'm not the most
advanced user.  You can also erase your \override command for the time
signature.

i recently used the compound meter.  i thought that Lilypond added the "in
between" barlines by default and used bar checks inside the compound meter, only
to find that i was getting time signature errors when compiling the file.  The
output didn't have any of those "in between" barlines, so i deleted the bar
checks and added the missing lines manually.  i did this all in my music
variable.  i suspect there is a way to get Lilypond to change its default
behavior and add those barlines, itself, but as i said, i'm not the most
advanced of users.  i hope this little bit helps, though.

Take care,
bill



> Message: 6
> Date: Thu, 18 Sep 2014 19:00:33 + (UTC)
> From: Jay Vara 
> To: lilypond-user@gnu.org
> Subject: compoundMeter - how to get lilypond to recognize the bar line
> in the middle
> Message-ID: 
> Content-Type: text/plain; charset=us-ascii
>
> >I am not top-posting
>
> I am using a compoundMeter - 5/4 + 2/4. I would like to see a bar line
> after 5 quarter notes (and after 7 quarter notes). Plus I would like
> Completion_heads_engraver to recognize the bar line after the 5 quarter
> notes.
>
> I was able to artificially achieve getting the bar lines by adding a
> silent voice with those bar lines.
>
> However I was not able to find anything that would make the fifth note
> g2 in the following example to be automatically replaced by g4~g4 [tied
> quarter notes] as happens for the seventh note where a2 is replaced by
> a4~a4.
>
> Also, in the code below, I tried to prevent the time signature from
> printing - does not seem to work for compoundMeter. Also not sure why I
> got a couple of extra staff lines, plus how it got the 7/4 meter for the
> extra staves.
>
> \version "2.18.2"
> fooBar = { s1 s4\bar "!" s2 \bar "||" }
> music = \relative c' {c4 d e f g2 a b4 c c b a g2 f4 e d c b a g a b}
> \score {
>
> <<
> \override Staff.TimeSignature #'stencil = ##f
> \compoundMeter #'((5 4) (2 4) )
> \set Timing.beatStructure = #'(5 2 )
>
> \new Voice = "theBarLines" { \fooBar \fooBar \bar "|." }
>
> \new voice \music
> \shiftDurations #1 #0 {\music}
> >>
> }
> \layout {
> \context {
> \Voice
> \remove Note_heads_engraver
> \remove Rest_engraver
> \consists Completion_heads_engraver
> \consists Completion_rest_engraver
>
> }
> }___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
Hi Jay,

On Thu, Sep 18, 2014 at 6:28 PM, Jay Vara  wrote:

> > I am not top-posting
>
> David,
>
> I defined a second variable nsiz which is 1, 2 or 3
>
> Tried
>
> (case duration-log
>  ((nsiz) "a" )
>   (else "")))
>
> This condition was never succeeding although I printed out nsiz and
> duration-log and they were the same.
>
> Then I changed it into an if statement - that worked. This is to add a
> suffix to note name for half notes in normal duration, quarter notes in
> halved durations, and eighth notes when durations are further halved. It
> should be obvious from the output that it has worked.
>
> Then further, I wanted the suffix to be "i" if the note was d or b. I
> tried various if statements and they are all failing for some reason.
> default-name which is equal to "d" gives a #f when tested, for example.
> Not sure what to do to make it work.
>

Perhaps it's your choice of comparison by eq?  I can't say what it does
with strings, but it generally tests that an object is the same object as
another, rather than simply equivalent.  (If you want more on these, you
can read up on them in the Guile manual).

string=? seems to work.  Try the following--is it what you want?

 #(define (myNoteNames size nsiz)
   (lambda (grob)
 (let* (
 ;; bindings
 (default-name (ly:grob-property grob 'text))
 (new-name (assoc-get default-name newnames))
 (cause (event-cause grob))
 (duration (ly:prob-property cause 'duration))
 (duration-log (ly:duration-log duration))
 (suffix
  (case duration-log
((1) (if (= nsiz 1)
 (if (or (eqv? new-name "R")
 (eqv? default-name "b"))
 "i"
 "a")
 "")) ;; half note
((2) (if (= nsiz 2) "a" "")) ;; quarter note
((3) (if (= nsiz 3) "a" "")) ;; eighth note
(else "")))
 (suffix2
  (if
   (or (string=? default-name "b")
   (string=? default-name "d"))
   "i"
   ""))
 (text (string-append new-name suffix suffix2))
 )
   (display default-name)
   (display (eq? default-name "d"))
   (display duration-log) (display size) (display nsiz) (display text)
   (newline);; body
   (ly:grob-set-property! grob 'text (markup #:fontsize size text))
   (ly:text-interface::print grob)
   )
 ))

%
Best,
David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread Jay Vara
> I am not top-posting

David,

I defined a second variable nsiz which is 1, 2 or 3 

Tried

(case duration-log
 ((nsiz) "a" )
  (else "")))

This condition was never succeeding although I printed out nsiz and 
duration-log and they were the same.

Then I changed it into an if statement - that worked. This is to add a 
suffix to note name for half notes in normal duration, quarter notes in 
halved durations, and eighth notes when durations are further halved. It 
should be obvious from the output that it has worked. 

Then further, I wanted the suffix to be "i" if the note was d or b. I 
tried various if statements and they are all failing for some reason. 
default-name which is equal to "d" gives a #f when tested, for example.
Not sure what to do to make it work.

Here is the code:

\version "2.18.2"

music =  \relative c' {d2 b2 b4 d} % {c4 d2 e f g2 g a4 b c c b a g f e 
d c}
  
  
newnames =
#`(("c" . "S")
   ("d" . "R")
   ("e" . "G")
   ("f" . "M")
   ("g" . "P")
   ("a" . "D")
   ("b" . "N")
   )
  #(display newnames)


#(define (myNoteNames size nsiz)
(lambda (grob)
   (let* (
  ;; bindings
  (default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name newnames))
  (cause (event-cause grob))
   (duration (ly:prob-property cause 'duration))
   (duration-log (ly:duration-log duration))
   (suffix
(case duration-log
  ((1) (if (= nsiz 1) (if (or (eqv? new-name "R") (eqv? 
default-name "b")) "i" "a") "")) ;; half note
  ((2) (if (= nsiz 2) "a" "")) ;; quarter note
  ((3) (if (= nsiz 3) "a" "")) ;; eighth note
  (else "")))
  
   (text (string-append new-name suffix))
 )  
  (display default-name) (display (eq? default-name "d")) 
(display duration-log) (display size) (display nsiz) (display text)
(newline);; body
 (ly:grob-set-property! grob 'text (markup #:fontsize size 
text))
 (ly:text-interface::print grob)
 
 )
   ))

\new Staff {
  <<
 \new Voice {
   \music 
 \shiftDurations #1 #0 {\music } 
 \shiftDurations #2 #0 {\music \music }
 }
\context NoteNames {
  
  \override NoteName.stencil = #(myNoteNames 0 1)
\music 

   \override NoteName.stencil = #(myNoteNames -1 2)
\shiftDurations #1 #0 {\music } 

\override NoteName.stencil = #(myNoteNames -2 3)
\shiftDurations #2 #0 {\music \music }

}
  >>
}




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: woodwind-diagram problem

2014-09-18 Thread Pierre Perol-Schneider
Hi Takumi,

2014-09-18 20:06 GMT+02:00 takumi ikeda :


> I got an error message by the following script.


Doc says : "*In many cases*, the keys other than the central column can be
displayed by key name …"
It seems that you've found another case...


> Or, do you have any idea to place some optional characters around the
> fingering chart?


I'll take a look at without conviction.

Cheers,
Pierre
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic fixing of note between measures

2014-09-18 Thread David Bellows
>Is there a reason not to use Completion_heads_engraver all the time or
atleast as a default?

I think the expectation is that most composers most of the time do not want
notes split up automatically as it probably means a mistake was made when
entering the notes. Basically they'll split when they want to. It's just
you and I working with generated scores where this other behavior is
preferred.

>I am also using a compound metre. Hopefully this will work with that.

I have no idea about that! For me I'm just using the bar lines and
automatic breaking more for aesthetic reasons or as a help to the performer
to see where they are than I am for any musical reasons. So for me 4/4 is
all I'm using. Naively I would assume that it should work for more complex
time signatures.

>In one case I have repeating measures of 5/4 + 3/4 + 2/4. I have succeeded
in getting the bar lines printed after 5th and 8th quarter notes in a 10/4
time scale by adding a voice with bar lines at those places. May be there
is a different method of achieving this effect.

I'm not quite getting what you're trying to do, do have a picture or some
code?

On Thu, Sep 18, 2014 at 10:49 AM, Jay Vara  wrote:

> David,
>
> That works. Malte also suggested something similar.
>
> Is there a reason not to use Completion_heads_engraver all the time or
> atleast as a default?
>
> I am also using a compound metre. Hopefully this will work with that.
>
> In one case I have repeating measures of 5/4 + 3/4 + 2/4. I have succeeded
> in getting the bar lines printed after 5th and 8th quarter notes in a 10/4
> time scale by adding a voice with bar lines at those places. May be there
> is a different method of achieving this effect.
>
> Jay
>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
On Thu, Sep 18, 2014 at 9:57 AM, Jay Vara  wrote:

> David:
>
> Friscobaldi says:
>
> Starting lilypond-windows.exe 2.18.2 [Alam-Ata.ly]...
> Processing `c:/users/arjuna/appdata/local/temp/frescobaldi-
> pvt8zv/tmptpz4so/Alam-Ata.ly'
> Parsing...
> Interpreting music...[8][16][24][32][40][48][56][64]
> Preprocessing graphical objects...
> Interpreting music...
> warning: cannot find or create `NoteNames' called `'
> MIDI output to `Alam-Ata.mid'...
> Interpreting music...
> Preprocessing graphical objects...
> Calculating line breaks...
> Drawing systems...
> Finding the ideal number of pages...
> Fitting music on 2 or 3 pages...
> Drawing systems...
> Layout output to `Alam-Ata.ps'...
> Converting to `./Alam-Ata.pdf'...
> Success: compilation successfully completed
> Completed successfully in 3.0".
>
> I am not able to figure out which line the warning above is coming from.
>

I'd look around the line
\context NoteNames

But here I wouldn't be able to tell you much without seeing the file you
tried to run.

Are the numbers in square brackets the line numbers?
>
>
Just guessing, but I think they are just indicating blocks of measures
successfully "interpreted"


--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread Jay Vara
David

Fantastic!

I can not claim to understand what you have done. The display command is 
helping - I can see that text has what I need, and why I need to replace 
the new-name with text in the set property line.

Thanks,
Jay


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
Hi Jay,

On Thu, Sep 18, 2014 at 10:54 AM, Jay Vara  wrote:


>
> Is this the way I enter it? For some reason, does not seem to be working
> - it seems to be ignoring the suffix.
>
> By the time you set the 'text property, new-name doesn't hold the "newest"
name, rather the variable text does.  You could also rename the variable
text new-name.  let* allows you to do that.


> If I wanted to display new-name as the program runs, is there a command
> for that?
>

Just insert this outside of the let block (and before the last expression
so the function has a valid return)

(display text) (newline)

You can do fancier things with format:

(format #t "default name: ~a new name: ~a~%" default-name text)

You should see the output in the log.


> Thanks
> Jay
>
> \version "2.18.2"
>
> music =  \relative c' {c2 d e f g a b c c b a g f e d c}
>
>
> newnames =
> #`(("c" . "S")
>("d" . "R")
>("e" . "G")
>("f" . "M")
>("g" . "P")
>("a" . "D")
>("b" . "N")
>)
>
>
>
> #(define (myNoteNames size)
> (lambda (grob)
>(let* (
>   ;; bindings
>   (default-name (ly:grob-property grob 'text))
>   (new-name (assoc-get default-name newnames))
>   (cause (event-cause grob))
>(duration (ly:prob-property cause 'duration))
>(duration-log (ly:duration-log duration))
>(suffix
> (case duration-log
>   ((1) "a") ;; half note
>   (else "")))
>(text (string-append new-name suffix))
>  )
>   ;; body
>

[Change new-name in the following line to text]


>  (ly:grob-set-property! grob 'text (markup #:fontsize size new-
> name))
>  (ly:text-interface::print grob)
>
>  )
>))
>
>
Hope this helps!

David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


compoundMeter - how to get lilypond to recognize the bar line in the middle

2014-09-18 Thread Jay Vara
>I am not top-posting

I am using a compoundMeter - 5/4 + 2/4. I would like to see a bar line 
after 5 quarter notes (and after 7 quarter notes). Plus I would like 
Completion_heads_engraver to recognize the bar line after the 5 quarter 
notes.

I was able to artificially achieve getting the bar lines by adding a 
silent voice with those bar lines.

However I was not able to find anything that would make the fifth note 
g2 in the following example to be automatically replaced by g4~g4 [tied 
quarter notes] as happens for the seventh note where a2 is replaced by 
a4~a4.

Also, in the code below, I tried to prevent the time signature from 
printing - does not seem to work for compoundMeter. Also not sure why I 
got a couple of extra staff lines, plus how it got the 7/4 meter for the 
extra staves.

\version "2.18.2"
fooBar = { s1 s4\bar "!"  s2 \bar "||" }
music =  \relative c' {c4 d e f g2 a b4 c c b a g2 f4 e d c b a g a b}
\score {
  
  <<
   \override Staff.TimeSignature #'stencil = ##f 
   \compoundMeter #'((5 4) (2 4) )
\set Timing.beatStructure = #'(5  2 )
   
\new Voice = "theBarLines" { \fooBar \fooBar \bar "|." }
 
 \new voice \music   
 \shiftDurations #1 #0 {\music}
>>
  }
\layout {
 \context {
   \Voice
   \remove Note_heads_engraver
   \remove Rest_engraver
   \consists Completion_heads_engraver
   \consists Completion_rest_engraver
   
 }
   }





___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-18 Thread Karol Majewski
The point is that LilyPond doesn't recognize medium font-series. When you set 
font-series to bold, everything's fine.


> Does this work?
> 
> \paper {
>   #(define fonts
> (set-global-fonts
> #:sans "Ubuntu"
>   ))
> }
> 
> I don't have 2.19.14 installed but afaik the code for setting the global
> fonts was changed in 2.19.12 to support alternative music fonts.
> 




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-18 Thread TaoCG
Does this work?

\paper {
  #(define fonts
(set-global-fonts
#:sans "Ubuntu"
  ))
}

I don't have 2.19.14 installed but afaik the code for setting the global
fonts was changed in 2.19.12 to support alternative music fonts.



--
View this message in context: 
http://lilypond.1069038.n5.nabble.com/override-font-series-medium-doesn-t-work-anymore-tp166556p166561.html
Sent from the User mailing list archive at Nabble.com.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


woodwind-diagram problem

2014-09-18 Thread takumi ikeda
Hello all,

I got an error message by the following script.

\version "2.18.2"
{
  c'1^\markup {
\override #'(graphical . #f)
{
  \woodwind-diagram #'saxophone #'(
  (lh . (bes))
  (cc . (four))
  (rh . ())
  )
}
  }
}

(Error message)
Preprocessing graphical objects...C:/Program
Files/LilyPond/usr/share/lilypond/current/scm/display-woodwind-diagrams.scm:1773:55:
In procedure ly:assoc-get in expression (assoc-get (quote text?) key):
C:/Program 
Files/LilyPond/usr/share/lilypond/current/scm/display-woodwind-diagrams.scm:1773:55:
Wrong type argument in position 2 (expecting list): #f
Exited with return code 1.

(My environment)
Frescobaldi: 2.0.15
Python: 2.7.1
Qt: 4.7.2
PyQt4: 4.8.4
sip: 4.12.2
Operating System:
Windows-7-6.1.7601-SP1

And it works when \woodwind-diagram #'flute etc.

I'd like to use graphical-text notation like
http://www.stretta-music.com/images/7/4/2/101247-02_zoom.jpg because
graphical diagrams of current version lilypond are so complicated for
scoring.
Or, do you have any idea to place some optional characters around the
fingering chart? Any help would be appreciated.

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic fixing of note between measures

2014-09-18 Thread Jay Vara
David,

That works. Malte also suggested something similar. 

Is there a reason not to use Completion_heads_engraver all the time or 
atleast as a default?

I am also using a compound metre. Hopefully this will work with that.

In one case I have repeating measures of 5/4 + 3/4 + 2/4. I have succeeded 
in getting the bar lines printed after 5th and 8th quarter notes in a 10/4 
time scale by adding a voice with bar lines at those places. May be there 
is a different method of achieving this effect.

Jay
   


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic fixing of note between measures

2014-09-18 Thread Jay Vara
Nice, that works.


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \override #'(font-series . medium) doesn't work anymore?

2014-09-18 Thread Malte Meyn
Probably that’s a bug, yes: It works in 2.19.13 (I don’t have a 2.19.14 
to look at the different output).


Am 18.09.2014 um 19:06 schrieb Karol Majewski:

\override #'(font-series . medium) or \medium

None of them work. Bug?

\version "2.19.14"

\paper {
   #(define fonts
 (make-pango-font-tree "" "Ubuntu" ""
   (/ staff-height pt 20)))
}

\markup { \sans "foo" }
\markup { \sans \bold "foo" }
\markup { \sans \medium "foo" }



-- Karol



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


\override #'(font-series . medium) doesn't work anymore?

2014-09-18 Thread Karol Majewski
\override #'(font-series . medium) or \medium

None of them work. Bug?

\version "2.19.14"

\paper {
  #(define fonts
(make-pango-font-tree "" "Ubuntu" ""
  (/ staff-height pt 20)))
}

\markup { \sans "foo" }
\markup { \sans \bold "foo" }
\markup { \sans \medium "foo" }



-- Karol



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic fixing of note between measures

2014-09-18 Thread David Bellows
The project I'm working on right now also automatically generates music and
I ran into the same problem. Here's what my software automatically
generates now to deal with it:

\score {
  \new PianoStaff <<
\new Staff = "upper" <<
\new Voice = "first" \with {\remove "Note_heads_engraver" \consists
"Completion_heads_engraver" \remove "Rest_engraver" \consists
"Completion_rest_engraver"}
\voice_one  >>
\new Staff = "lower" <<
\new Voice = "second" \with {\remove "Note_heads_engraver" \consists
"Completion_heads_engraver" \remove "Rest_engraver" \consists
"Completion_rest_engraver"}
\voice_five  >>
>>
  \layout{ragged-bottom = ##t ragged-right = ##t }
}

What you're looking for is the stuff starting at "\with {\remove
...\consists "Completion_rest_engraver"}

This is a lifesaver.

On Thu, Sep 18, 2014 at 8:06 AM, Jay Vara  wrote:

> Sometimes a note in my (generated) music falls on the bar lines. Is there
> a way to auto fix it by splitting the note as per the measure and joining
> the two parts with a tie?
>
> In the following, the first line shows that there are five quarter notes
> in the first measure rather than 4.
>
> The second line is how I would like it to be auto-resolved.
>
> \version "2.18.2"
>
> \relative c' {c4 d e f2 g h}
>
> \relative c' {c4 d e f~f g h}
>
>
>
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic fixing of note between measures

2014-09-18 Thread Malte Meyn

I found it in one of my own scores:

  \layout {
\context {
  \Voice
  \remove Note_heads_engraver
  \remove Rest_engraver
  \consists Completion_heads_engraver
  \consists Completion_rest_engraver
}
  }

Am 18.09.2014 um 18:25 schrieb Malte Meyn:

Yes, there is the Completion_heads_engraver. I don’t remember exactly
how to use it, but you’ll find it in the manuals.

Am 18.09.2014 um 17:06 schrieb Jay Vara:

Sometimes a note in my (generated) music falls on the bar lines. Is there
a way to auto fix it by splitting the note as per the measure and joining
the two parts with a tie?

In the following, the first line shows that there are five quarter notes
in the first measure rather than 4.

The second line is how I would like it to be auto-resolved.

\version "2.18.2"

\relative c' {c4 d e f2 g h}

\relative c' {c4 d e f~f g h}




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Automatic fixing of note between measures

2014-09-18 Thread Malte Meyn
Yes, there is the Completion_heads_engraver. I don’t remember exactly 
how to use it, but you’ll find it in the manuals.


Am 18.09.2014 um 17:06 schrieb Jay Vara:

Sometimes a note in my (generated) music falls on the bar lines. Is there
a way to auto fix it by splitting the note as per the measure and joining
the two parts with a tie?

In the following, the first line shows that there are five quarter notes
in the first measure rather than 4.

The second line is how I would like it to be auto-resolved.

\version "2.18.2"

\relative c' {c4 d e f2 g h}

\relative c' {c4 d e f~f g h}




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread Jay Vara
>I am not top-posting

David,

You are way too good!

Is this the way I enter it? For some reason, does not seem to be working 
- it seems to be ignoring the suffix.

If I wanted to display new-name as the program runs, is there a command 
for that?

Thanks
Jay

\version "2.18.2"

music =  \relative c' {c2 d e f g a b c c b a g f e d c}
  
  
newnames =
#`(("c" . "S")
   ("d" . "R")
   ("e" . "G")
   ("f" . "M")
   ("g" . "P")
   ("a" . "D")
   ("b" . "N")
   )
  


#(define (myNoteNames size)
(lambda (grob)
   (let* (
  ;; bindings
  (default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name newnames))
  (cause (event-cause grob))
   (duration (ly:prob-property cause 'duration))
   (duration-log (ly:duration-log duration))
   (suffix
(case duration-log
  ((1) "a") ;; half note
  (else "")))
   (text (string-append new-name suffix))
 )  
  ;; body
 (ly:grob-set-property! grob 'text (markup #:fontsize size new-
name))
 (ly:text-interface::print grob)
 
 )
   ))

\new Staff {
  <<
 \new Voice {
   \music 
 \shiftDurations #1 #0 {\music } 
 \shiftDurations #2 #0 {\music \music }
 }
\context NoteNames {
  
  \override NoteName.stencil = #(myNoteNames 0)
\music 

   \override NoteName.stencil = #(myNoteNames -1)
\shiftDurations #1 #0 {\music } 

\override NoteName.stencil = #(myNoteNames -2)
\shiftDurations #2 #0 {\music \music }

}
  >>
}



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Automatic fixing of note between measures

2014-09-18 Thread Jay Vara
Sometimes a note in my (generated) music falls on the bar lines. Is there 
a way to auto fix it by splitting the note as per the measure and joining 
the two parts with a tie?

In the following, the first line shows that there are five quarter notes 
in the first measure rather than 4.

The second line is how I would like it to be auto-resolved.

\version "2.18.2"

\relative c' {c4 d e f2 g h}

\relative c' {c4 d e f~f g h}




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread Jay Vara
David:

Friscobaldi says:

Starting lilypond-windows.exe 2.18.2 [Alam-Ata.ly]...
Processing `c:/users/arjuna/appdata/local/temp/frescobaldi-
pvt8zv/tmptpz4so/Alam-Ata.ly'
Parsing...
Interpreting music...[8][16][24][32][40][48][56][64]
Preprocessing graphical objects...
Interpreting music...
warning: cannot find or create `NoteNames' called `'
MIDI output to `Alam-Ata.mid'...
Interpreting music...
Preprocessing graphical objects...
Calculating line breaks... 
Drawing systems... 
Finding the ideal number of pages...
Fitting music on 2 or 3 pages...
Drawing systems...
Layout output to `Alam-Ata.ps'...
Converting to `./Alam-Ata.pdf'...
Success: compilation successfully completed
Completed successfully in 3.0".

I am not able to figure out which line the warning above is coming from. 
Are the numbers in square brackets the line numbers? 


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
Hi Jay,

On Thu, Sep 18, 2014 at 9:54 AM, Jay Vara  wrote:


>
> On the other hand, what would be nice is if the NoteName could be changed
> based on duration. In particular, if the note is a half note, I would like
> to add a character (say a "-" or a "a") to the note name. This could be
> more involved probably.
>
>
That would actually be simple:

#(define ((myNoteNames size) grob)
   (let* (
   ;; bindings
   (default-name (ly:grob-property grob 'text))
   (new-name (assoc-get default-name newnames))
   (cause (event-cause grob))
   (duration (ly:prob-property cause 'duration))
   (duration-log (ly:duration-log duration))
   (suffix
(case duration-log
  ((1) "a") ;; half note
  (else "")))
   (text (string-append new-name suffix))
   )
 ;; body
 (ly:grob-set-property! grob 'text
   (markup #:fontsize size text))
 (ly:text-interface::print grob)
 )
   )


\new Staff {
  <<
\new Voice {
  \music
  \shiftDurations #1 #0 {\music }
  \shiftDurations #2 #0 {\music \music }
}
\context NoteNames {

  \override NoteName.stencil = #(myNoteNames 1)
  \music

  \override NoteName.stencil = #(myNoteNames -2)
  \shiftDurations #1 #0 {\music }

  \override NoteName.stencil = #(myNoteNames -4)
  \shiftDurations #2 #0 {\music \music }

}
  >>
}



--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread Jay Vara
David,

Wow! The power of programming knowledge! Yeah, size can be set based on 
duration. In my particular case, this is giving some unwanted effects 
since the duration of all my notes are not the same (unlike in the small 
example I made up for this post). So I will be using your earlier 
suggestion.

On the other hand, what would be nice is if the NoteName could be changed 
based on duration. In particular, if the note is a half note, I would like 
to add a character (say a "-" or a "a") to the note name. This could be 
more involved probably.

Jay


___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Odd layout choices

2014-09-18 Thread Guy Stalnaker

Simon,

Thanks, again. It does help :-)

On 09/18/2014 07:34 AM, Simon Albrecht wrote:

(continuing the thread on ly-user)

Hello Guy,

no, there isn't, because it tends to contradict the logic: they won't
appear to be simultaneous, if they are placed one after another.
You might try the methods described in

.
For the dynamics, this can be complicated, but try:
\override DynamicText.X-offset or
\override DynamicLineSpanner.outside-staff-priority = ##f (to be placed
in \layout) and
\override DynamicText.Y-offset and similar.

HTH, Simon


Am 16-Sep-2014 06:31:50 +0200 schrieb jimmyg...@gmail.com:

No longer baffling :-) Using the min-systems-per-page option forced
LP to put the systems on the same page and it is clear, when it does
so, why its default fitting algorithm does not! It appears to be the
non-musical elements that are interfering with things. I still had
to play with margins, etc. to get it to look "right." Thanks for
your help. Is there an easy way to tell Lilypond not to stack
vertically simultaneous directives like "a tempo" and dynamics, but
to render them horizontally?



--

"There is only love, and then oblivion. Love is all we have
to set against hatred." (paraphrased) Ian McEwan

Guy Stalnaker
jimmyg...@gmail.com

___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
On Thu, Sep 18, 2014 at 7:42 AM, Jay Vara  wrote:

> Yay! I tried the "cryptic" version you suggested, and it works nicely. The
> syntax does take some time to get used to.
>
> When lilypond displays an error, is it possible to know which line of code
> the error is in? I am using Friscobaldi.
>

You should be getting a line number for errors in Frescobaldi's "LilyPond
Log" window,

--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
 Hi Jay,

On Thu, Sep 18, 2014 at 7:28 AM, David Nalesnik 
wrote:

>
>
> On Thu, Sep 18, 2014 at 7:01 AM, David Nalesnik 
> wrote:
>
>
>>
>>
>
>>
>> Now, if you want to have LilyPond detect the note durations and make the
>> fontsize decisions for you, I don't believe you'll be able to use the
>> NoteNames grob as it stands.
>>
>
> I mean NoteName grob, of course.
>
>

Now that's not true, it turns out...
\version "2.18.2"

music =  \relative c' {c2 d e f g a b c c b a g f e d c}


newnames =
#`(("c" . "S")
   ("d" . "R")
   ("e" . "G")
   ("f" . "M")
   ("g" . "P")
   ("a" . "D")
   ("b" . "N")
   )



myNoteNames =
#(lambda (grob)
   (let* (
   ;; bindings
   (default-name (ly:grob-property grob 'text))
   (new-name (assoc-get default-name newnames))
   (cause (event-cause grob))
   (duration (ly:prob-property cause 'duration))
   (duration-log (ly:duration-log duration))
   (size
(case duration-log
  ((2) -2)
  ((3) -4)
  (else 1)))
   )
 ;; body
 (ly:grob-set-property! grob 'text
   (markup #:fontsize size new-name))
 (ly:text-interface::print grob)
 )
   )


\new Staff {
  <<
\new Voice {
  \music
  \shiftDurations #1 #0 {\music }
  \shiftDurations #2 #0 {\music \music }
}
\context NoteNames {

  \override NoteName.stencil = #myNoteNames
  \music

  \shiftDurations #1 #0 {\music }

  \shiftDurations #2 #0 {\music \music }

}
  >>
}
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread Jay Vara
Yay! I tried the "cryptic" version you suggested, and it works nicely. The 
syntax does take some time to get used to.

When lilypond displays an error, is it possible to know which line of code 
the error is in? I am using Friscobaldi.




___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Odd layout choices

2014-09-18 Thread Simon Albrecht
(continuing the thread on ly-user)

Hello Guy,

 no, there isn't, because it tends to contradict the logic: they won't appear 
to be simultaneous, if they are placed one after another.
You might try the methods described in . For the dynamics, this can be 
complicated, but try:
\override DynamicText.X-offset or
\override DynamicLineSpanner.outside-staff-priority = ##f (to be placed in 
\layout) and
\override DynamicText.Y-offset and similar.

HTH, Simon 

 Am 16-Sep-2014 06:31:50 +0200 schrieb jimmyg...@gmail.com: 
  No longer baffling :-) Using the min-systems-per-page option forced LP to put 
the systems on the same page and it is clear, when it does so, why its default 
fitting algorithm does not! It appears to be the non-musical elements that are 
interfering with things. I still had to play with margins, etc. to get it to 
look "right." Thanks for your help. Is there an easy way to tell Lilypond not 
to stack vertically simultaneous directives like "a tempo" and dynamics, but to 
render them horizontally?
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
On Thu, Sep 18, 2014 at 7:01 AM, David Nalesnik 
wrote:


> myNoteNames =
> #(lambda (size)
>(lambda (grob)
>
>


>
> #(define (myNoteNames size)
>(lambda (grob)
>
>

Or even the cryptic
#(define ((myNoteNames size) grob)



>
> Now, if you want to have LilyPond detect the note durations and make the
> fontsize decisions for you, I don't believe you'll be able to use the
> NoteNames grob as it stands.
>

I mean NoteName grob, of course.

--David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Programming Question

2014-09-18 Thread David Nalesnik
Hi Jay,

On Thu, Sep 18, 2014 at 4:43 AM, Jay Vara  wrote:

> > I'm not top posting.
>
> I am using NoteNames context to print the note names automatically for
> scales of half notes, quarter notes and eighth notes. I have redefined
> the NoteNames using override NoteName.Stencil.
>
> I need different font sizes for the note names of half, quarter and
> eighth notes. Currently I have got this working by using three different
> versions of the myNoteNames function. The only change between them is
> the fontsize of text. Is there a way to combine the three functions -
> perhaps have two arguments. I tried this and since the syntax of
> defining the function and of using it were not clear, I was not able to
> get it to work.
>
>
Here's how you could add an argument for 'font-size to your function:

 \version "2.18.2"

music =  \relative c' {c2 d e f g a b c c b a g f e d c}


newnames =
#`(("c" . "S")
   ("d" . "R")
   ("e" . "G")
   ("f" . "M")
   ("g" . "P")
   ("a" . "D")
   ("b" . "N")
   )

myNoteNames =
#(lambda (size)
   (lambda (grob)

 (let* (
 ;; bindings
 (default-name (ly:grob-property grob 'text))
 (new-name (assoc-get default-name newnames))
 )
   ;; body
   (ly:grob-set-property! grob 'text new-name)
   (ly:grob-set-property! grob 'font-size size)
   (ly:text-interface::print grob)
   )
 ))

#(define (myNoteNames size)
   (lambda (grob)

 (let* (
 ;; bindings
 (default-name (ly:grob-property grob 'text))
 (new-name (assoc-get default-name newnames))
 )
   ;; body
   (ly:grob-set-property! grob 'text new-name)
   (ly:grob-set-property! grob 'font-size size)
   (ly:text-interface::print grob)
   )
 ))


\new Staff {
  <<
\new Voice {
  \music
  \shiftDurations #1 #0 {\music }
  \shiftDurations #2 #0 {\music \music }
}
\context NoteNames {

  \override NoteName.stencil = #(myNoteNames 1)
  \music

  \override NoteName.stencil = #(myNoteNames -2)
  \shiftDurations #1 #0 {\music }

  \override NoteName.stencil = #(myNoteNames -4)
  \shiftDurations #2 #0 {\music \music }

}
  >>
}

%%
Notice that I've given two versions of myNoteNames.  They are equivalent.
 (I find the second easier to use, but maybe that's just me.)

Now, if you want to have LilyPond detect the note durations and make the
fontsize decisions for you, I don't believe you'll be able to use the
NoteNames grob as it stands.  It would be nice if a NoteNames object had a
pointer to a NoteHead, from which information like duration could be
gleaned, but it doesn't.

Hope this helps.
David
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: a column of text to the right of the score

2014-09-18 Thread Pierre Perol-Schneider
How about this alternative ?
(just a quick thought, could have some mistakes).
Cheers
Pierre
\version "2.18.2"

#(set-default-paper-size "letter" 'landscape)

#(define (general-column align-dir baseline mols)
  (let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))

#(define-markup-command (textLeft layout props args)(markup-list?)
  #:properties ((baseline-skip))
  (general-column LEFT baseline-skip (wordwrap-internal-markup-list layout props #f args)))

myMusic = {
  \repeat unfold 4 
  \relative c' { c d e f g a b c }
  \tweak break-visibility #begin-of-line-invisible
  \tweak self-alignment-X #LEFT
  \tweak extra-offset #'(2 . -5)
  \mark\markup\italic {
\override #'(baseline-skip . 3)
\override #'(line-width . 20)
\textLeft {
  Here's a first annotation.
}
  }
  \repeat unfold 4
  \relative c' { c d e f g a b c }
  \relative c' { 
c d e f 
\tweak break-visibility #begin-of-line-invisible
\tweak self-alignment-X #LEFT
\tweak extra-offset #'(2 . -5)
\mark\markup\italic {
  \override #'(baseline-skip . 3)
  \override #'(line-width . 20)
  \textLeft {
Here's a second annotation.
  }
}
g a b c 
  } 
  \repeat unfold 31 
  \relative c' { c d e f g a b c }
  \tweak break-visibility #begin-of-line-invisible
  \tweak self-alignment-X #LEFT
  \tweak extra-offset #'(2 . -7)
  \mark\markup\italic {
\override #'(baseline-skip . 3)
\override #'(line-width . 20)
\textLeft {
  Here's another one, maybe a little longer.
}
  }
  \repeat unfold 26 
  \relative c' { c d e f g a b c }
  \relative c' { 
<< 
  { 
c d e f 
\bar "||"
\tweak break-visibility #begin-of-line-invisible
\mark\markup\musicglyph #"scripts.segno"
\break
g a b c 
  } 
  \\ 
  \new Voice \with { \consists "Mark_engraver" } 
  { 
s1 
\tweak break-visibility #begin-of-line-invisible
\tweak self-alignment-X #LEFT
\tweak extra-offset #'(2 . -10)
\tweak color #red
\mark\markup\bold\italic {
  \override #'(baseline-skip . 3)
  \override #'(line-width . 20)
  \textLeft {
Tricky (see warnings)!
  }
}
s
  } 
>>
  }
  \repeat unfold 13 
  \relative c' { c4 d e f g a b c }
  \bar "|."
}


\score {
\myMusic  
\layout { 
  line-width = 9\in
}
  }

bricAlternative.pdf
Description: Adobe PDF document
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: a column of text to the right of the score

2014-09-18 Thread Pierre Perol-Schneider
Wrong file name, sorry folks and thanks again Villum.
So here you go
Cheers,
Pierre

2014-09-17 11:38 GMT+02:00 Pierre Perol-Schneider <
pierre.schneider.pa...@gmail.com>:

> Oups, 'forgot the bar numbering on page 2.
> See enclosed corrected files.
> Pierre
>
>
>
\version "2.18.2"

#(set-default-paper-size "letter" 'landscape)

#(define (general-column align-dir baseline mols)
  (let* ((aligned-mols (map (lambda (x) (ly:stencil-aligned-to x X align-dir)) mols)))
(stack-lines -1 0.0 baseline aligned-mols)))

#(define-markup-command (textLeft layout props args)(markup-list?)
  #:properties ((baseline-skip))
  (general-column LEFT baseline-skip (wordwrap-internal-markup-list layout props #f args)))

#(define-markup-command (textCenter layout props args)(markup-list?)
  #:properties ((baseline-skip))
  (general-column CENTER baseline-skip (wordwrap-internal-markup-list layout props #f args)))

#(define-markup-command (textRight layout props args)(markup-list?)
  #:properties ((baseline-skip))
  (general-column RIGHT baseline-skip (wordwrap-internal-markup-list layout props #f args)))

% Page One :
myMusicPageOne = \markuplist \column-lines {
  \score {
\repeat unfold 40 \relative c' { c d e f g a b c }
\layout { line-width = 8\in }
  }
}

\markuplist {
  \fill-line {
\myMusicPageOne
\column {  
  \fill-line {
\null
\override #'(baseline-skip . 2)
\override #'(line-width . 30)
\textLeft {
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
}
  }
  % put some space here :
  \vspace #2
  \fill-line {
\null
\override #'(baseline-skip . 4)
\override #'(line-width . 30)
\textCenter {
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
}
  }
  % put some space here :
  \vspace #2
  \fill-line {
\null
\override #'(baseline-skip . 5)
\override #'(line-width . 30)
\textRight {
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
}
  }
}
  }
}

% Page Two :
myMusicPageOne = \markuplist \column-lines {
  \score {
{
  \set Score.currentBarNumber = #81
  \bar ""
  \repeat unfold 30 
  \relative c' { c d e f g a b c }
  \bar "|."
}
\layout { 
  indent = 0
  line-width = 7\in
  \context {
\Score
barNumberVisibility = #(lambda (n x) (= (modulo n 1) 0)) 
\omit TimeSignature
  }
}
  }
}

\markuplist {
  \fill-line {
\myMusicPageOne
\column {  
  \fill-line {
\null
\override #'(baseline-skip . 2)
\override #'(line-width . 40)
\textLeft {
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
}
  }
  % put some space here :
  \vspace #2
  \fill-line {
\null
\override #'(baseline-skip . 4)
\override #'(line-width . 35)
\textCenter {
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
}
  }
  % put some space here :
  \vspace #2
  \fill-line {
\null
\override #'(baseline-skip . 5)
\override #'(line-width . 30)
\textRight {
  Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed
  do eiusmod tempor incididunt ut labore et dolore magna aliqua.
  Ut enim ad minim veniam, quis nostrud exercitation ullamco
  laboris nisi ut aliquip ex ea commodo consequat.
}
  }
}
  }
}___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Programming Question

2014-09-18 Thread Jay Vara
> I'm not top posting.

I am using NoteNames context to print the note names automatically for 
scales of half notes, quarter notes and eighth notes. I have redefined 
the NoteNames using override NoteName.Stencil.

I need different font sizes for the note names of half, quarter and 
eighth notes. Currently I have got this working by using three different 
versions of the myNoteNames function. The only change between them is 
the fontsize of text. Is there a way to combine the three functions - 
perhaps have two arguments. I tried this and since the syntax of 
defining the function and of using it were not clear, I was not able to 
get it to work.

Here is the code:

\version "2.18.2"

music =  \relative c' {c2 d e f g a b c c b a g f e d c}
  
  
newnames =
#`(("c" . "S")
   ("d" . "R")
   ("e" . "G")
   ("f" . "M")
   ("g" . "P")
   ("a" . "D")
   ("b" . "N")
   )
   
  
myNoteNames =
#(lambda (grob)
   (let* (
  ;; bindings
  (default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name newnames))
 )  
  ;; body
 (ly:grob-set-property! grob 'text new-name)
 (ly:text-interface::print grob)
 )
   )
myNoteNamesS =
#(lambda (grob)
   (let* (
  ;; bindings
  (default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name newnames))
 )  
  ;; body
 (ly:grob-set-property! grob 'text (markup #:fontsize -2 new-
name))
 (ly:text-interface::print grob)
 )
   )

myNoteNamesT =
#(lambda (grob)
   (let* (
  ;; bindings
  (default-name (ly:grob-property grob 'text))
  (new-name (assoc-get default-name newnames))
 )  
  ;; body
 (ly:grob-set-property! grob 'text (markup #:fontsize -4 new-
name))
 (ly:text-interface::print grob)
 )
   )

\new Staff {
  <<
 \new Voice {
   \music 
 \shiftDurations #1 #0 {\music } 
 \shiftDurations #2 #0 {\music \music }
 }
\context NoteNames {
  
  \override NoteName.stencil = #myNoteNames
\music 

   \override NoteName.stencil = #myNoteNamesS
\shiftDurations #1 #0 {\music } 

\override NoteName.stencil = #myNoteNamesT
\shiftDurations #2 #0 {\music \music }

}
  >>
}



___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user