Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> An interface may include some property but that does not make a grob do
>> anything with that property.  Those grobs which you'd desire to heed
>> that property would all have to be programmatically changed to look at
>> that property, by employing some interface-specific function in their
>> internals or similar.
>
> That’s exactly what I thought, though I clearly didn’t describe my
> impression very well. I understand fully that the grobs would have to
> be programmatically changed to deal with that property (which is why I
> suggested that MMRs would likely have to be reprogrammed to do exactly
> what they already do, just via the new property).
>
>> Basically calling for an interface just calls for giving a set of
>> properties a label.
>
> So, I’ll reframe my question:
> Does it make sense to give measure-centering properties a label?

What are "measure-centering properties"?

-- 
David Kastrup

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> I have no idea what functions should be responsible for doing anything
>> with properties like that.
>
> Which function(s) position/centre MMRs? And which function(s) position
> NoteColumns/NoteHeads? Wouldn’t those two functions reference
> #'centre-in-measure, if it existed?

They are completely different functions and rely on different
information getting collected and processed by the respective engravers.
So you cannot just merge them into one function that then does different
things dependent on some centre-in-measure flag.

-- 
David Kastrup

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Reggie
Hi Reggie,

> I would also want to know how to do this basic layout setting which all
> other notation Programs have done since the dawning of time.

That claim seems hyperbolic, and almost certainly not true. (If I recall
correctly, NoteWriter v1 didn’t have any such ability.) In any case, saying
such a thing is totally unnecessary and ultimately unhelpful; it might be
best to avoid adding that kind of commentary in future posts.

* Ok. I should have said differently. 

> You shouldn't have to sacrifice the entire score hiding staves for this

You don’t have to; I select staves and have them appear and disappear as
desired all the time.

* Then why can't Andrew? Why did he post in the first place? Why is a hack
the only answer solution?

> Lilypond is so bizarre sometimes with things.

A totally useless and inflammatory comment.

* Respect, but there are many things in Lilypond code that is bizarre and
confusing. Even those who work on the code have said in the past posts that
certain areas of the program are in need. It comes up every now and again.
You think that 100% of Lilypond makes total logical sense "under the hood"
and also in the user's viewpoint? Surely that's hyperbolic as you say. :)
But ok.

> Why is it not easy to select staves to hide and they hide?

It is easy. You just don’t know how to do it.

* Andrew does not know how to do it either. So now what? 






--
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: word-wrapping in a markup column

2019-02-05 Thread Kieren MacMillan
Hi David,

> Is there a way to allow lines in such a column to break if needed but
> maintain even spacing between all lines?  Any help is much
> appreciated, as this problem has plagued me for a long time.

Maybe?

\markup \override #'(line-width . 10) \column {
 \wordwrap-lines { a a a a a a a a a a a a a a a a a a a a }
 \wordwrap-lines { b b b b b b b b b b b b b b b b b b b b }
 \wordwrap-lines { c c c c c c c c c c c c c c c c c c }
}

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Reggie
Andrew Bernard wrote
> I want to remove some staves containing only rests and yet retain others
> in
> my quartet score. [When there is a long solo I want the other parts
> suppressed, but when just one instrument is at rest I want the empty staff
> to show in the set of four].
> 
> The keepAliveInterface must have something to do with it but my attempts
> lead nowhere. Here's an MWE where if somebody could show how to suppress
> one staff with rests but show the other this would set me on the path to
> enlightenment.
> 
> Andrew
> 
> %
> \version "2.19.82"
> 
> violinOne = {
>   \override Staff.VerticalAxisGroup.remove-first = ##t
>   \set Staff.keepAliveInterfaces = #'()
>   \repeat unfold 8 { c''4 }
>   \break
>   \unset Staff.keepAliveInterfaces
> 
>   \repeat unfold 8 { r4 }
>   \break
>   \repeat unfold 8 { c''4 }
>   \break
>   % how can I show this line of rests?
>   \repeat unfold 8 { s4 }
>   \bar "."
> }
> 
> violinTwo = {
>   \repeat unfold 8 { c'4 }
>   \break
>   \repeat unfold 8 { c'4 }
>   \break
>   \repeat unfold 8 { c'4 }
>   \break
>   \repeat unfold 8 { c'4 }
> }
> 
> \score {
>   <<
> \new Staff {
>   \violinOne
> }
> \new Staff {
>   \violinTwo
> }
>   >>
>   \layout {
> \context {
>   \Staff
>   \RemoveEmptyStaves
> }
>   }
> }
> 
> %
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

I would also want to know how to do this basic layout setting which all
other notation Programs have done since the dawning of time. Select staves,
hide, nothing else effected by it. Select the staves you desire to hide and
they hide. You shouldn't have to sacrifice the entire score hiding staves
for this. Lilypond is so bizarre sometimes with things. Why is it not easy
to select staves to hide and they hide? Why do you need a complete score
hiding only? This really should be fixed.

Please Andrew email and share if you ever solve this thank you



--
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: creating a function to automate slides (falls) in rock guitar music

2019-02-05 Thread John Doe
>
> This works for me, Randy:
>
> \override Glissando #'style = #'zigzag
> \once \override Glissando #'(bound-details left Y) = #+3
> | r4 r8 ees'~ ees4 \glissando ges,8 ess
>

Thanks Michael, overriding the bound details is a good idea, but on chords,
all the gliss lines converge to one point. I've attached a picture of the
sort of output I'm trying to achieve. It's very common in rock guitar
notation.

I guess my Subject line was a little inaccurate, not just slides, but falls
specifically. I've edited the subject line.

Here's the core of the approach I'm trying to accomplish this with (version
2.19.82):

fall = #(define-music-function (input) (ly:music?)
#{
\afterGrace 16/16 << $input <>\glissando >>
\hideNotes $input \unHideNotes
#})
\relative { \fall e'8 e, e16 e e d r2 }

Which, for me, produces a the output you can see in the second attachment
(I'm trying to transcribe the guitar parts of Royal Orleans by Led
Zeppelin). There are several problems with this:


   1. I would like to be able to attach it post-note as is normally done
   with \glissando and other articulations (but I'm not sure how that
   works, and I haven't looked into it yet);
   2. in relative music blocks, it appears that using a music variable that
   contains an octave mark makes the note change octaves each the variable
   containing it is used (as is the case with this, where you can see the
   invisible note has jumped an octave again); and
   3. when I hide the grace note with \hideNotes, the note before it starts
   beaming to it (!)

If you or anybody on the list knows how these problems could be solved, I
could sleep better at night :) I'm definitely a little obsessive about
programming problems.

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


Re: word-wrapping in a markup column

2019-02-05 Thread Abraham Lee
Hi, David!

On Tue, Feb 5, 2019 at 11:14 AM David Nalesnik 
wrote:

> Hi all,
>
> This snippet leaves no space between the word-wrapped items:
>
>  \version "2.19.82"
>
> \markup \override #'(line-width . 10) \column {
>   \wordwrap { a a a a a a a a a a a a a a a a a a a a }
>   \wordwrap { b b b b b b b b b b b b b b b b b b b b }
>   \wordwrap { c c c c c c c c c c c c c c c c c c }
> }
>
> Is there a way to allow lines in such a column to break if needed but
> maintain even spacing between all lines?  Any help is much
> appreciated, as this problem has plagued me for a long time.
>

I have almost no experience with the following, so I can't comment on its
robust-ness, but it appears to do what you want:

\version "2.19.82"

\markup {
  \override #'(line-width . 10)
  \override #'(baseline-skip . 3)  %<--- All lines seem to be responsive to
this now
  \column {
\wordwrap-internal ##f { a a a a a a a a a a a a a a a a a a a a }
\wordwrap-internal ##f { b b b b b b b b b b b b b b b b b b b b }
\wordwrap-internal ##f { c c c c c c c c c c c c c c c c c c }
  }
}

It wraps differently when the boolean is ##t. Again, I can't be held
accountable for how this will affect your situation (lol), but maybe that
points in the right direction?

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Kieren MacMillan
Hi Reggie,

> I would also want to know how to do this basic layout setting which all
> other notation Programs have done since the dawning of time.

That claim seems hyperbolic, and almost certainly not true. (If I recall 
correctly, NoteWriter v1 didn’t have any such ability.) In any case, saying 
such a thing is totally unnecessary and ultimately unhelpful; it might be best 
to avoid adding that kind of commentary in future posts.

> You shouldn't have to sacrifice the entire score hiding staves for this

You don’t have to; I select staves and have them appear and disappear as 
desired all the time.

> Lilypond is so bizarre sometimes with things.

A totally useless and inflammatory comment.

> Why is it not easy to select staves to hide and they hide?

It is easy. You just don’t know how to do it.

Regards,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> Pretty much.

Okay. Thanks for the detailed and helpful answer. Consider this "brainstorming 
a possible feature request" thread closed from my perspective.

Best,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska


Am 05.02.19 um 17:42 schrieb Urs Liska:


Hi Mark,

Am 05.02.19 um 17:01 schrieb Urs Liska:

Hi Mark,

Am 05.02.19 um 16:56 schrieb Mark Knoop:

At 15:23 on 05 Feb 2019, Urs Liska wrote:
I succeeded overriding a MultiMeasureRest's stencil with a custom 
markup
to display arbitrary markups centered in a measure. So I know how 
to use

the MMR's properties to determine a measure's center and place custom
stencils appropriately.

However, now I have to do the same but not with text but with 
arbitrary
notes. Unfortunately there's no stencil for a "note", so I'm not 
sure if

I can make this approach work.

Would it be possible to manually combine (arbitrary) notehead, stem 
and

flag to a custom stencil that I can then place inside the staff by
overriding a MMR's stencil? Are there even tools to help me with that?
It seems overkill, but you could try getting the stencil from a 
\markup \score block stripped of unnecessary engravers.



Good idea!
I'll try that. SInce I'm stuffing this away in include files it might 
be overkill but feasible.


It sort-of works.

I'm producing the stencil of a \markup \score expression through this 
function


getNoteMarkupStencil =
#(define-scheme-function (grob music)(ly:grob? ly:music?)
(grob-interpret-markup grob
  #{
\markup \score {
  \new Staff $music
  \layout {
\context {
  \Score
  \omit StaffSymbol
  \omit Clef
  \omit TimeSignature
  \omit KeySignature
  \omit BarLine
}
  }
}
  #}))

and pass it to a stencil override where two markups are also combined 
above and below the staff.


The result (attached) is promising but not quite there yet. I have the 
impression that space is left for the accidental, whether it is there 
or not.


Do you have any idea how I could tackle this (without having me to 
sort everything out into a MWE)?




Well, that's sort-of embarrassing ;-) Here's the MWE:

\version "2.19.82"

\layout {
  \context {
\Staff
\omit Clef
\omit TimeSignature
  }
}

{
  c''1
}
{
  cis''1
}

The space left to the notehead here is exactly the amount my centered 
stencil is offset to the right.


And having the MWE available also made me find the solution myself: 
\once \override NoteColumn.X-offset = -2. I assume this is reverting


(first-note fixed-space . 2.0)

from some of the elements starting the staff.

For the record I'm posting this result.

Urs

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> They are completely different functions and rely on different
> information getting collected and processed by the respective engravers.
> So you cannot just merge them into one function that then does different
> things dependent on some centre-in-measure flag.

As is so often the case, I don’t seem to be asking the right question(s), or 
else I’m asking the right question(s) in a way that does not result in helpful 
answer(s).

So here goes another attempt to as the right question, or ask it in the right 
way:

Is it really the case that the best way for Lilypond to centre things in 
measures is the current ad-hoc grab-bag of built-in algorithms (cf. MMRs) and 
distinct hacks (David N’s measure-centred spanners, Harm’s 
note-column-centering, etc. etc. etc.), as opposed to building a single, 
consistent, shared mechanism that could be used / adapted / leveraged / 
referenced / whatever by any grob [type] that wanted to be centred in a measure?

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> They are completely different functions and rely on different
>> information getting collected and processed by the respective engravers.
>> So you cannot just merge them into one function that then does different
>> things dependent on some centre-in-measure flag.
>
> As is so often the case, I don’t seem to be asking the right
> question(s), or else I’m asking the right question(s) in a way that
> does not result in helpful answer(s).
>
> So here goes another attempt to as the right question, or ask it in the right 
> way:
>
> Is it really the case that the best way for Lilypond to centre things
> in measures is the current ad-hoc grab-bag of built-in algorithms
> (cf. MMRs) and distinct hacks (David N’s measure-centred spanners,
> Harm’s note-column-centering, etc. etc. etc.), as opposed to building
> a single, consistent, shared mechanism that could be used / adapted /
> leveraged / referenced / whatever by any grob [type] that wanted to be
> centred in a measure?

Pretty much.  The MMR functionality is pretty special.  One would
probably need to refactor the job of typesetting MMRs between the normal
rest engraver and the MMR engraver in order to make it possible for
other objects to gain similar positioning.  It's certainly desirable for
things like bordun notes (Monteverdi's Vespers anybody?) but it requires
a completely different approach to positioning that is not really
amenable to a few flags.  For example, what to do if a measure is split
across lines?

-- 
David Kastrup

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> What are "measure-centering properties"?

Whichever ones we think make sense, I suppose.

As I’ve already said, I could see there being a boolean #'centre-in-measure; 
possibly it would be useful to have a numerical #'offset (defaulting to 0); in 
a complete implementation, I suppose there’d be a #'centre-together property 
(analogous to #'keep-alive-together); etc.

I could probably think of a dozen others… but I don’t see it being worth the 
exercise if there’s no benefit to adding the interface.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> I have no idea what functions should be responsible for doing anything
> with properties like that.

Which function(s) position/centre MMRs? And which function(s) position 
NoteColumns/NoteHeads? Wouldn’t those two functions reference 
#'centre-in-measure, if it existed?

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> What are "measure-centering properties"?
>
> Whichever ones we think make sense, I suppose.
>
> As I’ve already said, I could see there being a boolean
> #'centre-in-measure; possibly it would be useful to have a numerical
> #'offset (defaulting to 0); in a complete implementation, I suppose
> there’d be a #'centre-together property (analogous to
> #'keep-alive-together); etc.
>
> I could probably think of a dozen others… but I don’t see it being
> worth the exercise if there’s no benefit to adding the interface.

I have no idea what functions should be responsible for doing anything
with properties like that.

-- 
David Kastrup

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


Re: Slur connecting fingering numbers

2019-02-05 Thread Thomas Morley
Am Di., 5. Feb. 2019 um 10:38 Uhr schrieb Thomas Morley
:

> Though, my procedure printing the bows relies on a stencil being
> present. Thus nothing happens.
> This dependance bugs me anyway, so I'll have another look in the evening.

I've eliminate default-stencil dependancy. Please test.

Cheers,
  Harm
\version "2.19.82"

%% After
%% http://lilypond.1069038.n5.nabble.com/Glissando-on-single-note-in-chords-tt34672.html#a34676

%% Printing Glissando between Fingerings is initialized by the new introduced 
%% subproperty:
%%   Glissando.details.finger-slides (a boolean, default is #f)
%%
%% Which Glissando between Finerings is printed (as a line)
%%   could be selected via 'glissandoMap' or the provided 'connectGliss'
%%
%% Selecting which Glissando should become a bow is done with (not selected
%% ones are dropped):
%%   Glissando.details.bow-glissando-indices (a number-list, default #f)
%%
%% The bow is further customizable modifing the newly introduced
%%   Glissando.bound-details.left.y-padding (a numerical value, default is 1)
%%   Glissando.bound-details.right.y-padding (a numerical value, default is 1)
%%
%% The other known subproperties may still be modified.

#(define (replace-gliss-with-tie which)
  (lambda (grob)
(let* ((gliss-count (ly:grob-property grob 'glissando-index))
   (sign 
 (lambda (x)
   (if (= x 0)
   0
   (if (< x 0) -1 1)
  (if (member gliss-count which) 
  (let* ((sys (ly:grob-system grob))
 (left-bound (ly:spanner-bound grob LEFT))
 (left-coord (ly:grob-relative-coordinate left-bound sys X))
 (right-bound (ly:spanner-bound grob right))
 (right-coord (ly:grob-relative-coordinate right-bound sys X))
 (left-bound-info (ly:grob-property grob 'left-bound-info))
 (left-padding (assoc-get 'padding left-bound-info))
 (Y-left (assoc-get 'Y left-bound-info))
 (X-left (assoc-get 'X left-bound-info))
 (y-left-padding (assoc-get 'y-padding left-bound-info 1))
 (right-bound-info (ly:grob-property grob 'right-bound-info))
 (Y-right (assoc-get 'Y right-bound-info))
 (right-padding (assoc-get 'padding right-bound-info))
 (X-right (assoc-get 'X right-bound-info))
 (y-right-padding (assoc-get 'y-padding right-bound-info 1))
 (thick (ly:grob-property grob 'thickness 0.12)))
  (make-tie-stencil 
(cons (- X-left left-coord left-padding) 
  (+ Y-left (* y-left-padding (sign Y-left
(cons (- X-right left-coord (- right-padding)) 
  (+ Y-right (* y-right-padding (sign Y-left
thick
(if (negative? Y-left) DOWN UP)))
  #f
   
fingeringSlideEngraver =
#(lambda (context)
   (let ((glissandi '())
 (fingerings '()))
 (make-engraver
   (acknowledgers
 ((glissando-interface engraver grob source-engraver)
   (let* ((details (ly:grob-property grob 'details))
  (slides? (assoc-get 'finger-slides details #f))
  (which-bow-gliss
(assoc-get 'bow-glissando-indices details #f)))
 (if slides?
 (set! glissandi (cons grob glissandi)))
 (if (and which-bow-gliss slides? (pair? fingerings))
 (ly:grob-set-property! grob 'stencil 
   (replace-gliss-with-tie which-bow-gliss)
 ((finger-interface engraver grob source-engraver)
   (set! fingerings (cons grob fingerings
   ((stop-translation-timestep translator)
 (for-each 
   (lambda (gliss)
 (for-each 
   (lambda (finger)
 (if (eq? (ly:spanner-bound gliss LEFT)
  (ly:grob-parent finger X))
 (ly:spanner-set-bound! gliss LEFT finger))
 (if (eq? (ly:spanner-bound gliss RIGHT)
  (ly:grob-parent finger X))
 (begin
   (ly:spanner-set-bound! gliss RIGHT finger)
   (set! glissandi 
 (remove (lambda (x) (eq? x gliss)) glissandi)
   fingerings))
   glissandi)
 (set! fingerings '())
 
\layout {
  \context {
\Voice
\consists \fingeringSlideEngraver
  }
}

%% \set glissandoMap = #'(pair-1 pair-2) ended with \unset glissandoMap is
%% more flexible but not really needed for the fingeringSlideEngraver, thus:
connectGliss =
#(define-music-function (which)(number-list?)
  #{ \set glissandoMap = #(map (lambda (w) (cons w w)) which) #})

%%
%% EXAMPLES
%%
%%{
m = \relative c'' {
  4\glissando
  
  
  4\glissando
  
  \bar "||"
}

{
  %% 

Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Reggie
David Kastrup wrote
> Please work on your quoting.  It's rather hard to figure out who said
> what.
> 
> Reggie 

> reegistoop@

>  writes:
>>
>>> Lilypond is so bizarre sometimes with things.
>>
>> A totally useless and inflammatory comment.
>>
>> * Respect, but there are many things in Lilypond code that is bizarre
>> and confusing. Even those who work on the code have said in the past
>> posts that certain areas of the program are in need.
> 
> "In need of improvement" and "bizarre" are not quite the same thing.
> 
>> It comes up every now and again.
> 
>> You think that 100% of Lilypond makes total logical sense "under the
>> hood" and also in the user's viewpoint?
> 
> Nice straw man but "A totally useless and inflammatory comment" does not
> state anything at all like that.
> 
>> Surely that's hyperbolic as you say. :)
> 
>> But ok.
> 
> Ok, I take back the straw man.  Considering how you are milking it, it's
> more like a straw cow.
> 
> -- 
> David Kastrup
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

Sorry David I will work on quoting :) Straw cow was a good call. I withdraw.

So, again. Kieren knows the solution. He hides these staves selective it
"all the time" in his scores. But he has not helped Andrew yet. Why? Why has
nobody offered this "solution" if it's common knowledge to all who know the
manual line by line? The problem remains and there is no real help that I
see yet other than stating "I can do it. It's possible".

I do take back my original claim. I should have said it the way I did the
second time so apologies. :))



--
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: Selectively remove some staves consisting only of rests

2019-02-05 Thread Reggie
Kieren MacMillan wrote
> Reggie,
> 
>>> You don’t have to; I select staves and have them appear
>>> and disappear as desired all the time.
>> 
>> * Then why can't Andrew? Why did he post in the first place?
>> Why is a hack the only answer solution?
> 
> In an application where you type r8 when you want to output the visual
> representation of an eighth note rest in the Western musical notation
> system, what does 'hack' mean exactly?
> 
> In my set of include files, I have defined \showStaff and \hideStaff and
> other similar and related layout functions. As a result, I can write code
> like
> 
> c1 1 1 1 \break
> \hideStaff d1 1 1 1 \break
> \showStaff e1 1 1 1
> 
> and have complete control over which staves appear on any given system.
> (In reality, I do layout-level manipulation via the edition-engraver, but
> that’s a separate discussion, and would simply cloud the issue here.)
> 
> I don’t consider that a "hack"; it’s simply a function I’ve written to be
> used in an application where basically every thing I use (\score, \time
> 4/4, \key c \major, \flat, etc.) is a function [pace David K, who would
> rightly object to this well-intentioned but misleading way of describing
> the situation].
> 
> Have you looked at the definition of \time (as in \time 4/4)? Would you
> describe "\time" as a "hack"? Perhaps what you mean by "hack" is that
> *you* don’t currently have access to \hideStaff and \showStaff functions?
> 
>> Even those who work on the code have said in the past posts
>> that certain areas of the program are in need.
> 
> Of course; that will likely always be true.
> But "in need" and "so bizarre" are hardly synonymous.
> 
>> You think that 100% of Lilypond makes total logical sense "under the
>> hood"
>> and also in the user's viewpoint?
> 
> Please point out where I said — or even implied — anything of the sort.
> 
>> * Andrew does not know how to do it either. So now what? 
> 
> (a) You figure out how to do it yourself; or
> (b) You ask others, and they help; or
> (c) You don’t get done what you want to get done.
> 
> If you want *me* to help, you’ll need to scale back on the "Lilypond is
> ridiculous" tone that pervades every post I’ve seen you submit to the
> list.
> 
> Cheers,
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: 

> info@

> 
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

I will work on my language and words as best as possible. I will try and be
better so I can obtain some help from others here. I see my word bizarre
gave you an incorrect understanding of my intention and beyond that it all
was lost so nothing I can do now but sorry. Have a good evening. Thank you
for writing your solution to Andrew's first post problem. 



--
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: Slur connecting fingering numbers

2019-02-05 Thread Rachel Knight
Hooray, it works and looks amazing!
Rachel




> On Feb 5, 2019, at 2:39 PM, Thomas Morley  wrote:
> 
> Am Di., 5. Feb. 2019 um 10:38 Uhr schrieb Thomas Morley
> :
> 
>> Though, my procedure printing the bows relies on a stencil being
>> present. Thus nothing happens.
>> This dependance bugs me anyway, so I'll have another look in the evening.
> 
> I've eliminate default-stencil dependancy. Please test.
> 
> Cheers,
>  Harm
> 

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Kieren MacMillan
Reggie,

>> You don’t have to; I select staves and have them appear
>> and disappear as desired all the time.
> 
> * Then why can't Andrew? Why did he post in the first place?
> Why is a hack the only answer solution?

In an application where you type r8 when you want to output the visual 
representation of an eighth note rest in the Western musical notation system, 
what does 'hack' mean exactly?

In my set of include files, I have defined \showStaff and \hideStaff and other 
similar and related layout functions. As a result, I can write code like

c1 1 1 1 \break
\hideStaff d1 1 1 1 \break
\showStaff e1 1 1 1

and have complete control over which staves appear on any given system. (In 
reality, I do layout-level manipulation via the edition-engraver, but that’s a 
separate discussion, and would simply cloud the issue here.)

I don’t consider that a "hack"; it’s simply a function I’ve written to be used 
in an application where basically every thing I use (\score, \time 4/4, \key c 
\major, \flat, etc.) is a function [pace David K, who would rightly object to 
this well-intentioned but misleading way of describing the situation].

Have you looked at the definition of \time (as in \time 4/4)? Would you 
describe "\time" as a "hack"? Perhaps what you mean by "hack" is that *you* 
don’t currently have access to \hideStaff and \showStaff functions?

> Even those who work on the code have said in the past posts
> that certain areas of the program are in need.

Of course; that will likely always be true.
But "in need" and "so bizarre" are hardly synonymous.

> You think that 100% of Lilypond makes total logical sense "under the hood"
> and also in the user's viewpoint?

Please point out where I said — or even implied — anything of the sort.

> * Andrew does not know how to do it either. So now what? 

(a) You figure out how to do it yourself; or
(b) You ask others, and they help; or
(c) You don’t get done what you want to get done.

If you want *me* to help, you’ll need to scale back on the "Lilypond is 
ridiculous" tone that pervades every post I’ve seen you submit to the list.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Kieren MacMillan
Hi Reggie,

> Why has nobody offered this "solution" if it's common knowledge
> to all who know the manual line by line?

The solution — including essentially my \showStaff and \hideStaff functions, 
under different names — has already been posted in this very thread (by 
Jean-Charles).

Please go back and read that post, apply the solution to your own situation, 
and then if it doesn’t solve some problem you have, return to the list with a 
MWE.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Kieren MacMillan
Hi Valentin,

> Huh.
> http://lilypond.org/doc/latest/Documentation/internals/skip_002devent
> "Not accepted by any engraver or performer. "

That is a little unfortunate…

> How about putting ordinary rests and removing the stencil?
> (I know, it’s ugly, but…)

See the "bar-line-interface" solution I posted in another response to this 
thread. I believe that will suffice in essentially every likely scenario.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Slur connecting fingering numbers

2019-02-05 Thread Thomas Morley
Am Mi., 6. Feb. 2019 um 00:18 Uhr schrieb Rachel Knight :

> Hooray, it works and looks amazing!
> Rachel
>

Glad I could help.

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska


Am 5. Februar 2019 22:32:59 MEZ schrieb Kieren MacMillan 
:
>Hi David,
>
>> Pretty much.
>
>Okay. Thanks for the detailed and helpful answer. Consider this
>"brainstorming a possible feature request" thread closed from my
>perspective.
>

For now I will then generalize the solution I found today to center arbitrary 
music expressions in a measure (using the MMR) and try to make it available as 
an opemLilyLib tool. This can also add centered markup above and below the 
staff.
At least *some* relief maybe 

Urs

>Best,
>Kieren.
>
>
>Kieren MacMillan, composer
>‣ website: www.kierenmacmillan.info
>‣ email: i...@kierenmacmillan.info
>
>
>___
>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


issue with \transpose and \relative

2019-02-05 Thread John Doe
Hi, all,

The Notation Reference section 1.1.2 says "Music inside a \transpose block
is absolute unless a \relative is included in the block". I'm writing a
function that uses \transpose to change a variable's pitch in a function.

How can I check if the music entered was entered in a \relative block? Can
I?

Below is a minimal example showing the problem I'm having, along with a png
(attached) demonstrating the output:

\version "2.19.82"
fall = #(define-music-function (input) (ly:music?)
#{ $input \transpose c g, $input #})
  { \fall 4 e2^"absolute"_"right"}
\relative { \fall 4e,2^"relative"_"wrong" }

I hope this is clear enough—running low on sleep…

Thanks,

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread David Kastrup


Please work on your quoting.  It's rather hard to figure out who said
what.

Reggie  writes:
>
>> Lilypond is so bizarre sometimes with things.
>
> A totally useless and inflammatory comment.
>
> * Respect, but there are many things in Lilypond code that is bizarre
> and confusing. Even those who work on the code have said in the past
> posts that certain areas of the program are in need.

"In need of improvement" and "bizarre" are not quite the same thing.

> It comes up every now and again.

> You think that 100% of Lilypond makes total logical sense "under the
> hood" and also in the user's viewpoint?

Nice straw man but "A totally useless and inflammatory comment" does not
state anything at all like that.

> Surely that's hyperbolic as you say. :)

> But ok.

Ok, I take back the straw man.  Considering how you are milking it, it's
more like a straw cow.

-- 
David Kastrup

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Reggie
Kieren MacMillan wrote
> Hi Reggie,
> 
>> Why has nobody offered this "solution" if it's common knowledge
>> to all who know the manual line by line?
> 
> The solution — including essentially my \showStaff and \hideStaff
> functions, under different names — has already been posted in this very
> thread (by Jean-Charles).
> 
> Please go back and read that post, apply the solution to your own
> situation, and then if it doesn’t solve some problem you have, return to
> the list with a MWE.
> 
> Cheers,
> Kieren.
> 
> 
> Kieren MacMillan, composer
> ‣ website: www.kierenmacmillan.info
> ‣ email: 

> info@

> 
> 
> ___
> lilypond-user mailing list

> lilypond-user@

> https://lists.gnu.org/mailman/listinfo/lilypond-user

Can you share your function code with us please? I cannot follow your
reference to Jean Charles just as you say above. How can we arrive with his
post and create your personal \hideStaff and \showStaff functions? Wouldn't
it be easier if you posted your code or is there a problem I do not see with
Jean Charles code? Thank you. I am sure a lot of users would like it.
Instead having to piece together several posts and solve the function
\hideStaff and \showStaff.



--
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: Selectively remove some staves consisting only of rests

2019-02-05 Thread Kieren MacMillan
Hi Reggie (and Andrew et al.),

> Can you share your function code with us please?

Andrew’s snippet is included, below, with my functions applied.

Andrew: I believe my addition of "bar-line-interface" to \showStaff solves your 
[more specific] issue, except in the very rare (?!) case that you have no 
barlines in a given system.

Hope this helps,
Kieren.

%%%  SNIPPET BEGINS  %%%

\version "2.19.82"

showStaff = \set Staff.keepAliveInterfaces = #'(
bar-line-interface
bass-figure-interface
chord-name-interface
cluster-beacon-interface
fret-diagram-interface
lyric-syllable-interface
note-head-interface
tab-note-head-interface
lyric-interface
percent-repeat-item-interface
percent-repeat-interface
rest-interface
)
hideStaff = \unset Staff.keepAliveInterfaces

violinOne = {
  \override Staff.VerticalAxisGroup.remove-first = ##t
  \repeat unfold 8 { c''4 }
  \break
  \showStaff
  \repeat unfold 8 { r4 }
  \break
  \repeat unfold 8 { c''4 }
  \break
  \repeat unfold 8 { s4 }
  \bar "."
}

violinTwo = {
  \repeat unfold 8 { c'4 }
  \break
  \repeat unfold 8 { c'4 }
  \break
  \repeat unfold 8 { c'4 }
  \break
  \repeat unfold 8 { c'4 }
}

\score {
  <<
\new Staff {
  \violinOne
}
\new Staff {
  \violinTwo
}
  >>
  \layout {
\context {
  \Staff
  \RemoveEmptyStaves
}
  }
}
%%%  SNIPPET ENDS  %%%


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


height of breath mark

2019-02-05 Thread Craig Dabelstein
Hi all,

For the life of me I can't work out how to raise the height of a breath
mark. Any pointers?

All the best,

Craig


-- 
*Craig Dabelstein*
Maxime's Music
craig.dabelst...@gmail.com
*http://maximesmusic.com .au*
___
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user


Re: change user email address

2019-02-05 Thread Ben

On 2/5/2019 6:47 PM, Michael Abrams wrote:

I would like to change the email address I registered with.

How can I accomplish this?

Should unsubscribe and reregister uding a different email address?

Michael
string...@rogers.com



Hi Michael,

I believe you can change your subscription settings to the mailing list 
on this page here:


https://lists.gnu.org/mailman/listinfo/lilypond-user

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


change user email address

2019-02-05 Thread Michael Abrams
I would like to change the email address I registered with.

How can I accomplish this?

Should unsubscribe and reregister uding a different email address?

Michael
string...@rogers.com



.

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread Kieren MacMillan
Hi all,

Working with Andrew’s "spacer" situation, I see now that my staff layout 
functions can be simplified significantly: since every break "must" be 
accompanied by a bar (even if it’s an invisible one!), one can simply use that 
interface (and no others!) to force visibility.

In the snippet below, you can see the effects of forcing visibility 
(\showStaff), forcing invisibility (\hideStaff), and reverting to normal 
(\resetStaff). Note that these functions can also be used with \once, if 
desired (though I haven’t in this snippet).

Hope this helps!
Kieren.

%%%  SNIPPET BEGINS  %%%
\version "2.19.80"

showStaff = \set Staff.keepAliveInterfaces = #'(bar-line-interface)
hideStaff = \set Staff.keepAliveInterfaces = #'()
resetStaff = \unset Staff.keepAliveInterfaces

violinOne = {
  \override Staff.VerticalAxisGroup.remove-first = ##t
  c''1 \break
  \showStaff
  c''1 \break
  s2 \bar "" \break s2 \break
  c''1 \break
  \resetStaff
  R1 \break
  c''1 \break
  \showStaff
  R1 \break
  c''1
}

violinTwo = {
  \repeat unfold 8 { c'4 }
  \break
  \hideStaff
  \repeat unfold 8 { c'4 }
  \break
  \repeat unfold 8 { c'4 }
  \break
  \resetStaff
  \repeat unfold 8 { c'4 }
}

\score {
  <<
\new Staff \with { \override StaffSymbol.color = #red } {
  \violinOne
}
\new Staff \with { \override StaffSymbol.color = #blue } {
  \violinTwo
}
  >>
  \layout {
\context {
  \Staff
  \RemoveEmptyStaves
}
  }
}

%%%  SNIPPET ENDS  %%%



Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: height of breath mark

2019-02-05 Thread Abraham Lee
Hi, Craig!

On Tue, Feb 5, 2019 at 7:32 PM Craig Dabelstein 
wrote:

> Hi all,
>
> For the life of me I can't work out how to raise the height of a breath
> mark. Any pointers?
>
> All the best,
>
> Craig
>

Do you mean how tall it is, or the vertical position?

Best,
Abraham

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


Re: Slur connecting fingering numbers

2019-02-05 Thread Werner LEMBERG


>> Hooray, it works and looks amazing!
> 
> Glad I could help.

This small example is really nice, and perhaps it can be added as a
`harp music snippet' to the documentation.


Werner

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


Re: Selectively remove some staves consisting only of rests

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi all,
>
> Working with Andrew’s "spacer" situation, I see now that my staff
> layout functions can be simplified significantly: since every break
> "must" be accompanied by a bar (even if it’s an invisible one!),

Unless Forbid_line_break_engraver has been removed.

> one can simply use that interface (and no others!) to force
> visibility.

-- 
David Kastrup

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


Re: issue with \transpose and \relative

2019-02-05 Thread David Kastrup
John Doe  writes:

> Hi, all,
>
> The Notation Reference section 1.1.2 says "Music inside a \transpose block
> is absolute unless a \relative is included in the block". I'm writing a
> function that uses \transpose to change a variable's pitch in a function.
>
> How can I check if the music entered was entered in a \relative block? Can
> I?
>
> Below is a minimal example showing the problem I'm having, along with a png
> (attached) demonstrating the output:
>
> \version "2.19.82"
> fall = #(define-music-function (input) (ly:music?)
> #{ $input \transpose c g, $input #})
>   { \fall 4 e2^"absolute"_"right"}
> \relative { \fall 4e,2^"relative"_"wrong" }
>
> I hope this is clear enough—running low on sleep…

It's comparatively crappy but you can do

\version "2.19.82"
fall = #(define-music-function (input) (ly:music?)
(make-relative (input) input #{ $input \transpose c g, $input #}))
  { \fall 4 e2^"absolute"_"right"}
\relative { \fall 4e,2^"relative"_"wrong" }

This uses really involved code to simulate something that does not
really map well to LilyPond's internals so it may interfere with other
tricky code.  Particularly code that tries analyzing LilyPond code.

-- 
David Kastrup

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


Re: harp basic muffle

2019-02-05 Thread N. Andrew Walsh
Hi Rachel,

thanks for the muffle glyphs, they look really nice.

A question: is there a way to get the stem_engraver to accept these glyphs?
If it could, it would be possible to notate string-specific muffling
(something called for by some contemporary scores).

Thanks for the help,

A

On Fri, Jan 25, 2019 at 6:37 PM Rachel Knight  wrote:

> My piece with the adjusted muffle:
>
>
> On Jan 25, 2019, at 10:30 AM, Rachel Knight  wrote:
>
> Hi all,
>
> In super old scores, an asterisk was used, but that is not true of scores
> today. The example below that says English Ballad is from 1942. The next
> one is from 2005 and seems to be what is standard. The final one is one I
> created last year with Finale so you could see what proportions they chose.
> (It is extra large as the book is for younger students.)
>
> After studying these examples more, I adjusted the settings to make it
> consistent with current examples.
>
> mufflePath= \markup \path #'0.15 #'((moveto -1.125 0)
> (lineto 1.125 0)
> (moveto 0 -1.125)
> (lineto 0 1.125))
>
> muffleMarkup= \markup \translate #'(1.2 . -1.5)
>\combine \mufflePath \draw-circle #.75 #0.15 ##f
>
> It would be wonderful for harpists if this glyph could be added.
>
> Best,
> Rachel
>
>  
>
>
>
>
> 
>
>
>
> 
>
>
>
>
>
> On Jan 24, 2019, at 10:21 PM, Werner LEMBERG  wrote:
>
>
> This is Valentins code with a few values changed to get the
> appearance closer to what you are looking for: [...]
>
>
>
> Perfect, thanks so much!
>
>
> Is the exact shape of this symbol `universal'?  I.e., do German,
> French, and US publishers use exactly this shape?  If the answer is
> yes the glyph should be added to the lilypond music fonts.
>
>
>Werner
>
>
>
> ___
> 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: Slur connecting fingering numbers

2019-02-05 Thread Valentin Villenave
On 2/5/19, Thomas Morley  wrote:
> Attached a first try

Wow, that’s beautiful! Please let me know when you deem it LSR-ready :-)

Cheers,
V.

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


Re: Slur connecting fingering numbers

2019-02-05 Thread Thomas Morley
Am Di., 5. Feb. 2019 um 09:26 Uhr schrieb Valentin Villenave
:
>
> On 2/5/19, Thomas Morley  wrote:
> > Attached a first try
>
> Wow, that’s beautiful! Please let me know when you deem it LSR-ready :-)

This will not happen very soon. The LSR runs 2.18.2, but the used
make-tie-stencil is a 2.19 feature.

Cheers,
  Harm

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


Re: Horizontal shifting of chords

2019-02-05 Thread Robert Blackstone
Hi Andrew,

Thank you for your reaction.

I can understand that you did not understand why I wanted to centre the final 
chord. I was thinking of the perectly centered final rests, and if the last bar 
had not contained a \breve chord but a rest R1*2 would have produced it.
I thought that such a thing should somehow also be possible for a chord but I 
could not find out how. Hence the subject title of my question.

I will have a go with the extensive and complicated thing you forwarded. (But 
not today. ) 

Best regards,

Robert

On 4 Feb 2019, at 10:07 , Andrew Bernard  wrote:

> You asked to centre the chord, but  then if you add barline offset it's not 
> centred, so I am a bit confused what you mean. although the picture makes it 
> clear.
> 
> I just wanted to say that there are often times when you really do want to 
> centre a chord or a rest in a single, especially in Baroque music. To this 
> end, when I asked about this in the past, David Nalesnik and Thomas Morley 
> produced this excellent code. Note that it only works for one thing in a bar, 
> but it's great.
> 
> Hope this may help.
> 
> One of those things that ought to go in LSR I suppose.
> 
> 
> Andrew
> 
> %
> % Thanks to David Nalesnik and Thomas Morley.
> 
> #(define (sort-by-X-coord sys grob-lst)
>"Arranges a list of grobs in ascending order by their X-coordinates"
>(let* ((X-coord (lambda (x) (ly:grob-relative-coordinate x sys X)))
>   (comparator (lambda (p q) (< (X-coord p) (X-coord q)
> 
>  (sort grob-lst comparator)))
> 
> #(define (find-bounding-grobs note-column grob-lst)
>(let* ((sys (ly:grob-system note-column))
>   (X-coord (lambda (n) (ly:grob-relative-coordinate n sys X)))
>   (note-column-X (X-coord note-column)))
> 
>  (define (helper lst)
>(if (and (< (X-coord (car lst)) note-column-X)
> (> (X-coord (cadr lst)) note-column-X))
>(cons (car lst) (cadr lst))
>(if (null? (cddr lst))
>(cons note-column note-column)
>(helper (cdr lst)
> 
>  (helper grob-lst)))
> 
> #(define (read-out ls1 ls2 ls3 symbol)
>"Filters all elements of ls1 from ls2 and appends it to ls3"
>(set! ls3 (append ls3 (filter (lambda (x) (eq? (car ls1) (symbol x))) 
> ls2)))
>(if (null? (cdr ls1))
>ls3
>(read-out (cdr ls1) ls2 ls3 symbol)))
> 
> #(define ((center-note-column x-offs) grob)
>(let* ((sys (ly:grob-system grob))
>   (elements-lst (ly:grob-array->list (ly:grob-object sys 
> 'all-elements)))
>   (grob-name (lambda (x) (assq-ref (ly:grob-property x 'meta) 'name)))
>   (X-extent (lambda (q) (ly:grob-extent q sys X)))
>   ;; NoteColumn
>   (note-column-coord (ly:grob-relative-coordinate grob sys X))
>   (grob-ext (X-extent grob))
>   (grob-length (interval-length grob-ext))
>   ;; NoteHeads
>   (note-heads (ly:grob-object grob 'note-heads))
>   (note-heads-grobs (if (not (null? note-heads))
> (ly:grob-array->list note-heads)
> '()))
>   (one-note-head (if (not (null? note-heads-grobs))
>  (car note-heads-grobs)
>  '()))
>   (one-note-head-length (if (not (null? one-note-head))
> (interval-length (X-extent 
> one-note-head)) ;; NB
> 0))
>   ;; Stem
>   (stem (ly:grob-object grob 'stem))
>   (stem-dir (ly:grob-property stem 'direction))
>   (stem-length-x (interval-length (X-extent stem))) ;; NB
>   ;; DotColumn
>   (dot-column (ly:note-column-dot-column grob))
>   ;; AccidentalPlacement
>   (accidental-placement (ly:note-column-accidentals grob))
>   ;; Arpeggio
>   (arpeggio (ly:grob-object grob 'arpeggio))
>   ;; Rest
>   (rest (ly:grob-object grob 'rest))
>   ;; Grobs to center between
>   (args (list 'BarLine
>   'Clef
>   'KeySignature
>   'KeyCancellation
>   'TimeSignature))
>   (grob-lst (read-out args elements-lst '() grob-name))
>   (new-grob-lst (remove (lambda (x) (interval-empty? (X-extent x))) 
> grob-lst))
>   (sorted-grob-lst (sort-by-X-coord sys new-grob-lst))
>   ;; Bounds
>   (bounds (find-bounding-grobs grob sorted-grob-lst))
>   (left (cdr (X-extent (car bounds
>   (right (car (X-extent (cdr bounds
> 
>   ;;(bounds-coord (cons left right)) ;; delete
> 
>   (basic-offset
>(- (average left right)
>  (interval-center (X-extent grob))
>  (* -1 x-offs)))
>   (dir-correction
>(if (> grob-length one-note-head-length)
>(* stem-dir (* -2 stem-length-x) grob-length)

Re: A strange behaivor of autobeaming

2019-02-05 Thread Urs Liska


Am 04.02.19 um 20:53 schrieb Павел Буданов:
Hello everybody! You can see on the next image, that autobeaming is 
not always correct:


For the sake of experiment, I tried to put this snippet to separate file:
\scaleDurations 2/3 \relative f,
{
   \clef bass
   \set subdivideBeams = ##t
   \set baseMoment = #(ly:make-moment 3/16)
   \tuplet 6/6 { b,8 f'16 d' f, d' }
   b' d, f, d' f, b,~
   \repeat unfold 2
   { b8 f'16 d' f, d' b' d, f, d' f, b,~ }
}
And got a different result:

What is the root of this problem?



The "root" of the problem is that the code is completely messed up in 
the first place. You don't want to use \scaleDurations here at all, only 
\tuplet, and then "\tuplet 6/6" doesn't make sense at all.


Here's a commented example of what I assume you want to do:

\version "2.21.0"

% No \scaleDurations
\relative f,
{
  \clef bass
  \set subdivideBeams = ##t
  % Set the base moment to 1/8 (equals 3/16 in a 3/2 tuplet)
  \set baseMoment = #(ly:make-moment 1/8)
  % You want a 6/4 tuplet ("6 instead of 4", "6 instead of 6" doesn't mean 
anything)
  % supply the "4" to group tuplets in quarter notes
  % wrap the \tuplet around the *whole* music (INSTEAD of using \scaleDurations)
  \tuplet 6/4 4 {
b,8 f'16 d' f, d'
% Probably with the 6/6 tuplet around one single group
% you meant to disable the tuplet number after the first incident.
\omit TupletNumber
b' d, f, d' f, b,~
\repeat unfold 2
{ b8 f'16 d' f, d' b' d, f, d' f, b,~ }
  }
}

When it comes to tuplets the automatic beam subdivisions still fail in 
many cases (see 
http://lilypond.org/google-summer-of-code.html#Fix-Beaming-Patterns_002fBeam-Subdivisions-and-Tuplets), 
but this example works quite well.


HTH
Urs

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


Re: Align bracket not to notes but to enclosing bars

2019-02-05 Thread Urs Liska

Hi David,

Am 04.02.19 um 14:20 schrieb David Nalesnik:

Hi Urs,

On Mon, Feb 4, 2019 at 6:12 AM Urs Liska  wrote:

...

I believe you will need to look for the bar lines (or the containing
NonMusicalPaperColumns). Here's a (still-working as of 2.19.82)
example which uses the MeasureCounter and a custom stencil:
http://lists.gnu.org/archive/html/lilypond-user/2014-10/msg00446.html.
It may be usable as a source of code for your task.  At the moment I
unfortunately can't devote time to a more thorough-going
recommendation!



thank you very much for this. Indeed it provided me with all the 
starting points to achieve my task at hand. Actually I could *simplify* 
your code because a) I don't have to take broken spanners into account 
and b) I don't need the split bracket effect. I did not touch the 
engraver because I didn't immediately see how it works, and it *did* 
work right as it was.


So what I ended up with is more limited than yours but I'll share it 
anyway. Maybe it's of some use for some.


What I was thinking about is that it would be useful to provide some 
more convenient access to the type of information used in that snippet 
(I had already thought of it when I had to create custom slurs from 
scratch). These various steps that are necessary navigating the staff, 
refpoints and object lists wouldn't have to be redone everytime when 
there were a function like "analyseSpanner" that returns an alist with 
all sort of usable information about the spanner.


Best
Urs

%

\version "2.19.82"

% Create horizontal brackets with included text,
% attached to one or multiple measures.
% If no text is desired an empty string has to be given.
%
% Based on code by David Nalesnik:
% http://lists.gnu.org/archive/html/lilypond-user/2014-10/msg00446.html
% (referenced from 
http://lists.gnu.org/archive/html/lilypond-user/2019-02/msg00084.html)
% Note that support for broken spanners has deliberately been removed.
% Currently the function is limited to be printed above the staff
%
% Use \startMeasureBracket "text" *before* the first note. The bracket will
% attach itself to the barlines (or right after the time signature at staff 
start)
% and center the given markup underneath the bracket.

% Configuration variables
#(define measure-text-padding 0)
#(define measure-staff-padding 4)
#(define measure-bracket-thickness 0.25)

#(define (measure-bracket-stencil grob has-bracket text)
   ;; stencil override that determines the width of a MeasureCounter
   ;; and creates the annotated bracket
   (let*
((ref-point (ly:grob-system grob))
 (left-bound (ly:spanner-bound grob LEFT))
 (right-bound (ly:spanner-bound grob RIGHT))
 (elts-L (ly:grob-array->list (ly:grob-object left-bound 'elements)))
 (elts-R (ly:grob-array->list (ly:grob-object right-bound 'elements)))
 (break-alignment-L
  (filter
   (lambda (elt) (grob::has-interface elt 'break-alignment-interface))
   elts-L))
 (break-alignment-R
  (filter
   (lambda (elt) (grob::has-interface elt 'break-alignment-interface))
   elts-R))
 (break-alignment-L-ext (ly:grob-extent (car break-alignment-L) ref-point 
X))
 (break-alignment-R-ext (ly:grob-extent (car break-alignment-R) ref-point 
X))
 (width (- (car break-alignment-R-ext) (cdr break-alignment-L-ext)))
 (heading (ly:stencil-aligned-to
   (grob-interpret-markup grob (markup text))
   X CENTER))
 (heading-centered
  (ly:stencil-translate-axis
   heading
   (+ (interval-length break-alignment-L-ext)
 (* 0.5
   (- (car break-alignment-R-ext)
 (cdr break-alignment-L-ext
   X))
 (bracket-path
  (markup #:path measure-bracket-thickness
`((moveto 0 0)
  (lineto 0 1)
  (lineto ,width 1)
  (lineto ,width 0
 (bracket
  (ly:stencil-translate-axis
   (grob-interpret-markup grob bracket-path)
   (interval-length break-alignment-L-ext)
   X))
 (combined-stencil
  (ly:stencil-combine-at-edge
   heading-centered Y UP bracket
   measure-text-padding)))
(if has-bracket
combined-stencil
heading-centered)))

#(define-public (Measure_attached_spanner_engraver context)
   (let ((span '())
 (finished '())
 (event-start '())
 (event-stop '()))
 (make-engraver
  (listeners ((measure-counter-event engraver event)
  (if (= START (ly:event-property event 'span-direction))
  (set! event-start event)
  (set! event-stop event
  ((process-music trans)
   (if (ly:stream-event? event-stop)
   (if (null? span)
   (ly:warning "You're trying to end a measure-attached spanner but you 
haven't started one.")
   (begin (set! finished span)
 (ly:engraver-announce-end-grob trans finished event-start)
 (set! span '())
 (set! event-stop 

Re: harp basic muffle

2019-02-05 Thread Valentin Villenave
On 2/5/19, N. Andrew Walsh  wrote:
> A question: is there a way to get the stem_engraver to accept these glyphs?

Well, of course you can always replace the NoteHead stencil with a markup:

%%

mufflePath=
\markup
\path #0.15 #'((moveto -1.25 0)
(lineto 1.25 0)
(moveto 0 -1.25)
(lineto 0 1.25))

muffleMarkup=
\markup \translate #'(0 . 1)
\combine \mufflePath
\draw-circle #1 #0.15 ##f

muffleHead =
\once \override NoteHead.stencil =
  #(lambda (grob)
 (ly:stencil-translate
  (grob-interpret-markup grob muffleMarkup)
 '(0 . -.8)))

{ g'8 \muffleHead g' a' b' }

%

Cheers,
V.

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


Re: Slur connecting fingering numbers

2019-02-05 Thread Thomas Morley
Am Di., 5. Feb. 2019 um 04:05 Uhr schrieb Rachel Knight :
>
> Hi,
> The slur looks great and I was able to implement it for regular notes (the E 
> and D in the example below). In my example though, I need the slur to be 
> between the two notes labeled with fingering “1.” The small notes are added 
> as an acciaccatura, and when I added \glissando, nothing changed. Do I need 
> to add something else?
> Rachel

Hi Rachel,

default LilyPond drops the glissando-stencil in very tight situations. See:

{
  \override Glissando.after-line-breaking =
#(lambda (grob) (write (ly:grob-property grob 'stencil)))
  \acciaccatura { e''16 f''\glissando }
  e''8
}

Terminal displays '()

Though, my procedure printing the bows relies on a stencil being
present. Thus nothing happens.
This dependance bugs me anyway, so I'll have another look in the evening.

For now you could lengthen the glissando with:

\override Glissando.springs-and-rods = #ly:spanner::set-spacing-rods
\override Glissando.minimum-length = 2 %% adjust  to taste.


Cheers,
  Harm

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


Re: A strange behaivor of autobeaming

2019-02-05 Thread Павел Буданов
Thank you for the detailed explanation.

вт, 5 февр. 2019 г. в 13:31, Urs Liska :

>
> Am 04.02.19 um 20:53 schrieb Павел Буданов:
>
> Hello everybody! You can see on the next image, that autobeaming is not
> always correct:
>
> For the sake of experiment, I tried to put this snippet to separate file:
> \scaleDurations 2/3 \relative f,
> {
>\clef bass
>\set subdivideBeams = ##t
>\set baseMoment = #(ly:make-moment 3/16)
>\tuplet 6/6 { b,8 f'16 d' f, d' }
>b' d, f, d' f, b,~
>\repeat unfold 2
>{ b8 f'16 d' f, d' b' d, f, d' f, b,~ }
> }
> And got a different result:
>
> What is the root of this problem?
>
>
> The "root" of the problem is that the code is completely messed up in the
> first place. You don't want to use \scaleDurations here at all, only
> \tuplet, and then "\tuplet 6/6" doesn't make sense at all.
>
> Here's a commented example of what I assume you want to do:
>
> \version "2.21.0"
>
> % No \scaleDurations
> \relative f,
> {
>   \clef bass
>   \set subdivideBeams = ##t
>   % Set the base moment to 1/8 (equals 3/16 in a 3/2 tuplet)
>   \set baseMoment = #(ly:make-moment 1/8)
>   % You want a 6/4 tuplet ("6 instead of 4", "6 instead of 6" doesn't mean 
> anything)
>   % supply the "4" to group tuplets in quarter notes
>   % wrap the \tuplet around the *whole* music (INSTEAD of using 
> \scaleDurations)
>   \tuplet 6/4 4 {
> b,8 f'16 d' f, d'
> % Probably with the 6/6 tuplet around one single group
> % you meant to disable the tuplet number after the first incident.
> \omit TupletNumber
> b' d, f, d' f, b,~
> \repeat unfold 2
> { b8 f'16 d' f, d' b' d, f, d' f, b,~ }
>   }
> }
>
> When it comes to tuplets the automatic beam subdivisions still fail in
> many cases (see
> http://lilypond.org/google-summer-of-code.html#Fix-Beaming-Patterns_002fBeam-Subdivisions-and-Tuplets),
> but this example works quite well.
>
> HTH
> Urs
> ___
> 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: Reducing top margin for a single page in a score

2019-02-05 Thread Kieren MacMillan
Hi Andrew,

> But I iwll ahve to have a separate book/bookpart/whatever and stitch the 
> score together. This is simple to do but very inconvenient when I am making 
> lots of drafts and sending them to the composer for checking, approval, and 
> viewing constantly.

Did you try my suggestion with explicit system positioning (?
Did it not work as you needed?

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Horizontal shifting of chords

2019-02-05 Thread Kieren MacMillan
Hi Robert,

> I will have a go with the extensive and complicated thing you forwarded. (But 
> not today. ) 

You can also go with a short and simple, but manually-set, thing:

\layout {
  line-width = 5\in
  ragged-right = ##f
}

{
  c''4 4 4 4 \tweak extra-offset #'(6.75 . 0) 1 \bar "|."
}

Hope that helps!
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Configuration Point & Click

2019-02-05 Thread foxfanfare
Okay, I think I solved the issue. I'll update this post with the correct
solution and some of my configuration when I'd be sure it's working properly
(for those interested!).



--
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


Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska
[Resending because I sent it from the wrong address so it probably won't 
get through. Apologies if it does and gest duplicated ...]


Hi all,


I succeeded overriding a MultiMeasureRest's stencil with a custom markup 
to display arbitrary markups centered in a measure. So I know how to use 
the MMR's properties to determine a measure's center and place custom 
stencils appropriately.


However, now I have to do the same but not with text but with arbitrary 
notes. Unfortunately there's no stencil for a "note", so I'm not sure if 
I can make this approach work.


Would it be possible to manually combine (arbitrary) notehead, stem and 
flag to a custom stencil that I can then place inside the staff by 
overriding a MMR's stencil? Are there even tools to help me with that?


Or would there be a completely different possibility to print arbitrary 
notes centered in a measure?


Thanks for any pointers
Urs



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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi Urs,

Isn’t this something that should be available to NoteHead (or NoteColumn) 
directly, rather than through MMR? Is there some measure-centred-interface that 
could be created to handle this? If so, that would also be *so* helpful for 
spanners (eliminating the need for David N’s workaround), and other grobs.

I clearly know very little of what I’m talking about… but wanted to get an idea 
of the technical possibilities.

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska

Hi Kieren,

Am 05.02.19 um 16:35 schrieb Kieren MacMillan:

Hi Urs,

Isn’t this something that should be available to NoteHead (or NoteColumn) 
directly, rather than through MMR?



That would be cool, although I'd think that MMRs are generally the only 
items that are printed in the middle of a measure.




  Is there some measure-centred-interface that could be created to handle this? 
If so, that would also be *so* helpful for spanners (eliminating the need for 
David N’s workaround), and other grobs.

I clearly know very little of what I’m talking about… but wanted to get an idea 
of the technical possibilities.



Me too. What *could* of course be done is wrapping the stuff of finding 
the surrounding measure borders etc. in a more convenient and readily 
available Scheme function (e.g. within a stencil override being able to say


(let ((slur-props (spanner-properties grob)))

and have access to all sorts of information.

However, this won't help me with the current problem of the combined 
"note" (for which indeed NoteColumn or PaperColumn might be promising 
points to be attacked). *And* it will (at least on the Scheme side) 
always suffer from the limitation that it can only be accessed 
after-line-breaking or even in 'stencil' when any operations won't be 
able to influence anything else (if I'm pushing anything somewhere else 
there won't be any layout adjustment or collision handling anymore).


Probably one would have to see how the MultiMeasureRest originally 
performs its centering and learn from that (but I'd expect this to be in 
the C++ part).


Urs




Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi Urs,

> I'd think that MMRs are generally the only items that are printed in the 
> middle of a measure.

No: MMRs [essentially always], measure numbers [often], final single-note 
columns [in many engravings], boxed markup/instructions inside the staff [in 
modern music], over-staff markups ["Safety", fermata, etc.].

I’m sure there are more — that list was just off the top of my head.

> Probably one would have to see how the MultiMeasureRest originally performs 
> its centering and learn from that (but I'd expect this to be in the C++ part).

Yes, this is kind of what I’m hinting towards: I’m wondering if, in the C++ 
part, an interface could be added which centres a given grob in the middle of 
the current measure. (I assume the implementation would then have to be 
"retrofitted" onto MMRs to duplicate the current behaviour.)

I’ll be interested to hear what others think about the possibilities.

Cheers,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Urs Liska  writes:

> Hi Kieren,
>
> Am 05.02.19 um 16:35 schrieb Kieren MacMillan:
>> Hi Urs,
>>
>> Isn’t this something that should be available to NoteHead (or
>> NoteColumn) directly, rather than through MMR?
>
>
> That would be cool, although I'd think that MMRs are generally the
> only items that are printed in the middle of a measure.

Percentrepeats also.

-- 
David Kastrup

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Mark Knoop


At 15:23 on 05 Feb 2019, Urs Liska wrote:
> I succeeded overriding a MultiMeasureRest's stencil with a custom markup
> to display arbitrary markups centered in a measure. So I know how to use
> the MMR's properties to determine a measure's center and place custom
> stencils appropriately.
>
> However, now I have to do the same but not with text but with arbitrary
> notes. Unfortunately there's no stencil for a "note", so I'm not sure if
> I can make this approach work.
>
> Would it be possible to manually combine (arbitrary) notehead, stem and
> flag to a custom stencil that I can then place inside the staff by
> overriding a MMR's stencil? Are there even tools to help me with that?

It seems overkill, but you could try getting the stencil from a \markup \score 
block stripped of unnecessary engravers.

--
Mark Knoop

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska

Hi Mark,

Am 05.02.19 um 16:56 schrieb Mark Knoop:

At 15:23 on 05 Feb 2019, Urs Liska wrote:

I succeeded overriding a MultiMeasureRest's stencil with a custom markup
to display arbitrary markups centered in a measure. So I know how to use
the MMR's properties to determine a measure's center and place custom
stencils appropriately.

However, now I have to do the same but not with text but with arbitrary
notes. Unfortunately there's no stencil for a "note", so I'm not sure if
I can make this approach work.

Would it be possible to manually combine (arbitrary) notehead, stem and
flag to a custom stencil that I can then place inside the staff by
overriding a MMR's stencil? Are there even tools to help me with that?

It seems overkill, but you could try getting the stencil from a \markup \score 
block stripped of unnecessary engravers.



Good idea!
I'll try that. SInce I'm stuffing this away in include files it might be 
overkill but feasible.


Best
Urs


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Nalesnik
Off the top of my head--

On Tue, Feb 5, 2019 at 9:51 AM Kieren MacMillan
 wrote:
>
> Hi Urs,
>
> > I'd think that MMRs are generally the only items that are printed in the 
> > middle of a measure.
>
> No: MMRs [essentially always], measure numbers [often], final single-note 
> columns [in many engravings], boxed markup/instructions inside the staff [in 
> modern music], over-staff markups ["Safety", fermata, etc.].
>
> I’m sure there are more — that list was just off the top of my head.
>
> > Probably one would have to see how the MultiMeasureRest originally performs 
> > its centering and learn from that (but I'd expect this to be in the C++ 
> > part).
>
> Yes, this is kind of what I’m hinting towards: I’m wondering if, in the C++ 
> part, an interface could be added which centres a given grob in the middle of 
> the current measure. (I assume the implementation would then have to be 
> "retrofitted" onto MMRs to duplicate the current behaviour.)
>

Centering a MultiMeasureRest in the measure is an issue of
"springs-and-rods".  Centering text or whatever outside the staff
through a spanner mechanism (see MeasureCounter) is done is relation
to NonMusicalPaperColumns which organize bar lines and "prefatory"
material.   This is the reason I coopted MeasureCounter for my hack.
Also, with a bit more refinement, this is what I did for my
MeasureAttachedSpanner, which I see I need to put up for patch review
as soon as I can, as I keep bringing it up :)

David N.

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


Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska

Hi all,

I succeeded overriding a MultiMeasureRest's stencil with a custom markup 
to display arbitrary markups centered in a measure. So I know how to use 
the MMR's properties to determine a measure's center and place custom 
stencils appropriately.


However, now I have to do the same but not with text but with arbitrary 
notes. Unfortunately there's no stencil for a "note", so I'm not sure if 
I can make this approach work.


Would it be possible to manually combine (arbitrary) notehead, stem and 
flag to a custom stencil that I can then place inside the staff by 
overriding a MMR's stencil? Are there even tools to help me with that?


Or would there be a completely different possibility to print arbitrary 
notes centered in a measure?


Thanks for any pointers
Urs

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Urs Liska  writes:

> Am 05.02.19 um 18:17 schrieb David Kastrup:
>> Kieren MacMillan  writes:
>>
>>> Hi David,
>>>
 I have no idea what you mean by "an interface could be added".  Grob
 interfaces are a fixed component of the grob data structure: you cannot
 add or remove them at will.  A certain grob type either has an interface
 or not.  It's not a per-grob decision to make.
>>> Looking at the list
>>> ,
>>> I don’t see a "measure-centred-interface" or something obviously
>>> equivalent. So what I meant was: can/should such an interface be
>>> created [i.e., "added to that list"], and then the appropriate grob
>>> types be made to have that interface as part of their makeup?
>> What do you think the presence or absence of some interface implies?
>>
> Either that it doesn't make sense to have it, that it is impossible to
> have, or that noone has bothered implementing it yet?
>
> I have the impression you are slightly talking beside each other.

I did not mean the presence or absence of some interface in LilyPond but
the presence or absence of some interface in a grob.  I am trying to
figure out what Kieren is talking about.  I don't see that you are
helping, actually.

-- 
David Kastrup

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> What do you think the presence or absence of some interface implies?

I think the presence of an interface means a shared behaviour is implied 
between grob types which have that interface, the implementation of which is 
individually determined for each grob type. For example, I think that all grob 
types which share the text-interface have a baseline-skip property that can be 
interacted with (where hopefully an implementation of that property for that 
grob type has been created, or setting the property will have no effect).

So in my (possibly deeply flawed) grasp of how interfaces work: a 
measure-centred-interface might add a centre-in-measure property, which centres 
the grob [type] within the current measure; for MMRs that would be set to true 
by default, and for other grob types (e.g., NoteColumn or NoteHead) it might be 
set to false by default. Overriding that property would then engage whatever 
programming was in place to centre the grob.

How far off the mark am I?

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi Urs,
>
>> I'd think that MMRs are generally the only items that are printed in
>> the middle of a measure.
>
> No: MMRs [essentially always], measure numbers [often], final
> single-note columns [in many engravings], boxed markup/instructions
> inside the staff [in modern music], over-staff markups ["Safety",
> fermata, etc.].
>
> I’m sure there are more — that list was just off the top of my head.
>
>> Probably one would have to see how the MultiMeasureRest originally
>> performs its centering and learn from that (but I'd expect this to
>> be in the C++ part).
>
> Yes, this is kind of what I’m hinting towards: I’m wondering if, in
> the C++ part, an interface could be added which centres a given grob
> in the middle of the current measure. (I assume the implementation
> would then have to be "retrofitted" onto MMRs to duplicate the current
> behaviour.)
>
> I’ll be interested to hear what others think about the possibilities.

I have no idea what you mean by "an interface could be added".  Grob
interfaces are a fixed component of the grob data structure: you cannot
add or remove them at will.  A certain grob type either has an interface
or not.  It's not a per-grob decision to make.

-- 
David Kastrup

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> I have no idea what you mean by "an interface could be added".  Grob
> interfaces are a fixed component of the grob data structure: you cannot
> add or remove them at will.  A certain grob type either has an interface
> or not.  It's not a per-grob decision to make.

Looking at the list 
,
 I don’t see a "measure-centred-interface" or something obviously equivalent. 
So what I meant was: can/should such an interface be created [i.e., "added to 
that list"], and then the appropriate grob types be made to have that interface 
as part of their makeup?

Of course, it’s quite possible that everything that’s required to do what we’re 
talking about (i.e., measure-centering MMRs, NoteColumns, text spanners, 
percent repeats, over-staff scripts, etc.) is already present in another 
interface (or combination of interfaces), so creating a whole new interface is 
unnecessary. That’s what I’m trying to get information about.

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska

Hi Mark,

Am 05.02.19 um 17:01 schrieb Urs Liska:

Hi Mark,

Am 05.02.19 um 16:56 schrieb Mark Knoop:

At 15:23 on 05 Feb 2019, Urs Liska wrote:
I succeeded overriding a MultiMeasureRest's stencil with a custom 
markup
to display arbitrary markups centered in a measure. So I know how to 
use

the MMR's properties to determine a measure's center and place custom
stencils appropriately.

However, now I have to do the same but not with text but with arbitrary
notes. Unfortunately there's no stencil for a "note", so I'm not 
sure if

I can make this approach work.

Would it be possible to manually combine (arbitrary) notehead, stem and
flag to a custom stencil that I can then place inside the staff by
overriding a MMR's stencil? Are there even tools to help me with that?
It seems overkill, but you could try getting the stencil from a 
\markup \score block stripped of unnecessary engravers.



Good idea!
I'll try that. SInce I'm stuffing this away in include files it might 
be overkill but feasible.


It sort-of works.

I'm producing the stencil of a \markup \score expression through this 
function


getNoteMarkupStencil =
#(define-scheme-function (grob music)(ly:grob? ly:music?)
   (grob-interpret-markup grob
 #{
   \markup \score {
 \new Staff $music
 \layout {
   \context {
 \Score
 \omit StaffSymbol
 \omit Clef
 \omit TimeSignature
 \omit KeySignature
 \omit BarLine
   }
 }
   }
 #}))

and pass it to a stencil override where two markups are also combined 
above and below the staff.


The result (attached) is promising but not quite there yet. I have the 
impression that space is left for the accidental, whether it is there or 
not.


Do you have any idea how I could tackle this (without having me to sort 
everything out into a MWE)? Is this the negative part of the extent of 
the note's NoteColumn or so? Or rather some space at the beginning of a 
score (the one between the time signature and the first note for example 
(where, I believe, a leading accidental is printed right into)?


The thing is, I can also pass more than one note to that function, and 
it will still leave exactly that space in front. When the first note has 
an accidental or not all the notes remain at the same position, just the 
accidental is added to the left.


After having written this I'm pretty sure the problem is that space 
before the first note of a score/system. How can I remove that in the 
Score definition above?


Thanks
Urs



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


word-wrapping in a markup column

2019-02-05 Thread David Nalesnik
Hi all,

This snippet leaves no space between the word-wrapped items:

 \version "2.19.82"

\markup \override #'(line-width . 10) \column {
  \wordwrap { a a a a a a a a a a a a a a a a a a a a }
  \wordwrap { b b b b b b b b b b b b b b b b b b b b }
  \wordwrap { c c c c c c c c c c c c c c c c c c }
}

Is there a way to allow lines in such a column to break if needed but
maintain even spacing between all lines?  Any help is much
appreciated, as this problem has plagued me for a long time.

Thanks,
David

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> What do you think the presence or absence of some interface implies?
>
> I think the presence of an interface means a shared behaviour is
> implied between grob types which have that interface, the
> implementation of which is individually determined for each grob type.
> For example, I think that all grob types which share the
> text-interface have a baseline-skip property that can be interacted
> with (where hopefully an implementation of that property for that grob
> type has been created, or setting the property will have no effect).

Well, there we have the problem.  Having an interface implies having a
set of properties.  That's all.  It remains the grob's responsibility to
actually do anything with those properties.  An interface often is
associated with a set of available Scheme functions (often carrying the
interface name in their name) but that association is just a convention
without programmatic consequences.

> So in my (possibly deeply flawed) grasp of how interfaces work: a
> measure-centred-interface might add a centre-in-measure property,
> which centres the grob [type] within the current measure; for MMRs
> that would be set to true by default, and for other grob types (e.g.,
> NoteColumn or NoteHead) it might be set to false by
> default. Overriding that property would then engage whatever
> programming was in place to centre the grob.
>
> How far off the mark am I?

An interface may include some property but that does not make a grob do
anything with that property.  Those grobs which you'd desire to heed
that property would all have to be programmatically changed to look at
that property, by employing some interface-specific function in their
internals or similar.

Basically calling for an interface just calls for giving a set of
properties a label.

-- 
David Kastrup

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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Kieren MacMillan
Hi David,

> An interface may include some property but that does not make a grob do
> anything with that property.  Those grobs which you'd desire to heed
> that property would all have to be programmatically changed to look at
> that property, by employing some interface-specific function in their
> internals or similar.

That’s exactly what I thought, though I clearly didn’t describe my impression 
very well. I understand fully that the grobs would have to be programmatically 
changed to deal with that property (which is why I suggested that MMRs would 
likely have to be reprogrammed to do exactly what they already do, just via the 
new property).

> Basically calling for an interface just calls for giving a set of properties 
> a label.

So, I’ll reframe my question:
Does it make sense to give measure-centering properties a label?

Thanks,
Kieren.


Kieren MacMillan, composer
‣ website: www.kierenmacmillan.info
‣ email: i...@kierenmacmillan.info


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread Urs Liska


Am 05.02.19 um 18:17 schrieb David Kastrup:

Kieren MacMillan  writes:


Hi David,


I have no idea what you mean by "an interface could be added".  Grob
interfaces are a fixed component of the grob data structure: you cannot
add or remove them at will.  A certain grob type either has an interface
or not.  It's not a per-grob decision to make.

Looking at the list
,
I don’t see a "measure-centred-interface" or something obviously
equivalent. So what I meant was: can/should such an interface be
created [i.e., "added to that list"], and then the appropriate grob
types be made to have that interface as part of their makeup?

What do you think the presence or absence of some interface implies?

Either that it doesn't make sense to have it, that it is impossible to 
have, or that noone has bothered implementing it yet?


I have the impression you are slightly talking beside each other.

Urs


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


Re: Use arbitrary notes (with stem/flag) as MMR stencil override

2019-02-05 Thread David Kastrup
Kieren MacMillan  writes:

> Hi David,
>
>> I have no idea what you mean by "an interface could be added".  Grob
>> interfaces are a fixed component of the grob data structure: you cannot
>> add or remove them at will.  A certain grob type either has an interface
>> or not.  It's not a per-grob decision to make.
>
> Looking at the list
> ,
> I don’t see a "measure-centred-interface" or something obviously
> equivalent. So what I meant was: can/should such an interface be
> created [i.e., "added to that list"], and then the appropriate grob
> types be made to have that interface as part of their makeup?

What do you think the presence or absence of some interface implies?

-- 
David Kastrup

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