Re: make text span a specified musical interval?

2019-11-25 Thread Wols Lists
On 25/11/19 03:00, Jace Toronto wrote:
>> Is this what you would like the output to look like or am I misunderstanding?
> 
> Hi Ben,
> 
> Yes, thank you, that is exactly the right look for this particular example.  
> Is there a way to tell the end of the text to align with the barline (or 
> repeat sign in this case), so that different layouts can be accommodated 
> without a hard-coded spacer?
> 
Off the top of my head, would it be possible to create a new voice just
for this, and attach the text to a crotchet spacer-note s4? That's what
I'd try ...

Cheers,
Wol



Re: drawing a range reguardless of transposition

2019-11-25 Thread Aaron Hill

On 2019-11-25 2:26 am, Sandro Santilli wrote:

I'm trying, for backward compatibility, to keep that
highlightOutOfRange function, is that possible ?


What compatibility are you needing?

I intended \highlightPitches to be a significant upgrade to my earlier 
\highlightOutOfRange, which I would no longer recommend using.


Of course, it is not a drop-in replacement, as there were several 
significant changes in its interface and usage:



% original %
\override NoteHead.color = \highlightOutOfRange c' c''

% new %
\highlightPitches outside { c' c'' }


Of note, the \override is now encapsulated within the new music 
function; and when specifying multiple pitches, they must be enclosed in 
curly braces.


Yet it is that second change in interface that ultimately permits what 
you had requested:



% requested (though invalid) syntax %
instrumentRange = c' c''
\override NoteHead.color = \highlightOutOfRange \instrumentRange

% realized syntax %
instrumentRange = { c' c'' }
\highlightPitches outside \instrumentRange


Please let me know if I am overlooking a critical detail in your use 
case where my newer function would not be fit for purpose.



-- Aaron Hill



Re: make text span a specified musical interval?

2019-11-25 Thread Aaron Hill

Would something like this work?


\version "2.18.2"

\relative c' {
  \repeat volta 2 {
c4^"vamp" r2
d8-\tweak extra-spacing-width #'(0 . 0)
  ^"(Last time only)"
\tweak extra-spacing-width #'(0 . 8) e |
  }
  f g a4 r2 |
}



-- Aaron Hill



Re: tie & tag

2019-11-25 Thread Gianmaria Lari
Dear Aaron...


> A \tag is not a location per se, but rather it marks the following bit
> of music with some identifier.

[.]

Thanks a lot for  your examples, now it's perfectly clear!

I post here some other examples inspired by your code. I did my best to
write the easiest as possible examples. I hope they will be useful to
others. The best would be to see them beside a screenshot of score
generated (I don't put the screenshot here because of the mailing list
policy).

% appendTag {} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first {} c'}
{\someMusic}
{\appendToTag #'first e'4 \appendToTag #'first f' \appendToTag #'first g'
\appendToTag #'first a' \someMusic}
{\appendToTag #'first {e' f' g' a'} \someMusic}

% pushTag {} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first {} c'}
{\someMusic}
{\pushToTag #'first e'4 \pushToTag #'first f' \pushToTag #'first g'
\pushToTag #'first a' \someMusic}
{\pushToTag #'first {e'4 f' g' a'} \someMusic}

% appendTag & pushTag {d2 e} examples
\version "2.19.83"
someMusic = \fixed c' {c1 \tag #'first { d2 e} c'1}
{\someMusic}
{\appendToTag #'first f'4 \appendToTag #'first g' \appendToTag #'first a'
\appendToTag #'first b' \someMusic}
{\appendToTag #'first {f' g' a' b'} \someMusic}
{\pushToTag #'first f' \pushToTag #'first g' \pushToTag #'first a'
\pushToTag #'first b' \someMusic}
{\pushToTag #'first {f' g' a' b'} \someMusic}

% appendTag & pushTag <>
\version "2.19.83"
someMusic = \fixed c' {r4 \tag #'first <> r4}
{\someMusic}
{\appendToTag #'first e'2 \appendToTag #'first g' \appendToTag #'first b'
\someMusic}
% {\appendToTag #'first  \someMusic}  % wrong, doesn't compile
% {\appendToTag #'first {e'2 g' b'} \someMusic}  % wrong, doesn't compile
{\pushToTag #'first e'2 \pushToTag #'first g' \pushToTag #'first
b'\someMusic}
% {\pushToTag #'first  \someMusic} % wrong, doesn't compile
% {\pushToTag #'first {e'2 g' b'} \someMusic} % wrong, doesn't compile
{\appendToTag #'first e'2 \appendToTag #'first g'4 \appendToTag #'first b'4
\someMusic}
{\pushToTag   #'first e'2 \pushToTag #'first   g'4  \pushToTag #'first b'4
\someMusic}

% appendTag & pushTag 
\version "2.19.83"
someMusic = \fixed c' {r4 \tag #'first 2 r4}
{\someMusic}
{\appendToTag #'first g' \appendToTag #'first b' \someMusic}
{\pushToTag #'first g' \pushToTag #'first b' \someMusic}

% appendTag & pushTag  others examples
\version "2.19.83"
someMusic = \fixed c' {\tag #'first  \tag #'first  \tag #'first
 \tag #'first <>}
{\someMusic}
{\appendToTag #'first b' \appendToTag #'first d'' \someMusic}
{\pushToTag   #'first b' \pushToTag   #'first d'' \someMusic}

% appendTag & pushTag <<>>
\version "2.19.83"
someMusic = \tag #'here <<>>
{\someMusic} %this doesn't generate any score
\pushToTag #'here {c'2 d'} \pushToTag #'here {e'2 f'} \someMusic
\appendToTag #'here {c'2 d'} \appendToTag #'here {e'2 f'} \someMusic

% appendTag & pushTag <>
\version "2.19.83"
someMusic = \tag #'here <>
{\someMusic}
\pushToTag #'here {c'2 d'} \pushToTag #'here {e'2 f'} \someMusic
\appendToTag #'here {c'2 d'} \appendToTag #'here {e'2 f'} \someMusic


Re: horizontal position of rehearsal marks at start of system

2019-11-25 Thread Werner LEMBERG

> how can I control the default horizontal position of rehearsal marks
> at the beginning of a line?  As can be seen in the attached image,
> the rehearsal mark gets shifted up because it would otherwise
> collide with the bar number.  Consequently, I would like to have the
> default position shifted to the right to avoid that.

Found it: The line

  \override Clef.break-align-anchor-alignment = #3

applied to *all* staves did the trick; see attached images.


Werner


Re: horizontal position of rehearsal marks at start of system

2019-11-25 Thread Lukas-Fabian Moser




how can I control the default horizontal position of rehearsal marks
at the beginning of a line?  As can be seen in the attached image,
the rehearsal mark gets shifted up because it would otherwise
collide with the bar number.  Consequently, I would like to have the
default position shifted to the right to avoid that.

Found it: The line

   \override Clef.break-align-anchor-alignment = #3

applied to *all* staves did the trick; see attached images.


Thanks much!! That one bugged me for ages ...

Lukas




Re: tie & tag

2019-11-25 Thread Gianmaria Lari
Dear Aaron, you wrote:

 []

> \pushToTag and \appendToTag only work on things that have an elements
> property.  So that means this expression is valid but useless:
>
>  \pushToTag #'here c' \tag #'here g'


I tried to search "Element property" and I found this:

http://lilypond.org/doc/v2.18/Documentation/extending/internal-music-representation


[...]
A compound music expression is a music object that contains other music
objects in its properties. A list of objects can be stored in the elements
property of a music object, or a single ‘child’ music object in the element
property. For example, SequentialMusic has its children in elements, and
GraceMusic has its single argument in element. The body of a repeat is
stored in the element property of RepeatedMusic, and the alternatives in
elements.


So if I understand correctly, the code:

  \pushToTag #'here c' \tag #'here g'


doesn't work because g', that is a single note and not a compound music
expression does not have an element property. That's the reason why this
instead works:

\pushToTag #'here c' \tag #'here {g'}


Because {g'} is a compound music expression and it has an element property.
Could you please confirm?

Thank you, g.


Re: make text span a specified musical interval?

2019-11-25 Thread Kieren MacMillan
Hi all,

> On Nov 25, 2019, at 8:14 AM, Aaron Hill  wrote:
> Would something like this work?

While slightly more verbose, perhaps it’s more semantically correct to do 
something like this?


\version "2.18.2"

\layout {
  \context {
\Score
\override RehearsalMark.font-size = #-0.5
  }
}

\relative c' {
 \repeat volta 2 {
   c4-\tweak extra-spacing-width #'(1 . 0.5) ^"vamp" r2
   d8 e \tweak extra-spacing-width #'(-0.5 . 1) \tweak self-alignment-X #RIGHT 
\mark \markup "(Last time only)" |
 }
 f g a4 r2 |
}


Just a thought.
Kieren.