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


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

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

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

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


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


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


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

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