Re: have multiple voices under same tuplet bracket

2018-11-18 Thread Ryan Michael
I see,
I actually solved that particular problem by hiding the brackets and
numbers, and not using a spacing spanner for the bracket i wish to be
visible:

<<
\new Voice {
\voiceOne
\once \override TupletNumber.text = ""
  \override TupletBracket.bracket-visibility = ##f
\tuplet 4/3 {
e''2
}
}
\new Voice {
\once \override TupletNumber.text = ""
  \override TupletBracket.bracket-visibility = ##f
\tuplet 4/3 {

\voiceTwo
 r8 c''4.
}
}

\new Voice {
\voiceThree
\once \override TupletNumber.text = ""
  \override TupletBracket.bracket-visibility = ##f
\tuplet 4/3 {

 s4 g'4
}
}

\new Voice {
\voiceFour

\tuplet 4/3 {
r4 g'8 d'8
}
}
>>

On Sun, Nov 18, 2018 at 8:33 PM Ryan Michael 
wrote:

> hello lilypond community,
> I am trying to have sustained voices across a 4/3 eighth note tuplet
> bracket. My desire is to simply have one tuplet bracket which encloses each
> of the four voices as a single entity. Lilypond seems to discretize /
> assign tuplet brackets for each voice given the following:
>
> 
> <<
> \new Voice {
> \voiceOne
> \tuplet 4/3{
> e''2 }
> }
> \new Voice {
> \voiceTwo
> \tuplet 4/3{ r8 c''4. }
> }
>
> \new Voice {
> \voiceThree
> \tuplet 4/3 { r4 g'4 }
> }
>
> \new Voice {
> \voiceFour
> \tuplet 4/3{ s4 g'8 d'8}
> }
> >>
> %%
>
>
> I suppose i could probably hide the tuplet for some of them, and show the
> longest phrase as the parent, such as the one with the two eighth notes? I
> am not sure it would span the whole phrase though if i have a silent
> spanner...
>
> Best,
> Ryan
> --
> ॐ नमः शिवाय
>


-- 
ॐ नमः शिवाय
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


have multiple voices under same tuplet bracket

2018-11-18 Thread Ryan Michael
hello lilypond community,
I am trying to have sustained voices across a 4/3 eighth note tuplet
bracket. My desire is to simply have one tuplet bracket which encloses each
of the four voices as a single entity. Lilypond seems to discretize /
assign tuplet brackets for each voice given the following:


<<
\new Voice {
\voiceOne
\tuplet 4/3{
e''2 }
}
\new Voice {
\voiceTwo
\tuplet 4/3{ r8 c''4. }
}

\new Voice {
\voiceThree
\tuplet 4/3 { r4 g'4 }
}

\new Voice {
\voiceFour
\tuplet 4/3{ s4 g'8 d'8}
}
>>
%%


I suppose i could probably hide the tuplet for some of them, and show the
longest phrase as the parent, such as the one with the two eighth notes? I
am not sure it would span the whole phrase though if i have a silent
spanner...

Best,
Ryan
-- 
ॐ नमः शिवाय
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread Thomas Morley
Am So., 18. Nov. 2018 um 22:16 Uhr schrieb David Kastrup :
>
> Thomas Morley  writes:
>
> > As a side-effect of this thread I learned that doing
> > whatever = \context Staff \applyContext #(lambda (ctx) ...)
> > will affect Staff _and_ all it's alias. Furthermore it can be put as
> > is into \with or \layout or directly into music.
>
> All with different effect.  In \with, it will affect the current
> context, no questions asked.  In \layout (or \midi), it will affect
> _all_ context definitions of the respective output definition having an
> alias to Staff .

Which is intended, at least it's what I'd want.

> Directly in music, it will walk the hierarchy upwards
> until finding a context aliased to Staff and will affect only that.

Not sure whether this may cause problems in some situations, although
I expect only rare cases.

I think I'll add the workaround to the issue, there is none atm.
For guitarists it's a common problem, I wonder why not more people
complained about it over the years. This issue is 10 years old!

Cheers,
  Harm

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread David Kastrup
Thomas Morley  writes:

> As a side-effect of this thread I learned that doing
> whatever = \context Staff \applyContext #(lambda (ctx) ...)
> will affect Staff _and_ all it's alias. Furthermore it can be put as
> is into \with or \layout or directly into music.

All with different effect.  In \with, it will affect the current
context, no questions asked.  In \layout (or \midi), it will affect
_all_ context definitions of the respective output definition having an
alias to Staff .  Directly in music, it will walk the hierarchy upwards
until finding a context aliased to Staff and will affect only that.

-- 
David Kastrup

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread David Kastrup
Thomas Morley  writes:

> Am So., 18. Nov. 2018 um 21:15 Uhr schrieb David Kastrup :
>>
>> Thomas Morley  writes:
>>
>> > Am So., 18. Nov. 2018 um 20:40 Uhr schrieb David Kastrup :
>>
>> Probably not.  I remembered that the function was there.  I read the
>> doc string and said "huh?".  I read the C++ code and said "WTF?".
>> And then I pretended that this was totally obvious to make me look
>> smart.
>
> Rofl

[...]

> Thanks,
>   Harm
>
> P.S.
>   You _are_ smart :))

I like my bluffs to survive calling them.  Turns out I am not a
particularly great poker player.

-- 
David Kastrup

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread Thomas Morley
Am So., 18. Nov. 2018 um 21:15 Uhr schrieb David Kastrup :
>
> Thomas Morley  writes:
>
> > Am So., 18. Nov. 2018 um 20:40 Uhr schrieb David Kastrup :
> >
> >> Just do
> >>
> >> (eq? ctx (ly:context-find ctx 'Staff))
> >>
> >> --
> >> David Kastrup
> >
> > I did not even consider to use ly:context-find. The description says:
> > Find a _parent_ of context that has name or alias name. Return #f if not 
> > found.
> > So I expected it could return
> > Staff as parent of Voice
> > StaffGroup as parent of Staff
> > Score as parent of StaffGroup
> >
> > Similar to
> > Function: ly:context-parent context
> > Return the parent of context, #f if none.
> > Although this one returns a tree of contexts not even a single parent.
> > At least for me this was a surprise.
> >
> > Is my understanding of parents with contexts entirely wrong ...?
>
> Probably not.  I remembered that the function was there.  I read the doc
> string and said "huh?".  I read the C++ code and said "WTF?".  And then
> I pretended that this was totally obvious to make me look smart.

Rofl

> In my
> defense, I did not write that doc string (at least I hope so).
>
> "Find a parent" does not make a lot of sense considering that each
> context has at most one parent.
>
> It's more like "Find among the chain of successive direct parents
> starting with the context itself".

Indeed.

> Some of our doc strings are not particularly helpful.

Very true.

> At least the
> function itself is.

Indeed.

Some background:
Today I was beaten by
https://sourceforge.net/p/testlilyissues/issues/556/
"fingeringOrientations affects cross-voices arpeggio"
which is still present with 2.21.0
and tried to find a workaround.

As a side-effect of this thread I learned that doing
whatever = \context Staff \applyContext #(lambda (ctx) ...)
will affect Staff _and_ all it's alias. Furthermore it can be put as
is into \with or \layout or directly into music.
So I don't need to restrict it to Staff-like contexts anymore, this is
now built-in. :)

But here the code:

correctConnectedArpeggio =
  \context Staff
  \applyContext
#(lambda (ctx)
   (let* ((x-offs '())
  (mom '()))
 (ly:context-pushpop-property ctx 'Arpeggio 'before-line-breaking
   (lambda (grob)
 (if (negative? (ly:grob-property grob 'direction))
 (let ((grob-mom (grob::when grob))
   (x-off-proc (ly:grob-property-data grob 'X-offset)))
   (set! x-offs
 (if (equal? grob-mom mom)
 (cons (x-off-proc grob) x-offs)
 '()))
   (set! mom (grob::when grob))
   (if (pair? x-offs)
   (ly:grob-set-property!
 grob
 'X-offset
 ;; Mmmh, is using the arbitrary 10 sufficient?
 (apply min 10 (drop x-offs 1))

melody = \relative c'' {
  \voiceOne
  \set fingeringOrientations = #'(left)
  2\arpeggio
  \set fingeringOrientations = #'(right)
  \arpeggio
  \set fingeringOrientations = #'(up)
  1\arpeggio
}

bass = \relative c' {
  \voiceTwo
  \set fingeringOrientations = #'(left)
  2\arpeggio
  \set fingeringOrientations = #'(right)
  \arpeggio
  \set fingeringOrientations = #'(down)
  1\arpeggio
}

\score {
  \context Staff \with {
\consists "Span_arpeggio_engraver"
\correctConnectedArpeggio
  }
  <<
\set Staff.connectArpeggios = ##t
\context Voice = "melody" { \melody }
\context Voice = "bass"   { \bass   }
  >>
}


Thanks,
  Harm

P.S.
  You _are_ smart :))

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread Thomas Morley
Am So., 18. Nov. 2018 um 20:40 Uhr schrieb David Kastrup :

> Just do
>
> (eq? ctx (ly:context-find ctx 'Staff))
>
> --
> David Kastrup

I did not even consider to use ly:context-find. The description says:
Find a _parent_ of context that has name or alias name. Return #f if not found.
So I expected it could return
Staff as parent of Voice
StaffGroup as parent of Staff
Score as parent of StaffGroup

Similar to
Function: ly:context-parent context
Return the parent of context, #f if none.
Although this one returns a tree of contexts not even a single parent.
At least for me this was a surprise.

Is my understanding of parents with contexts entirely wrong ...?

Anyway, the following works very nicely:

foo =
  \applyContext
#(lambda (ctx)
   (let* ((ctx-name (ly:context-name ctx)))
 (if (eq? ctx (ly:context-find ctx 'Staff))
 (format #t "\n\tI'm in a staff-like context: ~a" ctx-name)
 (format #t "\n\tWrong here in: ~a" ctx-name

\score {
  <<
\new StaffGroup R1
\new Staff R1
\new TabStaff R1
\new DrumStaff R1
\new ChoirStaff R1
  >>
  \layout {
  \context Staff \foo
\context {
  \StaffGroup
  \foo
}
\context {
  \ChoirStaff
  \foo
}
  }
}

Thanks,
  Harm

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


Re: Attaching images to posts

2018-11-18 Thread David Wright
On Sun 18 Nov 2018 at 17:27:23 (+0100), David Kastrup wrote:
> > […] Harm, […] wrote:
> >> Am So., 18. Nov. 2018 um 08:36 Uhr schrieb Andrew Bernard 
> >> :
> >> > In the past I have just made an attachment to the post,
> >> 
> >> Please continue to do so.
> >> Speaking only for myself, frequently I don't see inline images here.
> 
> One can have a MIME attachment with a disposition to be displayed
> inline.  That works even in clients preferring text over HTML since the
> images are not in HTML parts but interspersed as MIME.  Stuff working
> via HTML parts or even as mail backgrounds have quite less of a chance
> to be more or less universally recognized and displayed.

But some people here don't seem to recognise the different methods
even where both are available in their mailer. For example, both these
post structures have been sent to this list using Apple Mail (2.3445.8.2).
The first one produces "invisible" images that a text-only reader will
know nothing about; the second is satisfactory for readers, but the
poster might have been forced to eschew HTML to achieve this.

I  1   [multipa/alternativ, 7bit, 26K]
I  2 ├─>  [text/plain, quoted, us-ascii, 1.2K] ←
I  3 └─>  [multipa/related, 7bit, 24K]
I  4   ├─> [text/html, quoted, us-ascii, 3.7K] x
I  5   ├─>PastedGraphic-2.png[image/png, base64, 5.6K] x
I  6   └─>Repeat question.png [image/png, base64, 14K] x
I  7[text/plain, 7bit, us-ascii, 0.1K] ←

I  1 [text/plain, quoted, utf-8, 0.4K] ←
I  2 MuseScoreOK.png  [image/png, base64, 29K] ⇦
I  3  [text/plain, quoted, us-ascii, 0.2K] ←
I  4 FinaleOK.png[image/png, base64, 323K] ⇦
I  5[text/plain, 7bit, us-ascii, 0.1K] ←
I  6 PastedGraphic-3.png [image/png, base64, 7.6K] ⇦
I  7[text/plain, 7bit, us-ascii, 0.1K] ←
A  8 45d-Repeats-Nested-Alternatives.xml [applica/xml, 7bit, 5.9K] ⬅
I  9 [text/plain, quoted, utf-8, 1.5K] ←
I 10[text/plain, 7bit, us-ascii, 0.1K] ←

 ← text can be read
 ⇦ existence can be observed
 ⬅ attachment can be saved
 x invisible

Cheers,
David.

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread David Kastrup
Thomas Morley  writes:

> Am So., 18. Nov. 2018 um 20:40 Uhr schrieb David Kastrup :
>
>> Just do
>>
>> (eq? ctx (ly:context-find ctx 'Staff))
>>
>> --
>> David Kastrup
>
> I did not even consider to use ly:context-find. The description says:
> Find a _parent_ of context that has name or alias name. Return #f if not 
> found.
> So I expected it could return
> Staff as parent of Voice
> StaffGroup as parent of Staff
> Score as parent of StaffGroup
>
> Similar to
> Function: ly:context-parent context
> Return the parent of context, #f if none.
> Although this one returns a tree of contexts not even a single parent.
> At least for me this was a surprise.
>
> Is my understanding of parents with contexts entirely wrong ...?

Probably not.  I remembered that the function was there.  I read the doc
string and said "huh?".  I read the C++ code and said "WTF?".  And then
I pretended that this was totally obvious to make me look smart.  In my
defense, I did not write that doc string (at least I hope so).

"Find a parent" does not make a lot of sense considering that each
context has at most one parent.

It's more like "Find among the chain of successive direct parents
starting with the context itself".

Some of our doc strings are not particularly helpful.  At least the
function itself is.

-- 
David Kastrup

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


Re: Attaching images to posts

2018-11-18 Thread David Wright
On Sun 18 Nov 2018 at 10:47:55 (+0100), Gianmaria Lari wrote:
> On Sun, 18 Nov 2018 at 08:36, Andrew Bernard  wrote:
> 
> > What is the approved and recommend way to attach images for small examples
> > to posts in this list?
> >
> > In the past I have just made an attachment to the post, but it occurred to
> > me that may not be the best thing to do.
> 
> There are different opinions about it.
> 
> I personally put the image near the text that explains the issue and I
> avoid to simply attach the image to the email. Image and text near each
> other makes more easy to understand the issue.
> 
> Of course there will be people that prefer attachemnt because it works with
> pine etc. etc. So when asked I attach the picture.

Well I don't know how you do it in your mailer, but your post at
http://lists.gnu.org/archive/html/lilypond-user/2016-03/msg00256.html
certainly shows a very satisfactory way of attaching the images
inline. In the HTML, the images are referred to by their Content-ID:
but there's an alt= text which is displayed in the text version of the
post.

In particular, though, the images themselves are included as top level
attachments, which means that they should be visible (or their presence
detected) by all:

I  1  [multipa/related, 7bit, 32K]
I  2 ├─>  [multipa/alternativ, 7bit, 3.9K]
I  3 │ ├─> [text/plain, 7bit, utf-8, 1.0K]
I  4 │ └─>[text/html, quoted, utf-8, 2.8K]
I  5 ├─>image.png [image/png, base64, 12K]
I  6 └─>image.png [image/png, base64, 15K]
I  7[text/plain, 7bit, us-ascii, 0.1K]

Cheers,
David.

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread David Kastrup
Thomas Morley  writes:

> Am So., 18. Nov. 2018 um 19:19 Uhr schrieb David Kastrup :
>>
>> Thomas Morley  writes:
>>
>> > Hi,
>> >
>> > consider the code below. I'd like to restrict usage to Staff-like
>> > contexts, i.e. Staff, Tab- and DrumStaff, etc would be ok, but
>> > container-contexts like StaffGroup, etc should lead to return '().
>> >
>> > Pseudo-code:
>> >
>> > \new Staff(Group)
>> >   \with {
>> > \applyContext
>> >  #(lambda (context)
>> >(if 
>> >;; Do something, if we are in a Staff-like context
>> >;;   Multiple Bottom-contexts may happen
>> >(lambda (x) ...)
>> >;; Do nothing if we are are in container-contexts like 
>> > ChoirStaff,
>> >;; StaffGroup, etc
>> >'()
>> >)
>> >   }
>> > { c''1 }
>> >
>> > I thought the  could be "Do I have the Staff_symbol_engraver?"
>> > Though, how to code?
>> > \applyContext
>> >  #(lambda (context)
>> >(ly:context-def-lookup context 'consists))
>> > does not work, because 'context' is not a context-definition.
>> >
>> > Any hint how to proceed would be great.
>>
>> Why don't you check whether they have a Staff alias?  Basically if
>> looking up 'Staff returns the context itself.
>
> You mean like below?
>
> foo =
>   \applyContext
> #(lambda (ctx)
>(let* ((ctx-name (ly:context-name ctx))
>   (staff-ctx-def (ly:output-find-context-def $defaultlayout 
> 'Staff))
>   (staff-like? (assoc-get ctx-name staff-ctx-def #f)))
>
>(if staff-like?
>(format #t "\n\tI'm in a staff-like context: ~a" ctx-name)
>(format #t "\n\tWrong here in: ~a" ctx-name
>
> \score {
>   <<
> \new StaffGroup R1
> \new Staff R1
> \new TabStaff R1
> \new DrumStaff R1
> \new ChoirStaff R1
>   >>
>   \layout {
>   \context Staff \foo
> \context {
>   \StaffGroup
>   \foo
> }
> \context {
>   \ChoirStaff
>   \foo
> }
>   }
> }

No.  Don't refer to the definition at all.  Just do

(eq? ctx (ly:context-find ctx 'Staff))

-- 
David Kastrup

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread Thomas Morley
Am So., 18. Nov. 2018 um 19:19 Uhr schrieb David Kastrup :
>
> Thomas Morley  writes:
>
> > Hi,
> >
> > consider the code below. I'd like to restrict usage to Staff-like
> > contexts, i.e. Staff, Tab- and DrumStaff, etc would be ok, but
> > container-contexts like StaffGroup, etc should lead to return '().
> >
> > Pseudo-code:
> >
> > \new Staff(Group)
> >   \with {
> > \applyContext
> >  #(lambda (context)
> >(if 
> >;; Do something, if we are in a Staff-like context
> >;;   Multiple Bottom-contexts may happen
> >(lambda (x) ...)
> >;; Do nothing if we are are in container-contexts like 
> > ChoirStaff,
> >;; StaffGroup, etc
> >'()
> >)
> >   }
> > { c''1 }
> >
> > I thought the  could be "Do I have the Staff_symbol_engraver?"
> > Though, how to code?
> > \applyContext
> >  #(lambda (context)
> >(ly:context-def-lookup context 'consists))
> > does not work, because 'context' is not a context-definition.
> >
> > Any hint how to proceed would be great.
>
> Why don't you check whether they have a Staff alias?  Basically if
> looking up 'Staff returns the context itself.
>
> --
> David Kastrup

You mean like below?

foo =
  \applyContext
#(lambda (ctx)
   (let* ((ctx-name (ly:context-name ctx))
  (staff-ctx-def (ly:output-find-context-def $defaultlayout 'Staff))
  (staff-like? (assoc-get ctx-name staff-ctx-def #f)))

   (if staff-like?
   (format #t "\n\tI'm in a staff-like context: ~a" ctx-name)
   (format #t "\n\tWrong here in: ~a" ctx-name

\score {
  <<
\new StaffGroup R1
\new Staff R1
\new TabStaff R1
\new DrumStaff R1
\new ChoirStaff R1
  >>
  \layout {
  \context Staff \foo
\context {
  \StaffGroup
  \foo
}
\context {
  \ChoirStaff
  \foo
}
  }
}

Thanks,
  Harm

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread David Kastrup
Thomas Morley  writes:

> Hi,
>
> consider the code below. I'd like to restrict usage to Staff-like
> contexts, i.e. Staff, Tab- and DrumStaff, etc would be ok, but
> container-contexts like StaffGroup, etc should lead to return '().
>
> Pseudo-code:
>
> \new Staff(Group)
>   \with {
> \applyContext
>  #(lambda (context)
>(if 
>;; Do something, if we are in a Staff-like context
>;;   Multiple Bottom-contexts may happen
>(lambda (x) ...)
>;; Do nothing if we are are in container-contexts like ChoirStaff,
>;; StaffGroup, etc
>'()
>)
>   }
> { c''1 }
>
> I thought the  could be "Do I have the Staff_symbol_engraver?"
> Though, how to code?
> \applyContext
>  #(lambda (context)
>(ly:context-def-lookup context 'consists))
> does not work, because 'context' is not a context-definition.
>
> Any hint how to proceed would be great.

Why don't you check whether they have a Staff alias?  Basically if
looking up 'Staff returns the context itself.

-- 
David Kastrup

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


Re: Getting context-definiton, while being in applyContext

2018-11-18 Thread Thomas Morley
Am So., 18. Nov. 2018 um 18:23 Uhr schrieb Thomas Morley
:
>
> Hi,
>
> consider the code below. I'd like to restrict usage to Staff-like
> contexts, i.e. Staff, Tab- and DrumStaff, etc would be ok, but
> container-contexts like StaffGroup, etc should lead to return '().
>
> Pseudo-code:
>
> \new Staff(Group)
>   \with {
> \applyContext
>  #(lambda (context)
>(if 
>;; Do something, if we are in a Staff-like context
>;;   Multiple Bottom-contexts may happen
>(lambda (x) ...)
>;; Do nothing if we are are in container-contexts like ChoirStaff,
>;; StaffGroup, etc
>'()
>)
>   }
> { c''1 }
>
> I thought the  could be "Do I have the Staff_symbol_engraver?"
> Though, how to code?
> \applyContext
>  #(lambda (context)
>(ly:context-def-lookup context 'consists))
> does not work, because 'context' is not a context-definition.
>
> Any hint how to proceed would be great.
>
>
> Thanks,
>   Harm

To answer my own question
(ly:output-find-context-def $defaultlayout (ly:context-name context))
will return an alist of context-defs for current context and all the aliases.

To checking for the engraver in the relevant context-def is trivial now.

Cheers,
  Harm

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


Getting context-definiton, while being in applyContext

2018-11-18 Thread Thomas Morley
Hi,

consider the code below. I'd like to restrict usage to Staff-like
contexts, i.e. Staff, Tab- and DrumStaff, etc would be ok, but
container-contexts like StaffGroup, etc should lead to return '().

Pseudo-code:

\new Staff(Group)
  \with {
\applyContext
 #(lambda (context)
   (if 
   ;; Do something, if we are in a Staff-like context
   ;;   Multiple Bottom-contexts may happen
   (lambda (x) ...)
   ;; Do nothing if we are are in container-contexts like ChoirStaff,
   ;; StaffGroup, etc
   '()
   )
  }
{ c''1 }

I thought the  could be "Do I have the Staff_symbol_engraver?"
Though, how to code?
\applyContext
 #(lambda (context)
   (ly:context-def-lookup context 'consists))
does not work, because 'context' is not a context-definition.

Any hint how to proceed would be great.


Thanks,
  Harm

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


Re: Attaching images to posts

2018-11-18 Thread David Kastrup
Roland Goretzki  writes:

> Hello Harm,
>
> You wrote:
>> Am So., 18. Nov. 2018 um 08:36 Uhr schrieb Andrew Bernard
>> :
>> > In the past I have just made an attachment to the post,
>> 
>> Please continue to do so.
>> Speaking only for myself, frequently I don't see inline images here.
>
> Me to.
> So, YES: Please continue to do so.

One can have a MIME attachment with a disposition to be displayed
inline.  That works even in clients preferring text over HTML since the
images are not in HTML parts but interspersed as MIME.  Stuff working
via HTML parts or even as mail backgrounds have quite less of a chance
to be more or less universally recognized and displayed.

-- 
David Kastrup

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


Re: Attaching images to posts

2018-11-18 Thread Roland Goretzki
Hello Harm,

You wrote:
> Am So., 18. Nov. 2018 um 08:36 Uhr schrieb Andrew Bernard
> :
> > In the past I have just made an attachment to the post,
> 
> Please continue to do so.
> Speaking only for myself, frequently I don't see inline images here.

Me to.
So, YES: Please continue to do so.

Best regards
Roland

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


Re: Attaching images to posts

2018-11-18 Thread Aaron Hill

On 2018-11-18 2:07 am, Thomas Morley wrote:

In the past I have just made an attachment to the post,


Please continue to do so.
Speaking only for myself, frequently I don't see inline images here.
Sometimes there is some hint an image could be there, then I have to
look into the archives, which is tedious. Sometimes there is nothing
at all...

Though, I think I'm not the only one refusing to allow inline-images
generally.


You are not alone.  I have my webmail client set to text-only email, so 
I can usually only see images that are attachments.  Linked images work 
(like those from nabble), since the client shows the URL which I can 
then open in a new tab.


However, inline images are hit-and-miss.  When the email size is 
obviously large enough that there is something more than just text but 
no attachments are shown, it is likely the image was embedded in HTML.  
My webmail client does offer an option to selectively switch a single 
email to HTML.  But this does not always work, forcing me to seek out 
the email on the gnu.lists.org archive or nabble.


Given all that, it is my preference to only send emails as pure text 
and, if needed, include small* attachments, since it has the highest 
chance of being read by all clients out there.  (* PNGs work very well 
for music notation even at high DPI.)


The only gotcha I have found is that you need to be careful when 
including LilyPond markup in the email.  Quoting content from other 
folks is done by using one or more greater-than signs at the beginning 
of a line.  However, LilyPond includes "<< >>" as part of its syntax.  I 
try to format the code to avoid the ">>" ever being at the beginning of 
a line, otherwise mail clients (like mine) will misinterpret it as a 
quote.


-- Aaron Hill

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


Re: Attaching images to posts

2018-11-18 Thread Thomas Morley
Am So., 18. Nov. 2018 um 08:36 Uhr schrieb Andrew Bernard
:
>
> What is the approved and recommend way to attach images for small examples to 
> posts in this list?
>
> In the past I have just made an attachment to the post,

Please continue to do so.
Speaking only for myself, frequently I don't see inline images here.
Sometimes there is some hint an image could be there, then I have to
look into the archives, which is tedious. Sometimes there is nothing
at all...

Though, I think I'm not the only one refusing to allow inline-images generally.

> but it occurred to me that may not be the best thing to do.

Why do you think so?

Huge images shoul be uploaded elsewhere and then linked to anyway.


Cheers,
  Harm

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


Re: Edition Engraver in 2.19

2018-11-18 Thread Jan-Peter Voigt
Hello Carlo,

yes it is possible to add fingerings with the EE:
\editionMod theTarget 1 2/4 path.to.context.Voice <>-3

So if you enter the fingering with a single editionMod command you just
have to add it to an empty chord.
To make it convenient you should create a shortcut for the editionMod
command. Otherwise there is far too much boilerplate for a probably very
long list of fingerings.
If you need help with that don't hesitate to ask again ;-)

HTH

Jan-Peter



Am 18.11.18 um 01:43 schrieb Stemby:
> Hello,
> just a simple question: is it possible/convenient to use EE for entering
> fingering instructions?
> 
> Thank you!
> 
> Carlo
> 
> 
> 
> --
> 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
> 


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


Re: Attaching images to posts

2018-11-18 Thread Gianmaria Lari
On Sun, 18 Nov 2018 at 08:36, Andrew Bernard 
wrote:

> What is the approved and recommend way to attach images for small examples
> to posts in this list?
>
> In the past I have just made an attachment to the post, but it occurred to
> me that may not be the best thing to do.
>
> Andrew
>

There are different opinions about it.

I personally put the image near the text that explains the issue and I
avoid to simply attach the image to the email. Image and text near each
other makes more easy to understand the issue.

Of course there will be people that prefer attachemnt because it works with
pine etc. etc. So when asked I attach the picture.

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