Re: How to control the placement of symbols (in \mark \markup)?

2016-07-14 Thread Simon Albrecht

Hello Mojca,

first let me give credit to David Kastrup, from whom I got the initial 
idea of this code, and some of the interesting methods you address below.


On 14.07.2016 11:08, Mojca Miklavec wrote:

I would only like to ask for a bit of explanation of the code to get a
better understanding (being new to the lilypond world).

1.) I understand "\skip $t": make an invisible skip for this duration.
But what is "<> -" following that? An empty chord? What about the
dash?


Yes, it’s an empty chord – a trick useful in some circumstances. The 
dash is just there to append a post event to the chord, as with anything 
like c-^ .



2.) How exactly does "\context Bottom" work? The best hit I could find was
 http://lilypond.org/doc/v2.19/Documentation/notation/contexts-explained
but that's not exactly it.


IIUC \context Bottom references the lowest context in hierarchy which 
you are currently in. In this case it’s there to prevent the <<>> from 
creating an extra voice by placing it inside the current voice, if you 
get what I mean.



3.) How much "music" does the "m" variable from the \after function
"digest"? Just a single pitch?


As much as you like, though if it’s more than one note, you need to wrap 
it in {} or <<>>.


Best, Simon

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


Re: How to control the placement of symbols (in \mark \markup)?

2016-07-14 Thread Mojca Miklavec
Dear Simon,

On 13 July 2016 at 21:48, Simon Albrecht wrote:
> On 13.07.2016 08:31, Mojca Miklavec wrote:
>>
>> I want to put this sign as the first thing after the bar
>> (or potentially anywhere later between the pitches).
>
> Perhaps you’ll like this function, which I find very convenient:
>
> 
> \version "2.19.45"
>
> after =
> #(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
>#{
>  \context Bottom <<
>#m
>{ \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
>  >>
>#})
>
> { \after 2 \upbow c'1\downbow }
> %

Thank you very much for teaching me a neat trick. I would actually use it as

\relative c'' {
\after 64 \upbow a4 a a a
\after 64 \downbow a a a a
}

With 64 meaning: put as much to the left as possible.

See also
https://lists.gnu.org/archive/html/lilypond-user/2009-10/msg00257.html

This approach is better than
\mark \markup{ \musicglyph #"scripts.upbow" }
in the sense that it puts the glyph to the proper vertical location,
but I would prefer if the symbol was a tiny bit more to the left (to
the left of the pitch).

(Is there a way to put \upbow/\downbow on top of the bar? If not,
"\after 64 \upbow" can do the trick for now.)

I would only like to ask for a bit of explanation of the code to get a
better understanding (being new to the lilypond world).

1.) I understand "\skip $t": make an invisible skip for this duration.
But what is "<> -" following that? An empty chord? What about the
dash?

2.) How exactly does "\context Bottom" work? The best hit I could find was
http://lilypond.org/doc/v2.19/Documentation/notation/contexts-explained
but that's not exactly it.

3.) How much "music" does the "m" variable from the \after function
"digest"? Just a single pitch?

Thank you,
Mojca

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


Re: How to control the placement of symbols (in \mark \markup)?

2016-07-13 Thread Simon Albrecht

On 13.07.2016 08:31, Mojca Miklavec wrote:

I want to put this sign as the first thing after the bar
(or potentially anywhere later between the pitches).


Perhaps you’ll like this function, which I find very convenient:


\version "2.19.45"

after =
#(define-music-function (t e m) (ly:duration? ly:music? ly:music?)
   #{
 \context Bottom <<
   #m
   { \skip $t <> -\tweak extra-spacing-width #empty-interval $e }
 >>
   #})

{ \after 2 \upbow c'1\downbow }
%

Best, Simon

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


How to control the placement of symbols (in \mark \markup)?

2016-07-13 Thread Mojca Miklavec
I'm "misusing" scripts.upbow and scripts.downbow to mark the change of
playing direction (for accordion).

In contrast to the "intended use" where it is used for marking a
single pitch, I want to put this sign as the first thing after the bar
(or potentially anywhere later between the pitches).

I found the syntax in an old post on this mailing list.

But here's an example that demonstrates the problem:

%%%
\version "2.19.44"

<<
  \new Lyrics = "topLyricsII" \with {
\override VerticalAxisGroup.staff-affinity = #DOWN
  }
  \new Lyrics = "topLyricsI" \with {
\override VerticalAxisGroup.staff-affinity = #DOWN
  }
  \new Voice = "melody" \fixed c'
  {
\mark \markup{ \musicglyph #"scripts.upbow" }
a a a a
% How to put this markup lower?
\mark \markup{ \musicglyph #"scripts.downbow" }
a a
\mark \markup{ \musicglyph #"scripts.upbow" }
a a
  }
  \context Lyrics = "topLyricsI" {
\lyricsto "melody" {
  A A A A A A A A
}
  }
  \context Lyrics = "topLyricsII" {
\lyricsto "melody" {
  tra -- la -- la -- la tra -- la -- la -- la
}
  }
>>
%%%

1. The first "upbow" is too far to the left. I want it after "C".

2. The second and third are too far on top. I would want then at the
same height as the first one. I wouldn't mind if the scores would get
wider to get enough space to place that markup between the lyrics
(ideal) or if the melody would be placed higher (less than ideal), but
it's not acceptable to have it so far on top where it's impossible to
see basically "invisible". I also want to have it printed below the
horizontal line for
\repeat volta 2 {} \alternative {{} {}}

(I'm currently misusing lyrics to place button names on top of scores.
I still believe that there should be a better mechanism to do that,
but at the moment I have to live with what I have.)

Thank you,
Mojca


bow-notation.ly
Description: Binary data
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user