Re: markup above chordnames

2018-07-29 Thread David Kastrup
Mogens Lemvig Hansen  writes:

> Hi,
>
> In the example below, how do I move the “text” above the chords?  I have 
> tried playing with outside-staff-priority but haven’t found the right 
> incantation.
>
> Regards,
> Mogens
>
> \version "2.18.2"
>
>
> \score {
>   <<
> \new ChordNames { c1 g }
> \new Staff { 
>   \tempo 4=100
>   \override Staff.TextScript.outside-staff-priority = #2000
>   g'4 g' d' g' 
>   c''^\markup "text"  b' g' g' 
> }
>   >>
> }

It's a bit more complex than that.  For outside-staff-priority to make
any difference, you need to be in the same Staff (or rather vertical
axis group).

\version "2.18.2"

\score {
  \new Staff \with { \accepts "ChordNames" }
  <<
\new ChordNames \with { \remove "Axis_group_engraver"
			  } { c1 g }
{
  \tempo 4=100
  \override Staff.ChordName.outside-staff-priority = #20
  \override Staff.ChordName.direction = #UP
  g'4 g' d' g' 
  c''^\markup "text"  b' g' g' 
}
  >>
}


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


Re: markup above chordnames

2018-07-29 Thread David Kastrup
David Kastrup  writes:

> It's a bit more complex than that.  For outside-staff-priority to make
> any difference, you need to be in the same Staff (or rather vertical
> axis group).
>
> \version "2.18.2"
>
> \score {
>   \new Staff \with { \accepts "ChordNames" }
>   <<
> \new ChordNames \with { \remove "Axis_group_engraver"
> } { c1 g }
> {
>   \tempo 4=100
>   \override Staff.ChordName.outside-staff-priority = #20
>   \override Staff.ChordName.direction = #UP
>   g'4 g' d' g' 
>   c''^\markup "text"  b' g' g' 
> }
>   >>
> }

Probably cleaner as
\version "2.18.2"

\score {
  \new Staff \with { \accepts "ChordNames"
		 \override ChordName.outside-staff-priority = #20
		 \override ChordName.direction = #UP
		   }
  <<
\new ChordNames \with { \remove "Axis_group_engraver"
			  } { c1 g }
{
  \tempo 4=100
  g'4 g' d' g' 
  c''^\markup "text"  b' g' g' 
}
  >>
}

Also note that you likely would need to play around with padding values
and stuff to make for a good impression since the ChordNames context
cannot be expected to provide the best values for outer-staff material
integration.

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


Re: layout of markup text

2018-07-29 Thread Trevor Bača
Hi David,

On Mon, Jul 23, 2018 at 6:49 AM, David Nalesnik 
wrote:

> Hi Peter,
>
> You might find this helpful:
> https://github.com/davidnalesnik/lilypond-text-spanner-inner-texts


Another great addition you've added to my LilyPond library.

Did you know that GitHub's Markdown allows images? Even in the (very
user-visible) README.md landing page for a repository? Your repo made me do
a bit of Googling this morning, and I applied the results to one of my own
score repositories; it works great:

https://github.com/trevorbaca/akasha

The relevant bit of Markdown is just ...

   ![Alt text](url)

... which can be as simple as ...

   ![Float text](my-image.png)

... when using a local resource (my-image.png) housed in the same directory
as the README.md file.

(There's a surprisingly readable 3-minute guide on GitHub's Markdown
authored by GitHub here:
https://guides.github.com/features/mastering-markdown/.)

All of which is to say that you could render
https://github.com/davidnalesnik/lilypond-text-spanner-inner-texts/blob/master/example.ly
as
notation, do a quick screencapture (to PNG), put the PNG in the same
directory as the README.md, and add just a single line to the README.md for
a perfect notational illustration of the package's functionality.

Thanks again for all your work extending Lily in some very sensible and
useful ways; I've thoroughly integrated your text spanner ID extensions,
and it's really changed what I'm able easily to communicate with text
spanners in my own scores.

Trevor.




-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: \textLengthOn in polyphony and over MultiMeasureRests

2018-07-29 Thread Trevor Bača
Hi Urs, hi Torsten,

I've followed both parts of this thread with interest, especially since I
only recently discovered the magic empty chord <> construct.

Urs, Torsten's results for the multimeasure rest example are reproducible
like this:

%%% BEGIN %%%

{
\version "2.19.82"
\textLengthOn
\override TextScript.self-alignment-X = #CENTER
\override TextScript.staff-padding = 3
c''1
<> ^ \markup "Invisible empty chord expands measure with
MultiMeasureRest."
R1
c''
}

%%% END %%%

Output:


The relevant use of <> appears in the docs in ...

http://lilypond.org/doc/v2.19/Documentation/notation/writing-rests

... under the "Multi-measure rest markup" subhead at the very bottom of the
page. (Clicking
http://lilypond.org/doc/v2.19/Documentation/1c/lily-56e2a6af.ly shows the
LilyPond input.)


Torsten, how are you achieving the text centered above the pair of half
notes in the original example (ie, in the measure top-headed with
"Minima")? Try as I might, I can't get it!


Trevor.





On Wed, Jul 25, 2018 at 3:48 PM, Torsten Hämmerle 
wrote:

> Urs Liska-3 wrote
> > (markup in voice one will push the music in voice two)
>
> Yes, but that's only natural:
>
> (0) \textLengthOn affects any neighbouring objects and will even push away
> the surrounding notes etc.
>
> (1) TextScript.self-alignment-X ist set to #CENTER and in combination with
> \textLengthOn, the outer limits of the measure will be pushed apart.
>
> (2) If there's only one single note, this note will be forced into the
> horizontal centre of the measure (which is what we wanted in the example,
> but that's not "natural", as the first note in a measure should start at
> the
> beginning of the measure.
>
> (3) The additional second voice prevents the single note of voice one from
> being centred, because now the two voices have to be rhythmically aligned:
> that's why the 2nd note of voice 2 sticks out to the right.
>
> So as to your question a), it's not a problem of calculating \textLength,
> it's just a problem of rhythmic alignment of notes.
> You don't even need a 2nd voice for that effect,
>   c''4 ^\markup "Other voice interferes." c''2.
> would just behave in the same way.
>
> If you need more than one (centred) note, you can use spacer rests (s)
> an/or
> scaled durations (if needed) and (!) attach the markup text to <>, that way
> it won't affect the neighbouring notes other than by widening the measure.
> Don't ask me why, but it comes in handy.
>
>
>
>
> Urs Liska-3 wrote
> > and it doesn't
> > work over MultiMeasureRests:
>
> In these cases, you can attach it to <>. This even works with compressed
> MultiMeasureRests and it's an ordinary TextScript then.
>
> The longa rest in the example below has been created by R1*4 in combination
> with \compressFullBarRests and \omit MultiMeasureRestNumber. The markup
> text
> has been attached to <>.
> I haven't included the source code because it's a mess and I used a Fraktur
> font just for fun.
>
> 
>
> I think this pretty much mimicks the original sample.
>
> All the best,
> Torsten
>
>
>
>
> --
> Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>



-- 
Trevor Bača
www.trevorbaca.com
soundcloud.com/trevorbaca
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Interactive PDF Link to Notes in Preview

2018-07-29 Thread Federico Bruni



Il giorno dom 8 lug 2018 alle 0:47, Federico Bruni  
ha scritto:



Il giorno sab 7 lug 2018 alle 19:10, Kieren MacMillan 
 ha scritto:

Hi Federico,

 So you are not using point-and-click from Skim to Frescobaldi, 
right? (it's the original subject of this discussion)


Ah! No… I use Skim for previewing, zooming in/out, pagination 
checks, etc. — it’s so much better than Frescobaldi’s 
previewer — and then use Frescobaldi’s previewer for 
point-and-click navigation. That combo works great for me, though I 
suppose I'd be even happier if either Skim linked back to the 
Frescobaldi code, or Frescobaldi’s PDF viewer were better.




I've investigated a bit.
It does not depend on Skim:
https://sourceforge.net/p/skim-app/mailman/message/32211547/

This app:
http://www.rubicode.com/Software/RCDefaultApp/

allows to associate a command to textedit URLs.
I may assign lilypond-invoke-editor, but it doesn't work in Mac. A 
GUB issue¹, so I'm not optimist about a possible solution.



¹ Problems with lilypond-invoke-editor in Mac:

1. Wrong shebang:
$ head 
/Applications/LilyPond.app/Contents/Resources/bin//lilypond-invoke-editor

#!/home/gub/NewGub/gub/target/tools/root/usr/bin/guile -s
!#
 lilypond-invoke-editor.scm -- Invoke an editor in 
file:line:column mode




The shebang should be replaced with the full path to the real Mac 
installation, that is:


#!/Applications/LilyPond.App/Contents/Resources/bin/guile -s
!#

After that (and fixing the paths, see below), I can run 
lilypond-invoke-editor in the terminal, but only without the textedit 
URI.



2. GUILE_LOAD_PATH must be manually set in ~/.profile

3. libguile error (I haven't solved this)
$ lilypond-invoke-editor
ERROR: In procedure dynamic-link:
ERROR: file: "libguile-srfi-srfi-1-v-3", message: "file not found"



I solved this issue by working on some variables:

$ cat .profile
export 
PATH="$PATH:/Applications/LilyPond.app/Contents/Resources/bin:/Applications/Atom.app/Contents/MacOS"


export 
GUILE_LOAD_PATH="/Applications/LilyPond.app/Contents/Resources/share/guile/1.8:/Applications/LilyPond.app/Contents/Resources/share/lilypond/current/scm"
export 
LD_LIBRARY_PATH="/Applications/LilyPond.app/Contents/Resources/lib:$LD_LIBRARY_PATH"


export LYEDITOR="atom %(file)s:%(line)s:%(column)s"


Now I'm stuck on the same error I get also on Windows:

ERROR: no code for module (scm editor)

editor.scm is in the directory added to the GUILE_LOAD_PATH environment 
variable.

Why it cannot find it?





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


Re: \textLengthOn in polyphony and over MultiMeasureRests

2018-07-29 Thread Torsten Hämmerle
Trevor Bača-2 wrote
> Torsten, how are you achieving the text centered above the pair of half
> notes in the original example (ie, in the measure top-headed with
> "Minima")? Try as I might, I can't get it!


Hi Trevor,

You've got me there! ;)

Standard \textLengthOn will push away neighbouring notes and you won't get
the markup text to neatly and symmetrically align with the barlines without
some tweaking.

\textLengthOn just sets the following two properties:

  \override TextScript.extra-spacing-width = #'(-0.0 . 0.4)
  \override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)

By adapting extra-spacing-width, we can actually set the left and right
"margins" of the text. This way, we can attach the TextScript to the second
note and make it overlap the first note.

Finally (this is not necessary, though) I've shifted both notes to the right
by using extra-offset to better match the original.

 

%%%
{
  \override TextScript.self-alignment-X = #CENTER

% custom version of \textLengthOn:
  \override TextScript.extra-spacing-width = #'(2.6 . 0.4)% default:
#'(-0.0 . 0.4)
  \override TextScript.extra-spacing-height = #'(-inf.0 . +inf.0)

% Shift NoteHead and Stem to the right
  \override NoteHead.extra-offset = #'(5 . 0)
  \override Stem.extra-offset = #'(5 . 0)

  R1
  \bar "||"
  c''2 c''^\markup \line { \typewriter "#'extra-offset" "trickery" }
  \bar "||"
}
%%

HTH,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: The abyss

2018-07-29 Thread Ralph Palmer
On Fri, Jul 27, 2018 at 10:09 PM Ralph Palmer 
wrote:

> "Buck looking into the abyss."
>

My profound apologies. I fat-thumbed an email address from a list.

I'm surprised no one complained!

All the best,

Ralph

-- 
Ralph Palmer
Brattleboro, VT
USA
palmer.r.vio...@gmail.com
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: The abyss

2018-07-29 Thread Ben

On 7/29/2018 3:19 PM, Ralph Palmer wrote:
On Fri, Jul 27, 2018 at 10:09 PM Ralph Palmer 
mailto:palmer.r.vio...@gmail.com>> wrote:


"Buck looking into the abyss."


My profound apologies. I fat-thumbed an email address from a list.

I'm surprised no one complained!

All the best,

Ralph

--
Ralph Palmer
Brattleboro, VT
USA
palmer.r.vio...@gmail.com 



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


Re: The abyss

2018-07-29 Thread David Kastrup
Ralph Palmer  writes:

> On Fri, Jul 27, 2018 at 10:09 PM Ralph Palmer 
> wrote:
>
>> "Buck looking into the abyss."
>>
>
> My profound apologies. I fat-thumbed an email address from a list.
>
> I'm surprised no one complained!

With most modern notation I find it harder to discern the composer's
intent.

-- 
David Kastrup

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


Re: The abyss

2018-07-29 Thread Torsten Hämmerle
Ralph Palmer wrote
> I'm surprised no one complained!

Sorry, I couldn't find the appropriate complaint form.



Ralph Palmer wrote
>> "Buck looking into the abyss."

Instead of complaining, on that occasion: Thanks a lot for your work on the
LilyPond Buck list.
Good to see that there is an apprentice Buck being prepared to face the
unfathomable abysses of a LilyPond virtually on par with the Mariana Trench.

All the best,
Torsten




--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html

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


Re: The abyss

2018-07-29 Thread Vaughan McAlley
On 30 July 2018 at 05:19, Ralph Palmer  wrote:
> On Fri, Jul 27, 2018 at 10:09 PM Ralph Palmer 
> wrote:
>>
>> "Buck looking into the abyss."
>
>
> My profound apologies. I fat-thumbed an email address from a list.
>
> I'm surprised no one complained!
>
> All the best,
>
> Ralph
>
> --
> Ralph Palmer
> Brattleboro, VT
> USA
> palmer.r.vio...@gmail.com
>
> ___
> lilypond-user mailing list
> lilypond-user@gnu.org
> https://lists.gnu.org/mailman/listinfo/lilypond-user
>

All the extra photos and lack of sleep are ideal conditions for a
perfect fat-thumbing storm :-)

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


Syntax Completion in Vim

2018-07-29 Thread Peter Engelbert
Hi everyone,

I am wondering if anyone knows how to set up vim to be able to do tab
completion (or Ctrl-N completion) for Lilypond syntax.  As is, Vim can do tab
completion for variables, contexts and grobs that are defined within the
current file or included files.  For example, once i \override
NoteHead.stencil in a given file, I can then use tab completion on \override,
NoteHead, or .stencil.  Before any of these have appeared in the file, they
are not available using Tab completion. This is in contrast to Frescobaldi, 
which has
Lilypond's syntax (and all of the grob and interface properties) built-in, and
completion is available via a drop-down context menu.

Is it possible to set up this functionality within Vim?  I'm really sold on it
as an editor, I find it to be quite efficient and I like how easy it is to
program and modify.  I find it better than Frescobaldi in every way, except
for Frescobaldi's superior automatic completion.  If there isn't a ready-made
solution, perhaps someone could point me in the direction of how to go about
creating one?

Many thanks,
Peter

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